Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.CreateEllipse


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

Description

Member of Layer

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.

Parameter
Description
Left
Specifies, in document units, the distance from the left side of the ellipse to the left side of the page frame
Top
Specifies, in document units, the distance from the top of the ellipse to the top of the page frame
Right
Specifies, in document units, the distance from the right side of the ellipse to the right side of the page frame
Bottom
Specifies, in document units, the distance from the bottom of the ellipse to the bottom of the page frame
StartAngle
Specifies the degree of the start angle for the ellipse. This parameter is optional, and its default value is 90.
EndAngle
Specifies the degree of the end angle of the ellipse. Altering the start angle changes the shape of the ellipse. This parameter is optional, and its default value is 90.
Pie
Specifies whether to change the ellipse into a pie. This parameter is optional, and its default value is False.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.