Sharp MZ-700 Series Owner's Manual page 87

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.7.6 Graphic mode statements
The graphic mode statements become effective after the MODE GR statement has been executed. When
this statement is executed, the current pen location is set to the origin (X = 0, Y = 0). However, the origin
can be set to any location. Be careful not to specify a location which is out of the print area, as this may
damage the pen or cause other problems.
Max. Y = 9 9 9
+ Y
Max. Y = 999
+ Y
Current
pen location
(0,0)
( 4 8 0 , 0 )
•o
•o
< u
a.
- Y
Min. Y = —999
X - Y coordinates after M O D E GR has
been executed. The allowable range of
X is 0 t o 480 and the allowable range
of Y is - 9 9 9 t o 999.
Note: See page 88 for the HSET statement.
•o
•o Q J
O J
- Y
Min. Y = - 9 9 9
X - Y coordinates after the origin has
been moved t o the center o f paper.
( M O V E 240, - 2 4 0 : HSET)
2.7.6.1 LINE
Format
Function
Example
LINE Xj, y
x
< , x
2
, y
2
, . . . , xi, yi>
or
LINE %n, Xj, y
1
<, x
2
, y
2
, . . . , xi, yi>
n
Integer from 1 to 16
xi
Number indicating the X coordinate (xi = —480 to 480; the limit varies
depending on the current, pen location.)
yi
Number indicating the Y coordinate (yi = —999 to 999)
This statement draws a line from the current pen location to location ( x
l 5
y
x
), then
draws a line from ( x j , y j ) to (x
2
, y
2
), and so on. n specifies the type of line drawn
as shown below,
n = 1: solid line
n = 2 to 16: dotted line
If % is omitted, the previous value of n is assumed. The initial value of n is 1 (solid
line).
(Example 1) The following program draws a square with a side length of 240 units.
G R
2 4 0 ,
0
•Switches to the graphic mode.
• Draws a line from the origin to the center
of paper.
1 0
20
3 0
4 0
5 0
60
(Example 2) The following program draws the same square as the example above.
1 0
M O D E
G R
2 0
L I N E
2 4 0 , 0 , 2 4 0 , - 2 4 0 , 0 , - 2 4 0 , 0 ,
0
3 0
M O D E
T N
M O D E
L I N E
L I N E
L I N E
L I N E
M O D E
2 4 0 ,
- 2 4 0
0 ,
- 2 4 0
0, 0
T N
• Draws a line to the origin.
• Returns to the text mode.

Advertisement

Table of Contents
loading

Table of Contents