Rectangle Class
Represents a rectangle as defined by the points (x, y) and (x+width, y+height).
Constructor
Methods
clone
()
Rectangle
Returns a clone of the Rectangle instance.
Returns:
Rectangle:
a clone of the Rectangle instance.
copy
(
Rectangle
-
rectangle
Copies all properties from the specified rectangle to this rectangle.
Parameters:
-
rectangle
RectangleThe rectangle to copy properties from.
Returns:
Rectangle:
This rectangle. Useful for chaining method calls.