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