2.1 Summary

The SGPACK has integrated the other packages in GRPH1 to provide an interface that is easy to use. SGPACK contains control routines that control devices and page formats, routines for coordinate transformation, and routines for drawing basic elements (output primitives) of graphics.

The following are examples of output primitives.

Other secondary primitives are also available.

Five of the six primitives (excluding the tone primitive) all consist of line segments. The tone primitive fills a polygon by either hard fill or soft fill according to the capability of the output device. Soft fill is performed by drawing lines inside the polygons. In GRPH1, each primitive can be defined for the user-defined coordinate (UC), the virtual rectangular coordinate (VC), and the normalized rectangular coordinate (RC).



The 6 primitives have the following attributes.

1.
The polyline primitives have
2.
The polymarker primitives have
3.
The text primitives have
4.
The tone primitives have
5.
Line sub-primitives have
6.
Arrow sub-primitives have
These attributes can be specified separately, or all at once. (See Sections 2.6, 2.7, 2.8, 2.9, and 2.10).



The rules of nomenclature for the subroutine name defining each primitive are as follows.

1.
The first 2 characters are SG.
2.
When setting/inquiring an attribute, the 3rd character is s (set)/ q (query).
3.
The abbreviations for the name of each primitive follows. They are,
4.
If a routine that defines (outputs) a primitive specifies the attribute at the same time, it is followed by z.
5.
The name is further followed by u (U-coordinate), v (V-coordinate) or r (R-coordinate) depending on the system in which the primitive is defined.
6.
When an attribute of the primitive is set/inquired, the 6th character represents the attribute.