To use GKS segmentation, first a segment must be created by calling:
CALL GCRSG(SGNA)where SGNA is an integer segment name. A segment called SGNA will be created on all active workstations, including WISS, and will remain open and store all primitives and attributes which are output until one calls:
CALL GCLSGOnly a single segment may be open at one time.
Segments may be renamed, or deleted on a particular workstation or all workstations by the following calls:
CALL GRENSG(SGNOLD, SGNNEW) CALL GDSGWK(WKID, SGNA) CALL GDSG(SGNA)Once a segment has been deleted the same segment name may be re-used. Note that the Clear Workstation function deletes all the segments stored in WDSS on that workstation.
The following fragment of code shows the use of segments.
See also the example in Appendix on Page
.
---------
---------
CALL gcrsg(1) ! Create segment 1
CALL objone ! Draw an object
CALL gclsg ! close segment
CALL gcrsg(2) ! Create segment 2
CALL objtwo ! Draw an object
CALL gclsg ! Close segment
---------
---------
---------
CALL guwk(wkid, gperfo) ! Update Workstation
---------
---------