Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Properties : ShapeRange.RotationCenterX


ShapeRange.RotationCenterX

Property RotationCenterX As Double

Description

Member of ShapeRange

The RotationCenterX returns or specifies the x-coordinate for the center of rotation for a shape range.

 
See also the ShapeRange.SetRotationCenter method.
VBA example

The following VBA example creates a “flower” by duplicating circles. It then creates a larger flower by duplicating this group of six circles five more times, to form six petals of different colors.

Sub Test()
 Dim n As Long
 Dim sr As New ShapeRange, sr1 As ShapeRange
 Dim s As Shape
 Set s = ActiveLayer.CreateEllipse2(0, 0, 0.5)
 s.RotationCenterX = 1
 s.RotationCenterY = 1
 For n = 1 To 5
  sr.Add s.Duplicate
  s.Rotate 60
 Next n
 sr.Add s
 sr.ApplyUniformFill CreateRGBColor(255, 0, 0)
 sr.RotationCenterX = ActivePage.SizeWidth / 2
 sr.RotationCenterY = ActivePage.SizeHeight / 2
 For n = 0 To 4
  Set sr1 = sr.Duplicate
  sr1.ApplyUniformFill CreateRGBColor(255, 255 * (1 - n / 5), 0)
  sr.Rotate 60
 Next n
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.