![]() |
![]() |
ShapeRange.RotationCenterX
Property RotationCenterX As Double
Member of ShapeRange
The RotationCenterX returns or sets the x-coordinate for the center of rotation of a range of shapes.
See also the SetRotationCenter method.
The following code 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
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.