Creates a simple widget that can be usedinteractively to modify a PV-WAVE color table.
Position A two-element vector specifying the x- and y-coordinates of the upper-left corner of the CtTool window (long integer). The elements of the vector are [x, y], where x (horizontal) and y (vertical) are specified in pixels. These coordinates are measured from the upper-left corner of the screen.
Title A string containing the title that appears in the header of the window. Default value is "Color Table Tool".
Background Specifies the background color name.
Figure 2-153 The WgCtTool window lets you interactively modify system color tables by stretching, rotating, and reversing them.
Figure 2-154 The WgCtTool window lets you interactively modify system color tables by stretching, rotating, and reversing them.
Most color table procedures maintain the current color table in a common block called
Colors
, defined as follows:
COMMON Colors, r_orig, g_orig, b_orig, $ r_curr, g_curr, b_curr
r_curr
, g_curr
, and b_curr
.
Stretch Bottom
number is used for the first parameter to the STRETCH command, and the Stretch Top
number is subtracted from the number of colors available in the color table to determine the second parameter to the STRETCH command. For more information about the STRETCH command, refer the description for STRETCH in the PV-WAVE Reference.
Because system color tables are "read-only", no system color table will be permanently altered by any changes you make with the CtTool window. For this reason, the changes you make with CtTool are temporary and can be overwritten by any other PV-WAVE routine writing to the
Colors
common block.
NOTE: To save color table changes for later use, you can use another utility widget, WgCeditTool.
parent
is defined, WgCtTool is created as a child of parent
; otherwise, WgCtTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgCtTool window, close it by clicking the
Dismiss
button.
PRO Sample_wgcttool, parent, tool_shell IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgCtTool, parent, tool_shell
ENDIF ELSE BEGIN WgCtTool
ENDELSE END
For more information about color table indices, refer to Experimenting with Different Color Tables in Chapter 11 of the PV-WAVE User's Guide.
For more information about color systems, refer to Understanding Color Systems in Chapter 11 in the PV-WAVE User's Guide.
For more information about how to write an application program based on WAVE Widgets, refer to Chapter 5, Using WAVE Widgets, in the PV-WAVE GUI Application Developer's Guide. For more information about how to write an application program based on the PV-WAVE Widget Toolbox, refer to Chapter 6, Using the Widget Toolbox, in thePV-WAVE GUI Application Developer's Guide.