Cursor Movement Commands ------------------------ The following prefix commands can precede any of the movement commands: Prefix Description B Move, but do not plot any points. N Move, but return to original position when done. The following commands specify movement in units. The default unit size is one point; this unit size can be modified by the S command, which sets the scale factor. If no argument is supplied, the cursor is moved one unit. (S is described in "Angle, Color, and Scale-Factor Commands.") Each of the movement commands initiates movement from the current graphics position, which is usually the coordinate of the last graphics point plotted with another graphics macro-language command. The current position defaults to the center of the screen when a program is run. Movement Description U [n] Move up n units. D [n] Move down n units. L [n] Move left n units. R [n] Move right n units. E [n] Move diagonally up and right n units. F [n] Move diagonally down and right n units. G [n] Move diagonally down and left n units. H [n] Move diagonally up and left n units. M x,y Move absolute or relative. If x is preceded by a plus (+) or minus (-), the movement is relative to the current point; that is, x and y are added to (or subtracted from) the coordinates of the current graphics position and connected with that position by a line. If no sign precedes x, the movement is absolute; that is, a line is drawn from the current cursor position to the point with coordinates x,y. Angle, Color and Scale-Factor Commands -------------------------------------- The following commands let you change the appearance of a drawing by rotating it, changing colors, or scaling it: Command Description A n Set angle of rotation n. The value of n may range from 0 to 3, where 0 is 0 degrees, 1 is 90 degrees, 2 is 180 degrees, and 3 is 270 degrees. Figures rotated 90 degrees or 270 degrees are scaled so they appear the same size using 0 degrees or 180 degrees on a monitor screen with a standard screen width-to-height ratio of 4/3. TA n Turn an angle of n degrees; n must be in the range -360 to 360. If n is positive, rotation is counterclockwise; if n is negative, rotation is clockwise. The following example uses TA to draw spokes: SCREEN 1 FOR D=0 TO 360 STEP 10 DRAW "TA="+VARPTR$(D)+"NU50" NEXT D C n Set color to n. See the COLOR, PALETTE, and SCREEN statements for discussions of valid colors, numbers, and attributes. S n Set scale factor n, which may range from 1 to 255. The scale factor multiplied by the distances given with U, D, L, R, or relative M commands gives the actual distance traveled. P paintcolor, bordercolor The paintcolor is the paint color for a figure's interior, while bordercolor is the paint color for the figure's border. Tile painting (painting an area with a graphic pattern) is not supported in DRAW. X Substrings ------------ Substring Command Description X stringexpression Execute substring. This command allows you to execute a second substring from a string. You may have one string expression execute another, which executes a third, and so on. Numeric arguments can be constants like 123 or variable names. QuickBASIC requires the "X" + VARPTR$(string-expression) form of this command. This is different than the BASICA form of the command.