Render Extension Options Dialog Box

From this dialog box, you can set the colormap policy. This policy controls how the Render extension allocates colors when it draws pictures in dynamic, indexed visual types (specifically, GrayScale and PseudoColor).

A picture consists of a drawing surface (a core X window or pixmap), and a picture format that controls how pixel data is interpreted. If the surface is a window, the picture format always corresponds to the window's visual. If the surface is a pixmap, the picture format can correspond to any visual, or it can be just Alpha data used in conjunction with another picture.

Picture formats that correspond to indexed visuals have a colormap associated with them. If the visual is the same as the screen's default visual, the screen's default colormap is used. In this case, the Render extension allocates colors based on the colormap policy setting and the number of available (unallocated) pixels in the colormap. If the visual is not the same as the screen's default visual, a new colormap is allocated for use by all pictures of that visual type, and colors are allocated as if the setting were All.

Colormap policy

Default

The Render extension chooses an appropriate colormap policy according to the depth and type of the associated visual (see the individual colormap policy descriptions for more information):

 

For this visual/depth type

This colormap policy is used

 

8 or higher/PseudoColor

Color

 

8 or higher/GrayScale

Gray

 

All others

Mono

Mono

Allocates only black and white colors (two entries).

Gray

Extends Mono to include 11 intermediate grayscale colors between black and white (13 entries).

Color

Extends Gray to include colors found in a 4x4x4 color cube. This color cube includes combinations of red, green, and blue at four intensities between fully off and fully on.

The intensities (over the range of 0x00 - 0xFF) are 00, 55, AA, and FF. The color cube overlaps the Mono and Gray colors at RGB=000000, 555555, AAAAAA, and FFFFFF. Sixty-four colors are allocated for the color cube plus nine other intermediate grayscale colors (73 entries).

All

Allocates the largest possible color cube (up to 6x6x6) and then allocates as many additional grayscale colors within the cube as possible.

For example, a depth 8 visual (with 256 colormap entries available) would be allocated as follows:

  • 6x6x6 cube = 216 entries
  • Intermediate grayscale entries, 8 per cube grayscale segment x 5 segments = 40 entries

On the grayscale, then, the following RGB values are allocated (rounding to 8-bit quantities):

  • 000000 (part of 6x6x6 cube)
  • 060606 (intermediate grayscale)
  • 0B0B0B
  • 111111
  • 171717
  • 1C1C1C
  • 222222
  • 282828
  • 2E2E2E
  • 333333 (part of 6x6x6 cube)
  • 393939 (intermediate grayscale)
  • 3F3F3F