Difference between revisions of "83Plus:Basic:Graphics:Line("

From WikiTI
Jump to: navigation, search
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(X1,Y1,X2,Y2,[1 or 0])
+
'''Syntax:''' Line(''x1'',''y1'',''x2'',''y2'',[drawmode])
  
Draws or erases a line from (X1, Y1) to (X2, Y2).
+
Draws or erases a line.
  
 
== Outputs: ==
 
== Outputs: ==
  
Line drawn to or erased from the graph screen.
+
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
*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.
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)
+
  :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


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)

See also:

Horizontal
Vertical