Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.SetRotationCenter


ShapeRange.SetRotationCenter

Sub SetRotationCenter(x As Double, y As Double)

Description

Member of ShapeRange

The SetRotationCenter method sets the x- and y-coordinates of the center of rotation for a shape range.

 

Parameter
Description
x
Specifies the x-coordinate of the center of rotation
y
Specifies the y-coordinate of the center of rotation

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.