Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions > Canvas Control >

Canvas_Circle

Previous pageReturn to chapter overviewNext page

 

Description

 

Draw a circle in the selected canvas target

 

Syntax

 

n = Canvas_Circle(x, y, r, [rgbColor [, fillcolor [, fillstyle] ]] )

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

x

Number

No

The upper left corner of the circle

y

Number

No

The upper left corner of the circle

r

Number

No

Radius of the circle.

rgbColor

Number

Yes

RGB color of the box edge.  If omitted (or -1), the edge color defaults to the current foreground color for the selected graphic window.

fillcolor

Number

Yes

RGB color of the circle interior.  If fillcolor is omitted (or -2), the interior of the circle is not filled, allowing the background to show through.  If fillcolor is -1, the interior is painted with the same color as the edge. Otherwise, fillcolor specifies the RGB color to be used.

fillstyle

Number

Yes

Fill style (pattern) to be used.  If fillstyle is omitted, the default fill style is solid (0).  If a hatch pattern is chosen (1 to 6), the foreground color is specified by the fillcolor, while the background is specified by the default background color.  The fillstyle can be:

 

%Canvas_FillStyle_Solid

%Canvas_FillStyle_HorizontalLines

%Canvas_FillStyle_VerticalLines

%Canvas_FillStyle_UpwardDiagonalLines

%Canvas_FillStyle_DownwardDiagonalLines

%Canvas_FillStyle_CrossedLines

%Canvas_FillStyle_DiagonalCrossedLines

 

Remarks

 

Restrictions

 

See also

 

Examples