Previous Document Next Document
ShapeRange.SetRotationCenter

Sub SetRotationCenter(x As Double, y As Double)

Member of ShapeRange

The SetRotationCenter method sets both the horizontal and y-coordinates of the center of rotation for the range.

See also the RotationCenterX and RotationCenterY properties.

Parameters
Description
x
Sets the x-coordinate of the center of rotation
y
Sets the y-coordinate of the center of rotation

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.