API Documentation > CorelDRAW > 2025-v26 > Layer > IVGLayer
Layer.CreateEllipse method
Creates an ellipse by specifying coordinates
Syntax:
Function CreateEllipse(ByVal Left As Double, ByVal Top As Double, ByVal Right As Double, ByVal Bottom As Double, Optional ByVal StartAngle As Double = 90, Optional ByVal EndAngle As Double = 90, Optional ByVal Pie As Boolean = False) As Shape
Parameters:
Name Type Description
Left
Double
Top
Double
Right
Double
Bottom
Double
StartAngle
Double
Specifies the degree of the start angle for the ellipse.
EndAngle
Double
Specifies the degree of the end angle of the ellipse. Altering the start angle changes the shape of the ellipse.
Pie
Boolean
Specifies whether to change the ellipse into a pie.
Remarks:
The CreateEllipse method creates an ellipse shape at a specified location on a layer. The CreateEllipse method creates the ellipse by using the corners of its bounding box.
Examples:
The following VBA example creates a rectangle with a red ellipse inside it, both at the lower-left corner of the page.
Sub Test()
Dim s As Shape
Dim lr As Layer
Set lr = ActiveLayer
ActiveDocument.DrawingOriginX = -ActivePage.SizeWidth / 2
ActiveDocument.DrawingOriginY = -ActivePage.SizeHeight / 2
lr.CreateRectangle 0, 0, 3, 2
Set s = lr.CreateEllipse(0, 0, 3, 2)
s.Fill.UniformColor.RGBAssign 255, 0, 0 'Red 
End Sub