PGetSelectInfo

Gets the coordinates of the bounding box that encompasses the selected objects.


Query results

long xLeft;
x coordinate of left-top corner of bounding box in twips
long yTop;
y coordinate of left-top corner of bounding box in twips
long xRight;
x coordinate of right-bottom corner of bounding box in twips
long yBottom;
y coordinate of right-bottom corner of bounding box in twips
Exceptions. PGetSelectInfo throws a PMErr exception if no objects are selected.

Example. This example creates a new publication, draws a box, and queries for the coordinates of the bounding box. It rotates the box and again queries for the coordinates of the bounding box. Finally, it draws another box, selects both, and queries for the coordinates of the bounding box that encompasses both boxes.

PNew();
PBox(0, 0, twips("1i"), twips("1i"));
PGetSelectInfo(); // expected reply 0,0,1,1
PRotate(center, 45);
PGetSelectInfo(); // expected reply -0.207,-0.207,1.207,1.207
PBox(twips("7i"), twips("7i"), twips("8i"), twips("8i"));
PSelectAll();
PGetSelectInfo(); // expected reply -0.207,-0.207,8,8


See also

The PGetObjectList, PGetObjectLoc, PGetTransform, and PGetSelectList queries


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

Comments or suggestions? Contact Adobe Developer Support