Rotate – AMT Datasouth PAL User Manual
Page 166

rotate
160
90 rotate
+X
+Y
0,0
-Y
-X
270 rotate
-X
-Y
0,0
+Y
+X
As the reader can see from the diagrams, with the origin at its default position, only zero rotation
places the +X, +Y quadrant over the page. Although PAL fully supports drawing using negative
coordinates, most programmers find it easier to use only positive coordinates. As a result, most
programmers will prefer to relocate the coordinate system origin to position the +X, +Y quadrant
over the page.
The following table shows the appropriate rotate and translate operations to adjust the coordinate
system for drawing in all four orientations. The W and H values specify the width and height,
respectively, of the page in user coordinates. The starting orientations assume that the entries in
this table were used to reach that starting orientation.
Starting
Orientation
Desired
Orientation
Rotation
(first)
Translation
(second)
0
90
90 rotate
0 -W translate
0
180
180 rotate
-W -H translate
0
270
270 rotate
-H
0 translate
90
0
-90 rotate
-W
0 translate
90
180
90 rotate
0 -H translate
90
270
180 rotate
-H -W translate
180
0
-180 rotate
-W -H translate
180
90
-90 rotate
-H
0 translate
180
270
90 rotate
0 -W translate
270
0
-270 rotate
0 -H translate
270
90
-180 rotate
-H -W translate
270
180
-90 rotate
-W
0 translate
0 rotate
+Y
-X
0,0
+X
-Y
180 rotate
-Y
+X
0,0
-X
+Y