GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


GACTM

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



Purpose



 GACTM
                                    
 (minp, xo, yo, dx, dy, phi, fx,
 fy, sw, mout)
   
 APL code  1418
 GKS RCP code  X'38006A00' (939551232)
   


Function: To accumulate transformation matrix.

Utility function. Composes a new transformation matrix from a pre-existing matrix and new input values for rotation, shift, and scale.

Parameters


minp (specified by user) (array of short floating-point numbers)
An existing transformation matrix. You can use the Inquire segment attributes (GQSGA) function to obtain the values for this parameter.

xo (specified by user) (short floating point)

yo (specified by user) (short floating point)
A given point, in world coordinates or normalized device coordinates.

dx (specified by user) (short floating point)

dy (specified by user) (short floating point)
A shift vector in world or normalized device coordinates. The shift vector moves the segment from one place to another on the display screen.

phi (specified by user) (short floating point)
The rotation angle in radians; a positive value indicates a counterclockwise direction.

fx (specified by user) (short floating point)

fy (specified by user) (short floating point)
The scale factors. These factors control the size of the segment on the display surface.

sw (specified by user) (fullword integer)
The coordinate switch. The possible values are:

0 (GWC)
World coordinates.
1 (GNDC)
Normalized device coordinates.

mout (returned by GDDM) (array of short floating-point numbers)
A segment transformation matrix in world or normalized device coordinates.


Operating states


GKOP, WSOP, WSAC, SGOP

Related functions


Evaluate transformation matrix (GEVTM), Set segment transformation (GSSGT)

Description


This function composes a new segment transformation matrix from the input matrix and the transformation defined by the input values for shift, rotation, and scale. The input segment transformation matrix minp can be a matrix previously defined either by this function or by Evaluate transformation matrix (GEVTM). The resulting new matrix is used, for example, in the functions Set segment transformation (GSSGT) and Insert segment (GINSG).

The identity matrix is stored with each segment in the segment state list when it is created. When you call GACTM or GEVTM, and then Set segment transformation (GSSGT), the newly created matrix replaces the matrix in the segment state list, and it controls the appearance of the segment until a new matrix is set. The effects of repeated applications of a matrix are not cumulative. Therefore you "accumulate" a matrix in order to retain the effects of a previous matrix while making further changes in the appearance of a display.

For example, you can display a segment at half its original size by scaling it in a transformation matrix calculated by calling GEVTM. If you then want to shift the scaled segment, GACTM takes the first transformation and adds the shift vector to it in the new matrix. You can shift the segment again, or scale it, or rotate it, by calls to GACTM and Set segment transformation (GSSGT).

The coordinate switch (sw) governs whether the shift vector and fixed point are given world coordinate units or normalized device coordinate units. If you use WC units, the shift vector and fixed point are transformed by the current normalization transformation.

The shift vector is entered as the relative displacement between two points. For example, if the input fixed point is (10.0, 10.0), and the segment transformation shifts the display to (25.0, 25.0), the shift vector is entered as (15.0, 15.0).

You enter the rotation angle in radians. To convert an angle in degrees to radians, you use the following equation:


     radians = pi/180 * degrees

For example, to rotate a display by 45 degrees, you enter 0.7853982 as the value for the rotation angle.

You enter identity values for those aspects that you do not want to change in any specific accumulation of matrixes. These are 0.0 (zero) for shift and rotation and 1.0 (one) for scale.

The segment transformation is stored as a matrix array with six elements. Point (x, y) is transformed into point (x', y') as follows:


   PICTURE 24          

The order of transformation is: scale, rotate, and shift. Scaling and rotation are performed relative to the input fixed point. Output values defining the shift components are in NDC units. The other elements have no units.

Principal errors


8
GKS not in proper state: GKS shall be in one of the states GKOP, WSOP, WSAC, or SGOP
2000
Enumeration type out of range

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012