Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.SetRotationCenter |
Sub SetRotationCenter(x As Double, y As Double)
Member of ShapeRange
The SetRotationCenter method sets the x- and y-coordinates of the center of rotation for a shape range.
• |
See also the ShapeRange.RotationCenterX and ShapeRange.RotationCenterY
properties.
|
Parameter
|
Description
|
x
|
Specifies the x-coordinate of the center of rotation
|
y
|
Specifies the y-coordinate of the center of rotation
|
The following VBA example rotates all rectangles by 45°. The rectangles are rotated relative to the center of the page.
Sub Test() |
Dim sr As ShapeRange |
Set sr = ActivePage.FindShapes(, cdrRectangleShape) |
sr.SetRotationCenter ActivePage.SizeWidth / 2, ActivePage.SizeHeight / 2 |
sr.Rotate 45 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.