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
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)
xo (specified by user) (short floating point) yo (specified by user) (short floating point)
dx (specified by user) (short floating point) dy (specified by user) (short floating point)
phi (specified by user) (short floating point)
fx (specified by user) (short floating point) fy (specified by user) (short floating point)
sw (specified by user) (fullword integer)
mout (returned by GDDM) (array of short floating-point numbers)
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: 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
|
Copyright IBM Corporation 1990, 2012 |