Previous Document Next Document
Layer.CreateEllipse

Function CreateEllipse(Left As Double, Top As Double, Right As Double, Bottom As Double, [StartAngle As Double = 90], [EndAngle As Double = 90], [Pie As Boolean = False]) As Shape

Member of Layer

The CreateEllipse method creates an ellipse shape on a layer. The CreateEllipse method uses the corners of the ellipse bounding box to create the shape.

Parameters
Description
Left
Specifies the distance from the left side of the ellipse to the left side of the page frame. The value is measured in document units.
Top
Specifies the distance from the top of the ellipse to the top of the page frame. The value is measured in document units.
Right
Specifies the distance from the right side of the ellipse to the right side of the page frame. The value is measured in document units.
Bottom
Specifies the distance from the bottom of the ellipse to the bottom of the page frame. The value is measured in document units.
StartAngle
Sets the degree of an ellipse’s start angle
This parameter is optional, and its default value is 90.
EndAngle
Sets a value associated with the degree of an ellipse's end angle. Altering the start angle changes the shape of the ellipse.
This parameter is optional, and its default value is 90.
Pie
Sets whether the newly created ellipse is changed into a pie
This parameter is optional, and its default value is False.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.