1GEVAL_TRAN_MATRIX(3NCARG) NCAR GRAPHICS GEVAL_TRAN_MATRIX(3NCARG)
2
3
4
6 geval_tran_matrix (Evaluate transformation matrix) - Constructs a GKS
7 segment transformation matrix starting from a given point, a shift vec‐
8 tor, a rotation angle, and X and Y scale factors.
9
11 #include <ncarg/gks.h>
12
13 void geval_tran_matrix(const Gpoint *point, const Gvec *shift, Gdouble
14 angle, const Gvec *scale, Gcoord_switch coord_switch, Gtran_matrix
15 tran_matrix);
16
18 point.x (Gfloat, Input) - An X coordinate value for a fixed point
19 to be used for the scaling and rotation parts of the output
20 transformation. point.x is either in world coordinates or
21 normalized device coordinates depending on the setting of
22 the argument coord_switch described below.
23
24 point.y (Gfloat, Input) - A Y coordinate value for a fixed point to
25 be used for the scaling and rotation parts of the output
26 transformation. point.y is either in world coordinates or
27 normalized device coordinates depending on the setting of
28 the argument coord_switch described below.
29
30 shift.delta_x
31 (Gfloat, Input) - The X component of a shift vector to be
32 used for the scaling part of the output transformation.
33 shift.delta_x is either in world coordinates or normalized
34 device coordinates depending on the setting of the argument
35 coord_switch described below.
36
37 shift.delta_y
38 (Gfloat, Input) - The Y component of a shift vector to be
39 used for the scaling part of the output transformation.
40 shift.delta_y is either in world coordinates or normalized
41 device coordinates depending on the setting of the argument
42 coord_switch described below.
43
44 angle (Input) - The rotation angle, in radians, to be used for
45 the rotation part of the output transformation.
46
47 scale.delta_x
48 (Gfloat Input) - An X coordinate scale factor to be used in
49 the scaling part of the output transformation.
50
51 scale.delta_y
52 (Gfloat Input) - A Y coordinate scale factor to be used in
53 the scaling part of the output transformation.
54
55 coord_switch
56 (Input) - A coordinate switch to indicate whether the val‐
57 ues for the arguments shift and scale (described above) are
58 in world coordinates or normalized device coordinates.
59 Possible values include:
60
61 GCOORD_WC
62 World coordinates
63
64 GCOORD_NDC
65 Normalized device coordinates
66
67 tran_matrix (Gfloat, Output) - A 2x3 array that contains
68 the GKS transformation matrix in a form that
69 can be used as input to other GKS functions
70 such as gset_seg_tran.
71
73 If world coordinates are used, the shift vector and the fixed point are
74 transformed by the current normalization transformation.
75
76 The order of the transformation operations as built into the output
77 matrix is: scale (relative to the fixed point); rotate (relative to the
78 fixed point; shift.
79
80 Elements tran_matrix[0][2] and tran_matrix[1][2] are in normalized
81 device coordinates and the other elements of tran_matrix are unitless.
82
84 The following code
85
86 pi = 3.1415926;
87 point.x = point.y = 0.5;
88 shift.delta_x = 0.25;
89 shift.delta_y = 0.;
90 scale.delta_x = 0.5;
91 scale.delta_y = 1.5;
92 geval_tran_matrix(&point,&shift,45.*pi/180.,&scale,GCOORD_WC,tm);
93
94 would produce a transformation matrix in tm that would: scale the X
95 coordinates by .5, scale the Y coordinates by 1.5 (relative to the
96 fixed point of (.5,.5) ); rotate by 45 degrees (relative to the fixed
97 point (.5,.5) ); and shift by .25 in X and 0. in Y. The input values
98 for the fixed point and shift vector are in world coordintes.
99
101 To use the GKS C-binding routines, load the ncarg_gks and ncarg_c
102 libraries.
103
105 Online: gaccum_tran_matrix(3NCARG), gclose_seg(3NCARG), gcre‐
106 ate_seg(3NCARG), gcopy_seg_ws(3NCARG), gdel_seg(3NCARG),
107 ginq_name_open_seg(3NCARG), ginq_set_seg_names(3NCARG),
108 gset_seg_tran(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG)
109
110 Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Funda‐
111 mentals, UNIX Version
112
114 Copyright (C) 1987-2009
115 University Corporation for Atmospheric Research
116 The use of this Software is governed by a License Agreement.
117
118
119
120UNIX March 1993 GEVAL_TRAN_MATRIX(3NCARG)