Functions | |
void | Set_Color_Map (const char *colors) |
void | Set_Color_Map_By_Value (const char *color_space, int count, const HC_RGB *values) |
void | UnSet_Color_Map (void) |
void Set_Color_Map | ( | const char * | colors | ) |
Sets up the colors to be used when displaying Images or "by index" color attributes.
colors | - A (long!) string that contains English descriptions of the desired colors, separated by commas within the string. Note that the "by value" routines below are the ones most people use. |
A Color Map is simply a list of colors. If, for example, an Image or a Set Color By Value refers to "index 0", the system indexes into the very first entry in that current Color Map list and uses the color it finds there. This lookup occurs each time the picture is updated, not just at the time the image or set-by-index was declared.
The "list of colors" (for consistency with the rest of the color routines) can be defined in English. For example: "red, blue, green, white, black" defines a color map of length 5. But more commonly you would use the Set_Color_Map_By_Value() entry point, and pass a large array of computed numeric values. See Set_Color_By_Value() for more details on color spaces and the formats of these numbers. A value of "*" in a color map means that the color should be inherited from the segment in which the geometry resides.
Color space can be any one of the following:
-------------------------------------------------------------------------------------- "HLS" For hue, lightness, and saturation (a "double cone", with black and white at the tips). "HSV" For hue, lightness, and value (a "single cone" standing on its point, with black at the tip and white at the center of the base). "HIC" For hue, intensity, and chromaticity (a cylinder, with black and white at the two ends). "RGB" For red, green, and blue (a cube, with white, black, and six primary colors at the corners). --------------------------------------------------------------------------------------
All values must be in the range of zero to one inclusive, except for hues, which range from zero to 360 degrees. If a hue is outside this range, the system will normalize the value.
void Set_Color_Map_By_Value | ( | const char * | color_space, | |
int | count, | |||
const HC_RGB * | values | |||
) |
Similar to Set_Color_Map(), but operates with a color values rather than names or map indices.
color_space | - Special constant---either "HLS", "HSV", "HIC", or "RGB". Note that the constant is a quoted string. Upper case versus lowercase is not significant. | |
count | - The number of colors contained in the values array. | |
values | - An array of triples (the same format as the array in Insert_Polyline() ) in the selected color space (see details below). |
void UnSet_Color_Map | ( | void | ) |
Removes all settings established by a previous call to Set_Color_Map().