17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

DRAW Statement<br />

Purpose:<br />

To draw a figure.<br />

Syntax:<br />

DRAW string expression<br />

Comments:<br />

The DRAW statement combines most of the capabilities of the other graphics statements into an<br />

object definition language called Graphics Macro Language (GML). A GML command is a<br />

single character within a string, optionally followed by one or more arguments.<br />

The DRAW statement is valid only in graphics mode.<br />

Movement Commands:<br />

Each of the following movement commands begins movement from the current graphics position.<br />

This is usually the coordinate of the last graphics point plotted with another GML command,<br />

LINE, or PSET. The current position defaults to the center of the screen (160,100 in medium<br />

resolution; 320,100 in high resolution) when a program is run. Movement commands move for a<br />

distance of scale factor *n, where the default for n is 1; thus, they move one point if n is omitted<br />

and the default scale factor is used.<br />

Command Moves<br />

Un up<br />

Dn down<br />

Ln left<br />

Rn right<br />

En diagonally up and right<br />

Fn diagonally down and right<br />

Gn diagonally down and left<br />

Hn diagonally up and left<br />

This command moves as specified by the following argument:<br />

Mx, y Move absolute or relative. If x is preceded by a + or -, x and y are added to the<br />

current graphics position, and connected to the current position by a line.<br />

Otherwise, a line is drawn to point x, y from the current position.<br />

The following prefix commands may precede any of the above movement commands:<br />

B Move, but plot no points.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/DRAW.html (1 of 3)28/03/2004 21.29.17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!