HTBasic Help
×
Menu
Index

MOVE and DRAW Statements

 
The MOVE statement raises the pen and then moves it to the specified position. The DRAW statement draws a line from the current position to the specified position using the current line type and pen number. MOVE always lifts the pen before moving to the specified position. DRAW always begins with the pen down, draws to the new position, and ends with the pen down. Let’s now try an example:
 
10 GINIT
20 DRAW 100,100
30 MOVE 100,0
40 DRAW 0,100
50 END
 
This example draws a large X on the graphics screen. If you were not already in GRAPHICS mode the display mode is switched to GRAPHICS mode and any ALPHA text is repainted on the graphics screen. The first DRAW statement lowers the pen at the current position (0,0 because of the GINIT statement) and draws a line to position 100,100. The MOVE statement raises the pen and moves it to position 100,0. The next DRAW statement lowers the pen at the current position 100,0 and draws a line to position 0,100.