| United States-English |
|
|
|
![]() |
HP-UX Starbase Device Drivers Manual - Vol1: HP 9000 Series 700 Computers > Chapter 3 The HCRX Family of Device DriversDevice Support for the TrueColor Visual |
|
A TrueColor visual can be thought of as having a READ-ONLY color map where, for any given pixel value, about one third of the bits are used to describe each of the red, green, and blue colors, respectively. For an 8-plane TrueColor visual, 3 bits describe the red component, 3 bits describe the green component, and 2 bits describe the blue component. A 12-plane TrueColor visual uses 4 bits each to describe the red, green, and blue components. A 24-plane TrueColor visual uses 8 bits each to describe the red, green, and blue components. This is illustrated as follows: The following example refers to an 8-plane TrueColor visual; however, the example can be expanded to apply to 12-plane or 24-plane TrueColor visuals. Since the red and green components consist of 3 bits each, there are 8 different shades of red and 8 different shades of green available. Also, there are 4 different shades of blue represented by 2 bits. As the component increases, the intensity of that color increases. For example, a red component of 000 represents no red and a red component of 111 represents full red. Therefore, pixel value 0 is 000 red, 000 green, and 00 blue which results in black and pixel value 255 is 111 red, 111 green, and 11 blue which results in white. These and other examples are shown in . Table 3-3 Examples of Pixel Color Values
Note that the red, green and blue intensities for the color shades ramp uniformly between 0 and 255. Note that the TrueColor Visual always uses a shade_mode of CMAP_FULL. When the TrueColor visual window is gopened, your application will automatically be in CMAP_FULL mode and the shade_mode call will ignore any attempts to go into another mode. With the addition of the TrueColor visual at the 9.03 release of HP-UX, you need to consider the following information:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||