Explain CIRCLE COMMAND in QBASIC graphics.
Ans:
Answers
Answer:
QBasic 1.1: CIRCLE Statement
Explanation
CIRCLE Statement
Draws a circle or ellipse on the screen.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
ASCII Code Tables
Keyboard Scan Codes
Syntax Conventions
Screen Modes
Color Attributes
Error Codes
You are here: References Overview > QBasic 1.1 Commands List > CIRCLE Statement
Syntax
CIRCLE [STEP] (x!,y!),radius![,[color%] [,[start!] [,[end!] [,aspect!]]]]
Description / Parameter(s)
STEP Specifies that coordinates are relative to the current graphics cursor position.
(x!,y!) The coordinates for the center of the circle or ellipse.
radius! The radius of the circle or ellipse in the units of the current coordinate system, determined by the most recent SCREEN, VIEW, and WINDOW statements.
color% A color attribute that sets the circle's color. The available color attributes depend on your graphics adapter and the screen mode set by the most recent SCREEN statement.
start! The starting angle for the arc, in radians.
end! The ending angle for the arc, in radians.
aspect! The ratio of the length of the y axis to the length of the x axis, used to draw ellipses.
To convert from degrees to radians, multiply degrees by (PI / 180).
Example
'This example requires a color graphics adapter.
SCREEN 2
CIRCLE (320, 100), 200
CIRCLE STEP (0,0), 100