bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CIRCLE Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
CIRCLE draws an ellipse or circle on the screen.
CIRCLE [STEP] (x!,y!),radius![,[color&] [,[start!] [,[end!] [,aspect!]]]]
■ The argument radius! is measured in units of the current coordinate
system, which is determined by the most recently executed SCREEN
statement, along with any VIEW or WINDOW statements.
■ The argument color& is the attribute of the desired color. The default
color is the foreground color. See the ◄COLOR Statement Details►
and the ◄SCREEN Statement Details► for more information on how
to specify a color in different display screen modes.
■ The arguments start! and end! are the start and end angles, in radians,
for the arc to draw. They can range from -2PI radians to 2PI radians,
where PI ≈ 3.141593. The default value for start! is 0 radians.
The default value for end! is 2PI radians. To convert values from
degrees to radians, multiply the angle (in degrees) by PI/180
(which is approximately equal to 0.0174532925199433).
■ The argument aspect! is the ratio of the y radius to the x radius.
The default value for aspect! is the value required to draw a round
circle in the screen mode.
Usage Notes
■ If start! or end! is negative, CIRCLE draws a radius to start! and
treats the angle as positive. If end! is negative, CIRCLE draws a
radius to end! and treats the angle as positive. If both start! and
end! are negative, CIRCLE draws a radius to both start! and end! and
treats the angle as positive.
■ The start angle can be less than the end angle. If you specify end!
but not start!, the arc is drawn from 0 to end; if you specify start!,
but not end!, the statement draws an arc from start! to 2 PI.
■ The aspect ratio is calculated as follows, where xpixels by
ypixels is the screen resolution:
aspect = 4 * (ypixels/xpixels)/3
■ If the aspect ratio is less than one, radius! is the x radius.
If aspect! is greater than one, radius! is equal to the y radius.
■ To draw a radius to angle 0 (a horizontal line segment to the right),
do not give the angle as -0; use a very small non-zero value instead
as shown:
' Draws a pie-shaped one-quarter wedge of a circle:
SCREEN 2
CIRCLE (200,100),60,,-.0001,-1.57
■ You can omit an argument in the middle of the statement, but you must
include the argument's commas. If you omit a trailing argument, do
not include its corresponding commas. In the following statement,
color has been omitted:
CIRCLE STEP (150,200),94,,0.0,6.28
■ The CIRCLE statement updates the graphics cursor position to the
center of the ellipse or circle.
■ You can use coordinates that are outside the screen or viewport.
■ You can show coordinates as absolutes, or you can use the STEP
option to show the position of the center point in relation to the
previous point of reference. For example, if the previous point of
reference were (10,10), then the following statement would draw a
circle with radius 75 and center offset 10 from the current x
coordinate and 5 from the current y coordinate. The circle's
center would be (20,15).
CIRCLE STEP (10,5), 75