GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Transforming primitives within a segment, using GSSCT

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



In the same way that you can apply a transform to a segment, the call GSSCT sets a current transform that is applied to all the primitives that follow the call. The current transform is a primitive attribute, but is described in this topic because the call can only be issued within a currently open segment, and is carried out in relation to the origin of the segment. Here is a typical call:


            /* Scaling  Shearing  Rotation  Displacement Type */
     CALL GSSCT( 1,1,     0,1,      1,0,        0,0,       0 );

The parameters are similar to those for the call GSSAGA, covered in "Transforming segments, using GSSAGA or GSSTFM" in topic 9.4. See that section for an illustration of the effect of transforms, and the meaning of the parameters. The last parameter specifies the type of transformation:

0
New. The specified transformations are applied to the original primitives; any previous GSSCT call for this segment is ignored.

1
Additive. Any previous current transforms for this segment are applied first, and then the ones specified in this call are applied to the result.

2
Preemptive. The transformations specified in this call are applied first, and then any previously specified current transforms are applied to the result.

The transformations in a single GSSCT call are applied in the order in which the parameters are coded: scaling, shearing, rotation, displacement.

If you want to save the old current transform that was in existence before a new GSSCT call, you can do so by initially ensuring that attribute mode is set to preserve attributes, by either using the GSAM call, or allowing GSAM to default if it has not been previously set. The old transform is stored when you call GSSCT, and can subsequently be restored using GSPOP. GSAM and GSPOP are covered in "Storing and restoring graphics-attribute values, using GSAM and GSPOP" in topic 2.7.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012