typedef struct _XLATEOBJ { ULONG iUniq; FLONG flXlate; USHORT iSrcType; USHORT iDstType; ULONG cEntries; ULONG *pulXlate; } XLATEOBJ;
The XLATEOBJ structure is used to translate color indices from one palette to another.
Value |
Meaning |
XO_TRIVIAL |
Source indices are usable as target indices. |
XO_TABLE |
A table is provided to translate source indices to target indices. This flag will always be set for 1-, 4-, and 8-bbp source bitmaps. |
XO_TO_MONO |
Source indices are translated to a monochrome format with the special property that all indices map to zero, except for one. A driver can use this to accelerate a block transfer. |
Value |
Meaning |
PAL_INDEXED |
Indexed palette. |
PAL_BITFIELDS |
Palette is defined by 3 masks. |
PAL_RGB |
8 bits for each of R, G, B; least significant byte is R. |
PAL_BGR |
8 bits for each of B, G, R; least significant byte is B. |
If the source palette is not one of these types, the driver should not attempt
to download the palette description.
The destination palette always belongs to the destination surface of some drawing operation. The source palette is an application-selected palette or a palette from another surface.
The XLATEOBJ structure is used to translate color indices that refer to the source palette to indices for the destination palette. The resulting index identifies a color that matches the source color as closely as possible.