Circle Method (AForm)

Draws a circle, ellipse, pie or an arc on an object.

Syntax

Object.Circle ( [bStep,] fXCenter, fYCenter, fRadius [,IArcStart] [,IArcEnd] [,fAspect] [,clr] [,clrFill] )

The Circle method syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

bStep

[Val] Bool

Specify that the center of the circle, ellipse, or arc is relative to the current coordinates given by the CurrentX and CurrentY properties of the form.

fXCenter

Val Float

The X coordinate for the center point of the circle, ellipse, or arc. The ScaleMode property of the form determines the units of measure used.

fYCenter

Val Float

The Y coordinate for the center point of the circle, ellipse, or arc. The ScaleMode property of the form determines the units of measure used.

fRadius

Val Float

The radius of the circle, ellipse, or arc. The ScaleMode property of the form determines the unit of measure used.

IArcStart

[Val] Long

Degrees. Where 0 starts from 3 o'clock counter clock wise to 360 for a full circle or ellipse. Default value is 0. Change this if you want to draw an arc.

IArcEnd

[Val] Long

Degrees. Where 0 starts from 3 o'clock counter clock wise to 360 for a full circle or ellipse. Default value is 0 to draw a full circle. Change this if you want to draw an arc.

fAspect

[Val] Float

The aspect ratio of the circle. The default value is 1.0, which yields a perfect (non-elliptical) circle on any screen.

clr

Val Variant

Long integer value indicating the RGB color of the circle's outline. If omitted, the value of the ForeColor AForm property is used.

clrFill

[Val] Variant

Long integer value indicating the fill color of the shape and is specified by the RGB values. If omitted, the FillColor AForm property is used.

Where

bStep can be one of the following:

 

Value

Description

True *

The center of the circle, ellipse, or arc is relative to the current coordinates given by the CurrentX and CurrentY properties of the form.

False

The center of the circle, ellipse, or arc is not relative to the current coordinates given by the CurrentX and CurrentY properties of the form.

Comments

To fill a circle, set the FillColor and FillStyle properties of the object on which the circle or ellipse is drawn. Only a closed figure can be filled. Closed figures include a full circles or ellipse or arcs.

The width of the line used to draw the circle, ellipse, or arc depends on the setting of the DrawWidth property. The way the circle is drawn on the background depends on the setting of the DrawMode and DrawStyle properties.

When drawing pie slices, to draw a radius to angle 0 (giving a horizontal line segment to the right), specify a very small negative value for start, rather than zero.

The method is not applicable for MDI Form type since drawing functions are not supported for MDI Forms.

Example

The following statement draws a pie on the at x=50 units, y=60 units, and the radius=70 units, the line drawn in red and the circle filled in with blue color:

FillStyle=aformFillStyleSolid

DrawWidth=2

Circle(,50,60,70,,,,aclrRed, aclrBlue)

Applies to

AForm

See Also

CurrentX, CurrentY, DrawMode, DrawStyle, DrawWidth, FillColor, FillStyle,  ForeColor, ScaleMode