|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This class contains GPE color conversion support. The base ColorConverterclass is defined in the Swconvrt.cpp file. This converter enables translation among any combination of source and destination surface pixel types at the time that bit blocks are written to the display.
Pixel formats for surfaces conform to one of the following types:
When display drivers call GPE functions with XLATEOBJpointer parameters, the functions create and initialize ColorConverterobjects to handle any color conversion. Alternatively, based upon the value of the XLATEOBJmember iUniq, the functions may use a cached ColorConverterobject from a previous call.
The ColorConverterobject populates two pointers: pLookupand pConverter. If both are NULL, no conversion is required because the source and destination formats are compatible and palettes, if any, are identical.
If pLookupis not NULL, the operation must convert each source pixel to a destination pixel, using the source pixel value as an index into the lookup table. If pConverteris not NULL, it is the address of a function that is called to convert a source pixel to a destination pixel. Use this when source and destination formats are incompatible and the source format is not indexed. At most, either pLookupor pConverteris set to non-NULL. Note, even if two palettes contain the same entries, the palletes are not considered to be the same if one palette is mutable and the other is not.
Because color conversion is an optional feature for Windows CE, you can reduce or remove part or all of the feature in order to reduce the size of the driver. However, if you choose to alter the conversion feature, be sure to author all bitmaps provided for the platform to a bit depth or palette that is supported by the display driver. The current size of the complete color converter is slightly over 2 KB when compiled without debugging symbols.
Last updated on Tuesday, July 13, 2004