OGLSetPlotColorScheme
int OGLSetPlotColorScheme (int panelHandle, int OGLControlId, int plotHandle, int colorScheme, const ColorMapEntry *colorMapEntries, int numberOfColors, int highColor, int interpolateColors, const int *colorArrayEntries, int xSize, int ySize);
Purpose
Sets the color scheme to be used when the plot is drawn and also sets the data that may be required for each of those color schemes.
You also can use OGLSetPlotAttribute to set the color scheme and the data required.
Parameters
Input | ||||||||||||||||||
Name | Type | Description | ||||||||||||||||
panelHandle | int | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
||||||||||||||||
OGLControlId | int | The ID of the control on which the plot is drawn. This is the ID returned by OGLNewCtrl or OGLConvertCtrl. | ||||||||||||||||
plotHandle | int | The handle of the plot to be deleted. This is the handle returned by OGLPlot3DScatter or OGLPlot3DUniform. | ||||||||||||||||
colorScheme | int | The color scheme for the plots overrides the surface color if the value of OGLATTR_SURFACE_STYLE is not OGLVAL_NONE. Otherwise, it overrides the wire color if OGLATTR_WIRE_STYLE is not OGLVAL_NONE. If both the above attibutes are OGLVAL_NONE, then the color scheme overrides the point color. In the following explanation of the color schemes, default color denotes the color that is overridden.
|
||||||||||||||||
colorMapEntries | const ColorMapEntry * | An array of ColorMapEntry structures. Each ColorMapEntry structure contains: typedef struct union char valChar; } dataValue; } ColorMapEntry; The Color Map array defines how data values in the Z Array are translated into color values. If a data value matches exactly to a data value in one of the ColorMapEntry structures, then it is converted to the corresponding color. Otherwise:
If there is no higher value, then the color specified in the highColor parameter is used. The Color Map entries do not need to be in sorted order. |
||||||||||||||||
numberOfColors | int | Specifies the number of entries in the Color Map array. | ||||||||||||||||
highColor | int | The RGB value to which all Z Array values that are higher than the highest data value in the Color Map array are translated. | ||||||||||||||||
interpolateColors | int | Indicates how to assign colors to Z Array data values that do not exactly match the data values in the Color Map array. If you specify a nonzero value or select Yes in the function panel, then the data value is assigned a color computed using a weighted mean of the colors associated with the Color Map data values above and below the Z Array data value. Specify 0 or select No in the function panel, then the data value is assigned the color associated with the next higher Color Map data value. The following rules apply regardless of the value of interpolateColors?:
|
||||||||||||||||
colorArrayEntries | const int * | Specifies an array of colors for each data point in the plot. The array is interpreted as a two dimensional array of size YSize x XSize. The color value of the point at position {x, y} in the data array is the value of the color array entry at {x mod XSize, y mod YSize}. | ||||||||||||||||
xSize | int | The X Size of the color array. | ||||||||||||||||
ySize | int | The Y Size of the color array. |
Return Value
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred.Error Codes
|
Additional Information
Library: OpenGL 3D Plotting Control
Include file: custctrl\cviogl.h
LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later