Difference between revisions of "gc:drawRect"
Jump to navigation
Jump to search
(Created page with "gc:'''drawRect''' is a function that is part of the gc (Graphics Context). Draws a rectangle at coordinates (x,y) with the “x” side being “xwidth” long ...") |
(No difference)
|
Latest revision as of 13:50, 11 July 2011
gc:drawRect is a function that is part of the gc (Graphics Context).
Draws a rectangle at coordinates (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long.
This has been introduced in TI-Nspire OS 3.0 (Changes).
Syntax
gc:drawRect(x, y, xwidth, yheight)
Parameter | Type | Description |
---|---|---|
number | The x-coordinate of the top-left point. | |
number | The y-coordinate of the top-left point. | |
number | The width of the rectangle | |
number | The height of the rectangle |
Example
gc:drawRect(0,0,100,100)
This draws a recatngle (square, actually) whose points are at the given coordinates. This code does the same thing as : gc:drawPolyLine({0,0, 0,100, 100,100, 100,0, 0,0}).
See also