Class Rectangle
A rectangle.
Usage:
-- Create a filled square
local rect = Rectangle(0, 0, 10, 10)
Fields
-
Rectangle.color
-
The color of the rectangle.
-
Rectangle.lineSize
-
The width of the line, if not filled.
Constructor
-
Rectangle:_init (x, y, width, height[, color="black"[, lineSize=nil]])
-
Constructs a new Rectangle.
Parameters:
- x
The x coordinate of the new component, relative to its parent.
- y
The y coordinate of the new component, relative to its parent.
- width
The width of the new component.
- height
The height of the new component.
- color
The color of the new component.
(default "black")
- lineSize
The width of the line, if nil, the rectangle will
be filled.
(default nil)