Difference between revisions of "83Plus:Basic:Graphics:Line("
From WikiTI
m (→Comments) |
(Cleaned up formatting to match template) |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
'''Token size:''' 1 byte | '''Token size:''' 1 byte | ||
− | '''Syntax:''' Line( | + | '''Syntax:''' Line(''x1'',''y1'',''x2'',''y2'',[drawmode]) |
− | Draws or erases a line | + | Draws or erases a line. |
== Outputs: == | == 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 == | == Comments == | ||
*Endpoint coordinates are those defined by window settings, not by pixels | *Endpoint coordinates are those defined by window settings, not by pixels | ||
− | |||
*Will throw no ERR:DOMAINs | *Will throw no ERR:DOMAINs | ||
*Functions, plots, and axes are not redrawn. | *Functions, plots, and axes are not redrawn. | ||
Line 31: | Line 30: | ||
:Line(-1,1,-1,-1) | :Line(-1,1,-1,-1) | ||
:Line(-1,-1,1,-1) | :Line(-1,-1,1,-1) | ||
− | : | + | :Line(1,-1,1,1) |
== See also: == | == See also: == | ||
+ | [[83Plus:Basic:Graphics:Horizontal|Horizontal]]<br /> | ||
+ | [[83Plus:Basic:Graphics:Vertical|Vertical]] |
Latest revision as of 15:20, 16 September 2006
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)