Difference between revisions of "gc:drawLine"
Jump to navigation
Jump to search
m (Text replace - "| <u>" to "| <u><center>") |
m (Text replace - "</u> ||" to "</center></u> ||") |
||
Line 13: | Line 13: | ||
! Parameter !! Type !! Description | ! Parameter !! Type !! Description | ||
|- | |- | ||
− | | <u><center><center>x1</center></u> || number || The x-coordinate of the 1st point. | + | | <u><center><center>x1</center></center></u> || number || The x-coordinate of the 1st point. |
|- | |- | ||
− | | <u><center><center>y1</center></u> || number || The y-coordinate of the 1st point. | + | | <u><center><center>y1</center></center></u> || number || The y-coordinate of the 1st point. |
|- | |- | ||
− | | <u><center><center>x2</center></u> || number || The x-coordinate of the 2nd point. | + | | <u><center><center>x2</center></center></u> || number || The x-coordinate of the 2nd point. |
|- | |- | ||
− | | <u><center><center>y2</center></u> || number || The y-coordinate of the 2nd point. | + | | <u><center><center>y2</center></center></u> || number || The y-coordinate of the 2nd point. |
|} | |} | ||
Revision as of 23:41, 30 May 2011
gc:drawLine is a function that is part of gc (Graphics Context).
It basically draws a line between the two points defined by their coordinates.
This has been introduced in TI-Nspire OS 3.0 (Changes).
Syntax
functionName(x1, y1, x2 , y2)
Parameter | Type | Description |
---|---|---|
number | The x-coordinate of the 1st point. | |
number | The y-coordinate of the 1st point. | |
number | The x-coordinate of the 2nd point. | |
number | The y-coordinate of the 2nd point. |
Example
gc:drawLine(0, 0, 100, 50)
Good to know
This function is the one you can use in order to draw a simple point. You can do as follow :
gc:drawLine(20, 20, 20, 20)
This trick also works with gc:fillRect etc.