PRotate

Rotates selected objects by the specified degrees, centering the rotation on the specified object handle.


Command constructor

PRotate(short cHandle, long dAngle);
short cHandle;
Handle to use as reflection point:

Side handles:
kEdgeLeft
kEdgeRight
kEdgeTop
kEdgeBottom

Center of object:
kEdgeCenter

Corner handles:
kEdgeLeftTop

kEdgeLeftBottom
kEdgeRightTop
kEdgeRightBottom

long dAngle;
Degrees to rotate object (positive values are measured counterclockwise from the x axis) in thousandths of a degree (45 degrees = 45000).
Normal orientation. Zero (0) degrees is the normal, unrotated position of an object.

Whole text blocks. The PRotate command rotates whole text blocks, not individual characters or groups of characters within a text block. Select a text block for rotation only with the PSelect command or the pointer tool, not the PTextSelect command or text tool.

Text automatically recomposed. When text is rotated, PageMaker recomposes the text to wrap around any objects that have text-wrap attributes (specified with the PTextWrap command).

Rotating lines. If the selected object is a line, the only valid values for cHandle are kEdgeCenter, kEdgeLeftTop, kEdgeRightBottom.

Rotating single objects. When rotating a single object that was previously skewed, rotated, or reflected, cHandle should correspond to the handle before the object was transformed. For example, kEdgeLeftTop always refers to the original left-top handle of an object, not the handle that is currently the left-most top handle.

Rotation not cumulative on single objects. As when rotating using the Control palette, rotating a single object around a specified handle is not cumulative. Always specify the degrees in relation to the unrotated position of the object. For example, if a text block has been rotated 90 degrees around the top handle and you want to rotate it an additional 30 degrees, you must specify a rotation of 120 degrees, not 30.

Rotating multiple objects. When rotating multiple objects with the rotate command, PageMaker defines a temporary (and invisible) bounding box that encompasses all the objects. The cHandle parameter refers to the handles of this temporary box. Once you rotate the objects, PageMaker redefines the bounding box (and its handles) just as if the objects were selected again. Therefore, rotation can be cumulative (rotating 90 degrees and 90 degrees again results in a total rotation of 180 degrees), but the point of rotation changes each time because PageMaker rotates the objects about the new handle. (Note: this behavior differs slightly from rotating objects with the Control palette, which uses the same handles as long as the objects remain selected.)

Rotating around a specified point. To rotate an object around a separate, specified point (not a point on the object), you must use both the PMove and PRotate (or PNudge and PRotate) commands.

Layout view only. The PRotate command works only in layout view.

Example. The following example selects the third object drawn and rotates it 25 degrees, centered on the bottom-left corner.

PSelect(3);
PRotate(kEdgeBottomleft, 25000);


See also

The PTextWrap command

The PGetTransform query

Adobe PageMaker 6.5 Help > Commands > Window > Control Palette

Adobe PageMaker 6.5 Help > Commands > Element > Text Wrap

Adobe PageMaker 6.5 Help > Commands > Window > Toolbox


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support