83Plus:Basic:Graphics:Line(
From WikiTI
Contents
Synopsis
Token size: 1 byte
Syntax: Line(x1,y1,x2,y2,[drawmode])
Draws or erases a line.
Outputs:
The line defined by (x1, y1), (x2, y2) is drawn to the graph screen is drawn, if drawmode is 1, or erased, if drawmode is 0. If omitted, drawmode is assumed to be 1.
Comments
- Endpoint coordinates are those defined by window settings, not by pixels
- Will throw no ERR:DOMAINs
- Functions, plots, and axes are not redrawn.
Examples
To draw a line from the top left corner of the screen to the bottom right corner, wait, then erase it:
:Line(Xmin,Ymax,Xmax,Ymin) :Pause :Line(Xmin,Ymax,Xmax,Ymin,0)
Draw a "unit square" centered at the origin:
:Line(1,1,-1,1) :Line(-1,1,-1,-1) :Line(-1,-1,1,-1) :Line(1,-1,1,1)