HP (Hewlett-Packard) HP-UX Time Clock User Manual


 
a technicolor effect, the application whose colormap was last downloaded in the hardware colormap
would look correct.
Accessing HP Color Recovery Technology via Xlib
Color Recovery is a technique to generate a better picture by attempting to eliminate the graininess
caused by dithering. Access to the Color Recovery capability is transparent when using a 3D graphics
API such as Starbase, HP-PHIGS or PEX. If you are producing graphics using Xlib calls, your
application must perform some of the necessary processing. At server startup (if Color Recovery is not
disabled in the X*screens file), the following properties are defined and placed on the root window:
_HP_RGB_SMOOTH_TRUE_MAP
_HP_RGB_SMOOTH_PSEUDO_MAP
_HP_RGB_SMOOTH_MAP_LIST
These properties are of type RGB_COLOR_MAP and carry pointers to structures of type
XStandardColormap. They may be interrogated with calls to XGetRGBColormaps. The colormaps in the
_HP_RGB_SMOOTH_TRUE_MAP and _HP_RGB_SMOOTH_PSEUDO_MAP structures identify
colormaps which are created at server startup and are for use with the TrueColor and PseudoColor
visuals, respectively. They are both initialized to contain the 3:3:2 ramp of 8-bit TrueColor. Neither of
these colormaps can be modified as they are read-only. The property _HP_RGB_SMOOTH_MAP_LIST
is a list of colormaps that are associated with all of the root window's visual IDs that support Color
Recovery. When the XGetRGBColormaps routine searches this list for a colormap with a visual ID that
matches the visual ID that your window is using and it finds one, your application knows that your
visual supports Color Recovery, and uses that colormap for any Color Recovery window in your
window's visual.
____________________________________________________________________________________
Note: The algorithm used for the Color Graphics device is slightly different from that used for the
HCRX family of devices. If you do not wish for your application to have to do device-specific checks,
HP recommends that you use the HCRX encoding algorithm for Color Recovery regardless of the
device on which your application is executing. The results on the Color Graphics device will not be
optimal, but will generally still be much better than a standard dither. If you are willing to do device-
specific checks, the existence of either the _HP_RGB_SMOOTH_TRUE_MAP or
_HP_RGB_SMOOTH_PSEUDO_MAP property will indicate the device is Color Graphics.
____________________________________________________________________________________
Color Recovery uses all 256 entries of one of the available colormaps. The color visual used by Color
Recovery emulates the 24-bit TrueColor visual; thus, the colors red, green, and blue are typically
declared as integers in the range from 0 to 255. Each window that uses Color Recovery will have the
same colormap contents.
For Color Recovery to produce the best results, the emulated 24-bit TrueColor data is dithered as
explained below.
Graphics Administration Guide for HP-UX 10.20
Page 52