Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Color
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
A printer driver must provide support for translating logical colors (RGB
values) to physical colors. For printers with color palettes, the printer
driver must provide additional information in its GDIINFO structure.
 
Color Objects
 
GDI calls the ColorInfo function to translate physical and logical color
representations. This function translates in both directions, that is, from
physical to logical and from logical to physical. When given a logical
color, the function returns the nearest physical color. When given a
physical color, the function returns the logical color that best describes
that color.
 
This function supports the GDI function GetNearestColor.
 
Color Palettes
 
GDI ignores the color palette members if the RC_PALETTE value is not set in
the dpRaster member. However, they must be present (and accounted for in the
length returned by Enable) if the driver is version 3.x.
 
 
                                      ♦