API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.SetRotationCenter method
Specifies the horizontal and vertical position of the center of rotation for the shape
Syntax:
Sub SetRotationCenter(ByVal x As Double, ByVal y As Double)
Parameters:
Name Type Description
x
Double
y
Double
Remarks:
The SetRotationCenter method specifies the horizontal and veritcal positions of the center of rotation for a shape. See also Shape.RotationCenterX and Shape.RotationCenterY properties
Examples:
The following VBA example creates a flower with randomly colored petals.
Sub Test()
Const NumLeafs As Long = 11
Dim pal As Palette
Dim s As Shape
Dim i As Long, NumColors As Long
Set s = Nothing
If ActivePalette Is Nothing Then
  Set pal = Palettes.Open(Application.SetupPath & "Custom\coreldrw.xml")
Else
  Set pal = ActivePalette
End If
NumColors = pal.ColorCount
For i = 1 To NumLeafs
  If s Is Nothing Then

 Set s = ActiveLayer.CreateEllipse(5, 5, 7, 6)

 s.SetRotationCenter 4, 5.5
  Else

 s.Duplicate
  End If
  s.Fill.ApplyUniformFill pal.Color(Rnd() * NumColors + 1)
  s.Rotate 360 / NumLeafs
Next i 
End Sub