Class: Rectangle

Rectangle

Rectangle

new Rectangle(x, y, w, h) → {Rectangle}

Describes a rectangle.
Parameters:
Name Type Description
x Number The x position of the rectangle.
y Number The y position of the rectangle.
w Number The width of the rectangle.
h Number The height of the rectangle.
Author:
  • thegoldenmule
Source:
Returns:
Type
Rectangle

Methods

copy(rect)

Copies the data from a Rectangle.
Parameters:
Name Type Description
rect Rectangle The Rectangle to copy data from.
Source:

set(x, y, w, h)

Sets a Rectangle's properties.
Parameters:
Name Type Description
x Number The x position of the rectangle.
y Number The y position of the rectangle.
w Number The width of the rectangle.
h Number The height of the rectangle.
Source: