Back|Forward
DCL:GRPH1:SGPACK: User Interface
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.
- Polyline
- Polymarker
- Tex:
- Tone
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
- Line type of polyline
- Line index of polyline
- 2.
- The polymarker primitives have
- Marker type
- Line index for drawing marker
- Marker size
- 3.
- The text primitives have
- Character height
- Angle of rotation of the character string
- Centering option for the character string
- Line index for drawing characters
- 4.
- The tone primitives have
- 5.
- Line sub-primitives have
- Line index of line segment
- 6.
- Arrow sub-primitives have
- Line type of arrow axis
- Line index of arrow axis
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,
- pl : Polyline primitive
- pm : Polymarker primitive
- tx : Text primitive
- tn : Tone primitive
- ln : Line sub-primitive
- la : Arrow sub-primitive
- 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.
- t : Line type, marker type
- i : Line index
- s : Marker size, character height
- r : Angle of rotation of character string
- c : Centering option of character string
- p : Tone pattern index