Difference between revisions of "Legacy:Rectangle"
From Spherical
(Created initial page) |
(added navbox) |
||
Line 32: | Line 32: | ||
* [[API:FlipScreen|FlipScreen]]() | * [[API:FlipScreen|FlipScreen]]() | ||
− | + | {{API:Video/navbox}} |
Latest revision as of 21:09, 4 June 2013
Draws a rectangle to screen at location x, y, with a certain width, height, and color.
Contents
Usage
Rectangle(x, y, width, height, color);
- x the X coordinate, start of rectangle
- y the Y coordinate, start of rectangle
- width the width of rectangle
- height the height of the rectangle
- color a color object created with CreateColor
Notes
Remember that FlipScreen must be called before any drawing is visible on the screen.
Examples
Fill the screen with red. Mwahaha!
var Red = CreateColor(255, 0, 0);
Rectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Red);
See also
- Sphere Color Object
- CreateColor(r, g, b, a)
- Line(x1, x2, y1, y2, color)
- Point(x, y, color)
- FlipScreen()