The HPGL VIEW widget displays HPGL graphics files. HPGL VIEW supports the following (most frequently used) HPGL commands. HPGL commands that are not implemented are ignored by the HPGL VIEW widget.
·
IP
·
IW
·
PA
·
PD
·
PR
·
PU
·
SP
The HPGL VIEW widget provides functionality similar to the PRINTER widget, but allows you to display plotter graphics commands instead of text. For example, execute the following code to create an HPGL VIEW widget and set it to display the file "Graffile" (an arbitrary HPGL graphics file). If the file is not found or it is not an HPGL file, an error message is generated.
ASSIGN @Hpgl TO WIDGET "HPGL VIEW" CONTROL @Hpgl;SET ("HPGL FILE":"Graffile")
For an HPGL VIEW widget to display graphics generated by an HTBasic program, you first redirect the output to a file with PLOTTER IS statement, and then set the widget to that file.
The HPGL VIEW widget supports only a subset of all HPGL commands. For example, area fills are not supported and files that include them will not display correctly.Since the RETAIN RASTER attribute default setting is 0, any repainting will require rereading the file. However, if you set RETAIN RASTER to 1, HTBasic will take a snapshot of the pixels and retain them. Thus, repaints will be drawn from memory instead of from the file.
Events
The event for the HPGL VIEW widget is:
·
SYSTEM MENU
SYSTEM MENU
This event is generated when the operator selects items from the SYSTEM MENU.