Previous Document Next Document

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


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

Description

Member of Layer

The CreateEllipse2 method creates an ellipse, at a specified location on a layer, by using the coordinates of the shape’s center, the horizontal radius, and (if desired) the vertical radius.

Parameter
Description
CenterX
Specifies, in document units, the x-coordinate of the center point
CenterY
Specifies, in document units, the y-coordinate of the center point
Radius1
Specifies , in document units, the measurement from the x-coordinate of the center point to the circumference
Radius2
Specifies, in document units, the measurement from the y-coordinate of the center point to the circumference. This parameter is optional, and its default value is 0.
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 for the ellipse. This parameter is optional, and its default value is 90.
Pie
Specifies whether the ellipse is a pie. This parameter is optional, and its default value is False.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.