GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | DRAW

Edit History

DRAW

DRAW CommandString

Home > Reference > Graphics

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  
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  
This page was last edited on Mon, 23 Oct 2023 15:52:24 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.