PResizePct

Resizes an object to the specified percentage.


Command constructor

PResizePct(short cHandle, short dXPercentage, short dYPercentage, PMBool bProp, PMBool bBestSize);
short cHandle;
Handle to drag:
Corner handles:
kEdgeLeftTop
kEdgeLeftBottom
kEdgeRightTop
kEdgeRightBottom
short dXPercentage;
Percentage to resize the object horizontally (along the x axis) in tenths of a percent.
short dYPercentage;
Percentage to resize the object vertically (along the y axis) in tenths of a percent.\
PMBool bProp;
false for no proportional resizing (the default)
true for proportional resizing
PMBool bBestSize;
false (the default)
true for stretching a paint-type graphic to the best size for the printer resolution
Single objects only. The PResizePct command can resize only one object at a time.

100% yields no change. If dXPercentage is 1000 (100%), the object size does not change.

Effects are cumulative. Unlike the Control palette, resizing using the PResizePct command is cumulative. For example, resizepct right 200 followed by resizepct right 200 results in a 400% enlargement toward the right. (When you resize an object with the Control Palette, the percentage is always applied to the original object size and, therefore, is not cumulative.)

Proportional resizing. If you use a corner for cHandle when resizing propor tionally, PageMaker resizes the object proportionally based on the x value only and disregards the y value. Use the left, right, top, or bottom coordinate to resize the object in only one direction or when resizing proportionally. Specify a corner (leftTop, leftBottom, rightTop, rightBottom) to resize the object both horizontally and vertically.

Snap to guides and rulers. Just as when resizing an object with the pointer tool, the PResizePct command is sensitive to the Snap to Guides and Snap to Ruler options. If Snap to Guides or Snap to Rulers are on, the object may be resized to a guide or ruler division that is close to the percentage you specify. To avoid this possibility, turn Snap to Guides and Snap to Rulers off prior to resizing, using the PSnapToGuides and PSnapToRulers commands.

Size of publication window. If the publication window is less than one fourth the size of the screen, you must turn off the PSnapToGuides and PSnapToRulers commands prior to resizing.

Do not resize lines. Using PResizePct to change the length of a line may cause unexpected results. If you want to change a line length, it's best to delete the line and create a new one.

cHandle for transformed objects. If the selected object was 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.

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

Example. The following example turns Snap to Guides and Snap to Rulers off so the resized object is not pulled to a guide or ruler division. Next, it selects an object, drags the left handles of the object to make it 80% of its current size, resizes it proportionally, and does not stretch it to the best size for the printer. Finally, it turns Snap to Guides and Snap to Rulers back on.

PSnapToGuides(false);
PSnapToRulers(false);
PSelect(3)
PResizePct(kEdgeLeft, 80, true, false);
PSnapToGuides(true);
PSnapToRulers(true);


See also

The PResize command

The PGetTransform query

Adobe PageMaker 6.5 Help > Commands > Layout > Guides and Rulers

Adobe PageMaker 6.5 Help > Commands > Window > Control Palette


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

Comments or suggestions? Contact Adobe Developer Support