Every segment has a set of attributes. These should not be confused with
the graphics attributes of the contained primitives. Segment attributes
are properties of the group of primitives as a whole. They determine such
things as whether the segment can be transformed (that is, moved, scaled,
or rotated) and whether it is visible or invisible.
A segment acquires the attributes that are current when it is opened.
Opening a segment creates a default graphics field if none exists already.
A default set of segment attributes becomes current initially, when a
graphics field is defined or created by default.
You set the current segment attributes one at a time, using the GSSATI
call. For instance, this call sets the current value of the visibility
attribute to invisible:
CALL GSSATI(2,0); /*Make subsequently opened segments invisible*/
The first parameter specifies the type of attribute that is being set, and
the second the value it is being set to. Valid types and values are:
- 1
- Detectability. This determines whether a segment can be selected by
a pick graphics input device (described in "Writing interactive
graphics applications" in topic 11.0). The second parameter means:
- 0
- Segment cannot be picked. This is the default.
- 1
- Segment can be picked.
- 2
- Visibility. The second parameter means:
- 0
- Segment is invisible.
- 1
- Segment is visible. This is the default. Only a visible
segment can be selected by a pick device.
- 3
- Highlighting. The second parameter means:
- 0
- Segment is not highlighted. This is the default.
- 1
- Segment is highlighted by being made white.
- 4
- Transformability. The second parameter enables you, for your own
reference, to mark segments as transformable or nontransformable. It
does not actually affect the transformability of segments - all
segments can be transformed.
- 1
- Segment is marked as nontransformable. Segment is not to be
moved, scaled, rotated, or sheared. This is the default.
- 2
- Segment is marked as transformable. The segment can be moved,
scaled, rotated, or sheared.
- 5
- This type has no effect in the current release. It should always be
set to either 0 or 1.
- 6
- Chained or nonchained attribute. This determines whether a segment
is included in the drawing chain. By default, segments are added to
the drawing chain when they are created. They are subsequently drawn
in the order that they appear on the drawing chain, unless you change
their priority (see "Drawing chain and segment priority" in
topic 9.6). An example of the use of the chaining attribute is to
exclude called segments from the drawing chain until they are called.
See "Calling segments from other segments, using GSCALL" in topic 9.7
for more details. The second parameter means:
- 0
- The segment is excluded from the drawing chain. It can be
included in the drawing chain only when called by another
segment.
- 1
- The segment is included in the drawing chain. This is the
default.
You can change the attributes of the current segment or any other segment
in the current graphics field by a GSSATS call. A typical call is:
CALL GSSATS(7,2,0) /* Make segment 7 invisible */
The first parameter is the segment identifier. The second and third
parameters can have the same values, with the same meanings, as the two
parameters of GSSATI.
Subtopics:
|