Struct FontPaletteOverride
Replaces the color of a single palette entry when a FontPalette is applied. An override whose Index lies outside the font's palette entry range is ignored.
public readonly struct FontPaletteOverride : IEquatable<FontPaletteOverride>
- Implements
- Inherited Members
Constructors
FontPaletteOverride(int, GlyphColor)
Initializes a new instance of the FontPaletteOverride struct.
public FontPaletteOverride(int index, GlyphColor color)
Parameters
indexintThe zero-based palette entry index to replace.
colorGlyphColorThe replacement color.
Properties
Color
Gets the replacement color.
public GlyphColor Color { get; }
Property Value
Index
Gets the zero-based palette entry index to replace.
public int Index { get; }
Property Value
Methods
Equals(FontPaletteOverride)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FontPaletteOverride other)
Parameters
otherFontPaletteOverrideAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(FontPaletteOverride, FontPaletteOverride)
Compares two FontPaletteOverride objects for equality.
public static bool operator ==(FontPaletteOverride left, FontPaletteOverride right)
Parameters
leftFontPaletteOverrideThe FontPaletteOverride on the left side of the operand.
rightFontPaletteOverrideThe FontPaletteOverride on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(FontPaletteOverride, FontPaletteOverride)
Compares two FontPaletteOverride objects for inequality.
public static bool operator !=(FontPaletteOverride left, FontPaletteOverride right)
Parameters
leftFontPaletteOverrideThe FontPaletteOverride on the left side of the operand.
rightFontPaletteOverrideThe FontPaletteOverride on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.