RECT
RECT [STEP] x1,y1 [,|STEP x2,y2] [, color| COLOR color] [FILLED]
Draws a rectangle from point x1,y1
to point
x2,y1
. If STEP is used, start point and/or end point are
relative to the current graphics cursor position. The line color of the
rectangle will be color
. If color
is omitted
then the current foreground color will be used as line color. When using
FILLED, the rectangle will be filled with color color
or
with the current foreground color.
Example 1: Draw rectangles
' Draws a rectangle:
rect 200, 100 ' at point [0,0], width 200, height 100
rect 10, 10, 210, 110 ' from proint [10,10] to point [210,110]
rect 20, 20, STEP 200, 100 ' at point [20,20], width 200, height 100
rect STEP 10,10, 420, 220 ' from last graphics cursor position + [10,10]
' to point [420,100]
rect STEP 10,10, STEP 200, 100 ' from last graphics cursor position + [10,10],
' width 200, height 100
Example 2: Draw rectangles with color
rect 10, 10, STEP 200, 100, 12
rect 20, 20, STEP 200, 100 COLOR 13
rect 30, 30, STEP 200, 100, rgb(50,255,20)
rect 10, 140, STEP 200, 100, 12 FILLED
rect 20, 150, STEP 200, 100 COLOR 13 FILLED
rect 30, 160, STEP 200, 100, rgb(50,255,20) FILLED
color 11
rect 10, 270, STEP 200, 100
rect 20, 280, STEP 200, 100 FILLED
Code samples using RECT
000 hello.bas
002 numeric variables.bas
2048.bas
2048.bas
3d block lettes.bas
3d wire cube v1.bas
3d_torus.bas
3dtictac.bas
3dtorus.bas
3dttt.bas
3dttt.bas
7gables.bas
anball 1.0.bas
another look at trig functions.bas
autumn scene.bas
Ball.bas
Balleta 2-11-15.bas
balls.bas
betrayal: crows ii.bas
blackbox.bas
Blackbox.bas
boing.bas
bomb.bas
bowling7.bas
bpf1.bas
bpf2.bas
bplus paddleball.bas
btn 21.bas
calc.bas
Graphics
ARC
CHART
CIRCLE
COLOR
DRAW
DRAWPOLY
IMAGE
LINE
PAINT
PEN
PLOT
POINT
PSET
RECT
RGB
RGBF
SHOWPAGE
TEXTHEIGHT
TEXTWIDTH
TXTH
TXTW
VIEW
WINDOW
XMAX
XPOS
YMAX
YPOS
If there is insufficient information on this page and you wish learn more about RECT,
please send an email to smallbasic@gmail.com. You can help to improve information about
RECT by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.