Skip to main content

graphics.rectangle()

graphics.rectangle(param_table)
graphics.rectangle(x, y, width, heigth)

This function creates a SimpleGeometry object as a rectangle.

Parameters

ParameterTypeDescription
param_tabletableThis parameter is in associative array table format, meaning it's specified by keys rather than parameter positions. See the Parameters Table section.
xnumberX-coordinate of the top-left corner of the rectangle.
ynumberY-coordinate of the top-left corner of the rectangle.
widthnumberWidth of the rectangle.
heigthnumberHeight of the rectangle.

Parameters Table

KeyTypeDescription
xnumberX-coordinate of the top-left corner of the rectangle.
ynumberY-coordinate of the top-left corner of the rectangle.
widthnumberWidth of the rectangle.
heigthnumberHeight of the rectangle.

Return Values

This function returns a SimpleGeometry object.

See Also