Object Model Reference : Classes : L : Layer : Methods : Layer.CreateEllipse2 |
Function CreateEllipse2(CenterX As Double, CenterY As Double, Radius1 As Double, [Radius2 As Double], [StartAngle As Double = 90], [EndAngle As Double = 90], [Pie As Boolean = False]) As Shape
Member of Layer
The CreateEllipse2 method creates an ellipse, at a specified location on a layer, by using the coordinates of the shapes center, the horizontal radius, and (if desired) the vertical radius.
The following VBA example creates a yellow circle in the middle of the page and a green ellipse above it.
Sub Test() |
Dim s As Shape |
Dim lr As Layer |
Set lr = ActiveLayer |
ActiveDocument.DrawingOriginX = 0 |
ActiveDocument.DrawingOriginY = 0 |
Set s = lr.CreateEllipse2(0, 0, 1) |
s.Fill.UniformColor.RGBAssign 255, 255, 0 'Yellow |
Set s = lr.CreateEllipse2(0, 2, 2, 1) |
s.Fill.UniformColor.RGBAssign 0, 255, 0 'Green |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.