Difference between revisions of "83Plus:Basic:Graphics:Line("
From WikiTI
m (→Comments) |
|||
Line 15: | Line 15: | ||
*Endpoint coordinates are those defined by window settings, not by pixels | *Endpoint coordinates are those defined by window settings, not by pixels | ||
− | *The last argument is assumed | + | *The last argument is assumed to be 1 if omitted. A value of 1 draws a line, a value of 0 erases one. |
*Will throw no ERR:DOMAINs | *Will throw no ERR:DOMAINs | ||
*Functions, plots, and axes are not redrawn. | *Functions, plots, and axes are not redrawn. |
Revision as of 19:31, 7 December 2005
Contents
Synopsis
Token size: 1 byte
Syntax: Line(X1,Y1,X2,Y2,[1 or 0])
Draws or erases a line from (X1, Y1) to (X2, Y2).
Outputs:
Line drawn to or erased from the graph screen.
Comments
- Endpoint coordinates are those defined by window settings, not by pixels
- The last argument is assumed to be 1 if omitted. A value of 1 draws a line, a value of 0 erases one.
- 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)