If you have the TCL/GWM widget enabled it will be used when any ‘xwindows’ output is produced by a Starlink graphics program, whether the requirement is to display a colour image or a simple line plot.
The TCL/GWM widget can be invoked by the standard graphics system and can be generated with an overlay if required, in the same manner as the standard GWM ‘xwindows’ display. Those graphics programs that automatically generate a display ‘xwindows’ can use the TCL/GWM widget if it is available.
A typical TCL/GWM widget might be generated thus:
where %
is the shell prompt. This will generate a widget with 128 colours allocated called
xwindows
If you need an overlay plane (e.g. to plot contour maps over images) you can use the -overlay
switch:
A full list of the TCL/GWM widget command switches is given in SUN/186.
The main window of the TCL/GWM widget is by default the standard GWM ‘xwindows’ size with buttons along the bottom which activate the facilities available. Along the bottom and down the right side are the scroll bars (a widget with an overlay plane has two sets of scroll bars, the inner set for the overlay and the outer set for the main plotting surface.)
In order across the bottom, the buttons are:
Exit
Colours
Clear
Clear Overlay
Capture
Print
Crosshair
Help
The Gwm Colours dialog box provides a mechanism which allows you to alter the colours on the plotting surface. You can change the colours using the Red, Green and Blue sliders, and you can select which colour or pixel value to alter by selecting the appropriate button.
Background:
Foreground:
Other:
Pixel value
slider which enables you to select any of the
colours or pixel values to change, including 0 (background), 1 (foreground) and the
overlay (if you have one enabled).
Overlay:
Overlay
button.
Crosshair:
OK:
Help:
Pixel value:
Other
button selected, this slider selects which colour
or pixel value is to be modified.
Red, Green, Blue:
The Gwm Colours dialog box can be left on screen while plots are being made to the TCL/GWM widget.
The Gwm JPEG dialog box allows you to dump the plot currently on the plotting surface to a named JPEG file. You can also select the image quality.
Image quality:
Progressive:
Filename:
.jpg
but
this widget does NOT supply any default extension.
OK:
Cancel:
Help:
The Filename
is the only entry you must fill in, there is no default filename for the dump.
When you have chosen and entered a filename, select the OK
button to capture the plot and complete
the dump to JPEG file.
The Gwm Print dialog allows you to create a print file in a specified format with a chosen filename. The file can be printed later on an appropriate printer.
Format:
As Window: / Colour:
Filename:
.ps
extension
and Encapsulated PostScript files are given a .eps
extension. HP InkJet dump files
may be given a .dat
extension.
OK:
Cancel:
Help:
To create a print file, select a format, background colour and filename, then select the OK
button. The
dump will be started and the control returned to the TCL/GWM widget. While the print is
being captured, the Capture
and Print
buttons on the TCL/GWM widget are greyed out,
indicating that the functions are unavailable. When the print capture and dump has completed,
the buttons return to normal and it is then OK to send more plotting commands to the
widget.