DRAW
DRAW CommandString
Draw lines as specified by the given CommandString
. The
CommandString
is created using commands from the Graphics
Definition Language. The start point for drawing can be defined using
the PSET command. COLOR can be used to change the color of the
lines.
Graphics Definition Language
In the movement instructions below, n specifies a distance to move in pixel.
Command | Description |
---|---|
Un | Move up. |
Dn | Move down. |
Ln | Move left. |
Rn | Move right. |
En | Move diagonally up and right. |
Fn | Move diagonally down and right. |
Gn | Move diagonally down and left. |
Hn | Move diagonally up and left. |
Mxy | Move to coordinate x,y. If x is preceded by a + or -, the movement is relative to the last point referenced. |
B | A prefix command. Next movement command moves but doesn’t plot. |
N | A prefix command. Next movement command moves, but returns immediately to previous point. |
Example 1: Let’s draw a house
COLOR 9
PSET 80,80
DRAW "R50D70L25U25L15D25NR15" ' House part 1
DRAW "L10U70E25F25" ' House part 2
PSET 118,105
COLOR 3
DRAW "R8U16L16D16R8U10NR8U6" ' Window
Code samples using DRAW
003 conditional branching.bas
004 loops.bas
3d rotating cube with message.bas
3d wire cube v1.bas
3d wire cube.bas
3d_palmx.bas
3d_torus.bas
3dtictac.bas
3dtorus.bas
3dttt.bas
3dttt.bas
7gables.bas
analog clock.bas
anball 1.0.bas
Another center finder.bas
another look at trig functions.bas
aquarium v2.bas
autumn scene.bas
betrayal: crows ii.bas
bezier's autograph book.bas
bezierbounce.bas
BlackJack.bas
blackjack.bas
bomb.bas
bowling7.bas
bplus paddleball.bas
btn 21.bas
bulls and cows.bas
checkers.bas