#: 12202 S10/OS9/6809 (CoCo)
12-Sep-91 03:27:09
Sb: #12194-#Lines/Put/etc
Fm: Kevin Darling 76703,4227
To: Brother Jeremy, CSJW 76477,142 (X)
Jeremy - one key is, you first must send a "move-to" escape code ($1b 40 x y)
with the first coordinate, and then the "line-to" code ($1b 44 x y).
PROCEDURE TestNewLine
(* usage: RUN NewLine(path,a,b,c,d)
DIM path,a,b,c,d:INTEGER
INPUT "line x1,y1,x2,y2 ",a,b,c,d
path=1
RUN gfx2("CLEAR")
PRINT \ PRINT \ PRINT \ PRINT
RUN NewLine(path,a,b,c,d)
END
PROCEDURE NewLine
(* usage: RUN New(path,etc)
PARAM path:INTEGER
PARAM a,b,c,d:INTEGER
TYPE line_esc=esc1,esc2:BYTE; x,y:INTEGER
DIM code:line_esc
code.esc1=$1B
code.esc2=$40
code.x=a
code.y=b
PUT #path,code \ (* send move-to a,b
code.esc2=$44
code.x=c
code.y=d
PUT #path,code \ (* send line-to c,d
END
PS: I got a little fancy on the TYPE/DIM stuff... only to make using
the coordinate a little easier/faster, perhaps. - kevin
There is 1 Reply.
|