Draws a circle.
Circle x, y, r [,w1, w2]
PCircle x, y, r [,w1, w2]
x, y, r, w1, w2 : Single expression
Circle x, y, r[,w1,w2] draws a circle with the radius r around the centre with the coordinates x and y. In addition, by using the start (w1) and end (w2) angles, you can draw just an arc rather than the full circle - the angles w1 and w2 are given in whole degree steps as per Figure 1, with any arc being drawn in an anti-clockwise direction.
The width of the line drawn depends on the setting of the DefLine command, while the way a line or box is drawn on the background depends on the setting of the DrawMode and BkColor properties.
The PCircle command acts very much the same, except that the circles drawn are filled with a pattern defined using Deffill.
OpenW 1
Circle 100, 100, 20, 90, 180 // Draws a quarter arc...
DefLine 0, 10
Circle 100, 100, 60 // ...inside a full circle.
DefLine 0, 1 : DefFill 5
PCircle 250, 100, 60 // Draws a filled circle...
DefLine 2 : DefFill 48
PCircle 250, 100, 60, 45, 90 // ...with a pie section.
The current scaling depends of the form's ScaleMode setting.
The Circle and PCircle commands use the old GDI library. For a smoother circle drawn using anti-aliasing, you can use Windows GDI+ library instead.
Note: When the radius r is declared as a Byte or Short/Word the circle isn't drawn; this can be got around by using CSng(r). Double, Int32 and Int64 variables are unaffected.
{Created by Sjouke Hamstra; Last updated: 17/12/2015 by James Gaite}