HP Visualize J5000 hp workstations - hp-ux 10.20 graphics administration guide - Page 52

Accessing HP Color Recovery Technology via Xlib, HP_RGB_SMOOTH_TRUE_MAP, HP_RGB_SMOOTH_MAP_LIST

Page 52 highlights

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 devicespecific 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. Page 52 Graphics Administration Guide for HP-UX 10.20

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171

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