134
CipherLab BASIC Programming Part I
CIRCLE
Purpose To draw a circle on the LCD.
Syntax CIRCLE(cx%, cy%, r%, type%, mode%)
Remarks “cx%”, “cy%”
are integer variables, indicating the x, y coordinates of the
center of a circle.
“r%” is an integer variable, indicating the radius of a circle in pixels.
“type%” is an integer variable, indicating the type of a circle.
0 SHAPE_NORMAL Hollow object
1 SHAPE_FILLL Solid object
“mode%” is an integer variable, indicating the state of a pixel.
-1 DOT_REVERSE Dot in Reverse mode
0 DOT_CLEAR Dot being cleared
1 DOT_MARK Dot being marked
Example
CIRCLE(80, 120, 8, 1, 1)
' draw a solid circle centered at
(8,120) with radius of 8 pixels
See Also CLS, LINE, PUT_PIXEL, RECTANGLE
LINE
Purpose To draw a line on the LCD.
Syntax LINE(x1%, y1%, x2%, y2%, mode%)
Remarks “x1%”, “y1%”
are integer variables, indicating the x, y coordinates of where a
line starts.
“x2%”, “y2%”
are integer variables, indicating the x, y coordinates of where a
line ends.
“mode%” is an integer variable, indicating the state of a pixel.
-1 DOT_REVERSE Dot in Reverse mode
0 DOT_CLEAR Dot being cleared
1 DOT_MARK Dot being marked
Example
LINE(10, 10, 120, 10, 1)
' draw a horizontal line
See Also CIRCLE, CLS, PUT_PIXEL, RECTANGLE