DWRITE_PAINT_COLOR structure (dwrite_3.h)
Represents a color in a color glyph.
Syntax
struct DWRITE_PAINT_COLOR {
DWRITE_COLOR_F value;
UINT16 paletteEntryIndex;
float alphaMultiplier;
DWRITE_PAINT_ATTRIBUTES colorAttributes;
};
Members
value
Type: DWRITE_COLOR_F
Color value (not premultiplied). See the colorAttributes member for information about how the color is determined.
paletteEntryIndex
Type: UINT16
If the colorAttributes member is set to DWRITE_PAINT_ATTRIBUTES_USES_PALETTE, then this member is the index of a palette entry in the selected color palette. Otherwise, this member is DWRITE_NO_PALETTE_INDEX (0xFFFF).
alphaMultiplier
Type: float
Specifies an alpha value multiplier in the range 0 to 1 that was used to compute the color value. Color glyph descriptions can include alpha values to be multiplied with the alpha values of palette entries.
colorAttributes
Type: DWRITE_PAINT_ATTRIBUTES
Specifies how the color value is determined. If this member is DWRITE_PAINT_ATTRIBUTES_USES_PALETTE, then the color value is determined by getting the color at paletteEntryIndex in the current color palette. The color's alpha value is then multiplied by alphaMultiplier. If a font has multiple color palettes, then you can set the current color palette using the IDWritePaintReader::SetColorPaletteIndex method. A client that uses a custom palette can use the paletteEntryIndex and alphaMultiplier methods to compute the color. If this member's value is DWRITE_PAINT_ATTRIBUTES_USES_TEXT_COLOR, then the color value is equal to the text foreground color, which can be set using the IDWritePaintReader::SetTextColor method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1809 (with Windows App SDK 1.2 or later) |
Header | dwrite_3.h |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for