Creates afull-featured set of menus and widgets enclosed in a window; this window allows you to edit the values in PV-WAVE color tables in many different ways.
Position A two-element vector specifying the x- and y-coordinates of the upper-left corner of the CeditTool 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 CeditTool window. Default value is "Color Editor".
Background Specifies the background color name.
You use a palette of color cells to select the current color point to the color that interests you and click the left mouse button to select it. In this sense, the CeditTool window is like an artist's palette, where basic colors are mixed to produce different colors.
You can use either the RGB, HLS, or the HSV color system to create a new color table, and you can view the result as a color bar or as a set of three intensity graphs. You can store color tables you have modified as custom color tables, and they will be available for your later use.
In some ways, the WgCeditTool window is similar to the WgCtTool window, in that it provides easy ways to interactively modify color tables. For example, with just a few clicks, you can use the WgCeditTool window to edit individual colors in the color table. Or you can use the Options menu to open several other utility widgets. But if you do not need all the options of the WgCeditTool window, or if you just need a quick way to stretch or reverse a color table, then use the WgCtTool window, instead.
Figure 2-149 The WgCeditTool window lets you use the mouse to create a new color table based on either the HLS, HSV, or RGB color systems.
Figure 2-150 The WgCeditTool window lets you use the mouse to create a new color table based on either the HLS, HSV, or RGB color systems.
By default, WgCeditTool uses as many colors in the color table as are currently available in the workstation's colormap. This number depends on the colors that have already been allocated by other applications running on that workstation.
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
.
.wg_colors
. This file is placed in your home directory, which in UNIX is defined by $HOME
, and in OpenVMS is defined by SYS$LOGIN
.
CAUTION: Do not attempt to edit the.wg_colors
file doing so could lead to unpredictable results.
Selected Color
text field. To modify the selected color, either enter a new color value in one of the text fields, or use the slider to change the value. If you enter a new color value into a text field, press Return to apply the new value to the slider and the color cell that corresponds to the selected color. If you use the sliders, the change is applied immediately as the slider moves.Ramp Start
and Ramp End
text fields or use the mouse to select the ramp's starting and ending colors. (To use the mouse, click the left mouse button on the starting color cell and the middle mouse button on the ending color cell.) Select Edit=Ramp on the CeditTool window. The affected cells in the displayed color table are updated immediately, although no permanent change is made until you save the color table as a custom color table.
Ramp Start
and Ramp End
on the previous page for more information about choosing start and end ramp colors.
The characteristics you can adjust in the vertical slider are value (in the HSV color system) or lightness (in the HLS color system).
TIP: The farther you click from the center of the wheel (with the left mouse button), the more saturated the color (for that particular hue).
If you have any other CeditTool options displayed on your screen, like the color wheel, you will see immediate effects as the color table shifts in relation to the mouse's movement.
NOTE: As you "slide" colors into different color table indices, the colors that "scroll off" the end of the table are added to the opposite end.
Ramp Start
and Ramp End
.
Figure 2-151 Utility widgets accessible via WgCeditTool's Options menu. The four utility widgets are (starting from the upper left, proceeding clockwise): 1) intensity graphs, 2) a color bar showing the entire range of the color table, 3) a color bar showing only a selected range of the color table (range modifiable by user), and 4) a color wheel and slider that can be used to interactively modify the current color. For more information about any of these utility widgets, refer to the Options Menu section.
Figure 2-152 Utility widgets accessible via WgCeditTool's Options menu. The four utility widgets are (starting from the upper left, proceeding clockwise): 1) intensity graphs, 2) a color bar showing the entire range of the color table, 3) a color bar showing only a selected range of the color table (range modifiable by user), and 4) a color wheel and slider that can be used to interactively modify the current color. For more information about any of these utility widgets, refer to the Options Menu section.
parent
is defined, WgCeditTool is created as a child of parent
; otherwise, WgCeditTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgCeditTool window, close it by selecting Controls=Exit.
PRO Sample_wgcedittool, parent, tool_shell IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgCeditTool, parent, tool_shell
ENDIF ELSE BEGIN WgCeditTool
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 of 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 the PV-WAVE GUI Application Developer's Guide.