|
Action:
|
Sets the color map for conversion.
|
|
|
Prototype:
|
outcome api_rh_set_conversion_colour_map (
|
|
|
LwInt32 r_max,
|
// red color map index
|
|
|
LwInt32 g_max,
|
// green color map index
|
|
|
LwInt32 b_max,
|
// blue color map index
|
|
|
LwInt32 r_mult,
|
// red color multiplier
|
|
|
LwInt32 g_mult,
|
// green color multiplier
|
|
|
LwInt32 b_mult,
|
// blue color multiplier
|
|
|
LwInt32 base_index
|
// base index
|
|
|
);
|
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "kernel/kernapi/api/api.hxx"
|
|
#include "rnd_husk/api/rnd_api.hxx"
|
|
#include "rnd_husk/include/rh_types.h"
|
|
|
Description:
|
This function describes the color map of the output device, and it takes the form of an RGB cube. An RGB cube is a 3D array containing an ordered spectrum of colors. The subscripts of an RGB cube are values representing the respective amounts of each red, green, and blue color component of a particular color.
|
|
|
Images are displayed on a display device using a color-map containing the spectrum of colors described by the RGB cube.
|
|
|
Display devices' color-maps are normally 1D arrays, with the subscript being a color-map index.
r_mult,
g_mult, and
b_mult are the multipliers for the respective RGB cube subscripts used to build a color-map index. The color-map index of a color within the RGB cube, with RGB cube subscript levels of
r,
g, and
b are
base_index + r x
r_mult + g
x
g_mult +
b x
b_mult.
|
|
|
When
LwConvertRGBScanline or
LwConvertRGBFloatScanline is called, the pixels' colors are converted into color-map indexes within the RGB cube.
|
|
|
This function's parameters describe the layout of a 3D array representing the RGB cube. Set
r_max,
g_max, and
b_max to the maximum number of different shades of each primary color in the RGB cube. Set
r_mult,
g_mult, and
b_mult to the multipliers for the respective components within the RGB cube when converting RGB levels into color-map indexes. Set
base_index to the start index of the RGB cube within the color-map. For a standard 8-bit display device, the values are typically:
r_max = 5,
g_max = 5,
b_max = 5,
r_mult = 36,
g_mult = 6,
b_mult = 1, describing a 216-color cube with six levels of each color component. Set
base_index to the index of the first entry of the cube in the map.
|
|
|
For the grey-scale conversion method only
r_max,
r_mult, and
base_index are significant.
|
|
|
For the monochrome conversion method, only
base_index is significant.
|
|
|
Set the conversion color-map for an image before calling
LwConvertImageStart. This function is ignored if it is called between calls to
LwConvertImageStart and
LwConvertImageEnd.
|
|
|
The default conversion color-map set by
LwInitialiseImageUtilities is a 6 x 6 x 6 RGB cube with parameters of
r_max = 5,
g_max = 5,
b_max = 5,
r_mult = 36,
g_mult = 6,
b_mult = 1, and
base_index = 0.
|
|
|
Library:
|
rnd_husk
|
|
|
Filename:
|
rbase/rnd_husk/api/rnd_api.hxx
|
|
|
Effect:
|
System routine
|