[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DRAW Draw Object
DRAW string
Draws an object according to instructions specified as a string
expression.
string A string expression containing commands in the BASIC
graphics definition language.
Graphics Definition Language
In the movement instructions below, n specifies a distance to move.
The number of pixels moved is equal to n multiplied by the current
scaling factor, which is set by the S command.
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.
Mx,y Move to coordinate x,y. If x is preceded by a + or -, the
movement is relative to the last point referenced (LPR).
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.
An Set angle. n may be 0, for 0 degrees; 1, for 90 degrees;
2, for 180 degrees; or 3, for 270 degrees. Rotated figures
are rescaled to adjust to the CGA's 4/3 aspect ratio.
TAn Turn angle. n may range from -360 degrees to +360 degrees.
Positive values cause counterclockwise rotation; negative
values cause clockwise rotation.
Cn Set color to n. The default color for medium-resolution
is 3; high-resolution default color is 1. See PALETTE for
a list of legal colors.
Sn Set scale factor. n may range from 1 to 255. The scaling
factor used is n/4. The default for n is 4.
Ppaint,boundary Fill figure color to paint, stopping at areas of color
boundary. See PALETTE for a list of legal colors.
"=" + VARPTR$(var)
Get argument from variable. May be used to supply
arguments to any of the foregoing commands.
"X" + VARPTR$(stringvar)
Execute command sequence stored in a string variable. This
command allows you to call graphics-language subroutines.
-------------------------------------------------------------------------
Notes: To get arguments or instructions from variables, you must
use VARPTR$(var) or VARPTR$(stringvar). QuickBASIC does
not support the =variable; and Xstringvar formulations
available with the Interpreter.
Spaces between or within instructions are insignificant.
Semicolons may be used between commands to enhance
readability.
The drawing begins at the last point referenced (LPR) and
LPR is updated as the object is being drawn.
See Also:
PALETTE
SCREEN (Statement)
VARPTR$
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson