![]() |
![]() |
Shape.GetBoundingBox
Sub GetBoundingBox(x As Double, y As Double, Width As Double, Height As Double, [UseOutline As Boolean = False])
Member of Shape
The GetBoundingBox method gets the size of an object and the position of its lower-left corner.
If the UseOutline parameter is True, then the outline width and shape are accounted for when calculating the bounding-box dimensions. Otherwise, the shape is treated as if it has no outline.
The following code example creates a rectangle around each shape on the active page:
Sub Test() Dim s As Shape Dim x As Double, y As Double, w As Double, h As Double ActiveDocument.ReferencePoint = cdrBottomLeft For Each s In ActivePage.Shapes s.GetBoundingBox x, y, w, h ActiveLayer.CreateRectangle2 x, y, s.SizeWidth, s.SizeHeight Next s End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.