Modify this Rect by adding the given Margin to each side of the Rect.
@param {Margin} m The Margin to add to the Rect.
@return {Rect} this bigger Rect.
@see #subtractMargin
@see #grow
@see #inflate
Indicates whether this Rect contains the given Point/Rect.
@param {number} x The X coordinate of the Point or Rect to include in the new bounds.
@param {number} y The Y coordinate of the Point or Rect to include in the new bounds.
@param {number=} w The Width of the Rect to include in the new bounds, defaults to zero.
@param {number=} h The Height of the Rect to include in the new bounds, defaults to zero.
@return {boolean} True if the Point/Rect is contained within this Rect,
false otherwise.
@see #containsRect
@see #containsPoint
Indicates whether this Rect contains the given Point.
@param {Point} p The Point to check.
@return {boolean} True if the Point is contained within this Rect,
false otherwise.
@see #containsRect
@see #contains
Indicates whether this Rect contains the given Rect.
@param {Rect} r The Rect to check.
@return {boolean} True if the Rect is contained within this Rect,
false otherwise.
@see #containsPoint
@see #contains
Indicates whether the given Rect is equal to the current Rect.
@param {Rect} r The rectangle to compare to the current rectangle.
@return {boolean} True if the Rects are equivalent in x, y, width,
and height.
@see #equalTo
(undocumented)
True when the given Rect is nearly equal to this Rect.
@param {Rect} r The Rect to compare to the current Rect.
@return {boolean} True if the two Rects have respective X, Y, Width,
and Height values within 0.5, false otherwise.
Indicates whether the given Rect is equal to the current Rect.
@param {number} x
@param {number} y
@param {number} w the width.
@param {number} h the height.
@return {boolean} True if the Rects are equivalent in x, y, width, and height.
@see #equals
Modifies this Rect by adding some distance to each side of the Rect.
@param {number} t the amount to move the top side upwards; may be negative.
@param {number} r the amount to move the right side rightwards; may be negative.
@param {number} b the amount to move the bottom side downwards; may be negative.
@param {number} l the amount to move the left side leftwards; may be negative.
@return {Rect} this modified Rect.
@see #inflate
@see #addMargin
@see #subtractMargin
Modify this Rect so that its width and height are changed on all four sides,
equally on the left and right sides, and equally on the top and bottom sides.
When the arguments are negative, this operation deflates this Rect, but not beyond zero.
@param {number} w The additional width on each side, left and right; may be negative.
@param {number} h The additional height on each side, top and bottom; may be negative.
@return {Rect} this.
@since 2.3
@see #grow
@see #addMargin
@see #subtractMargin
Modify this Rect so that it is the intersection of this Rect and the rectangle
defined by x, y, w, h.
@param {number} x
@param {number} y
@param {number} w
@param {number} h
@return {Rect} this.
@see #intersectRect
@see #intersects
Modify this Rect so that it is the intersection of this Rect and the given Rect.
@param {Rect} r Rect to intersect with.
@return {Rect} this.
@see #intersect
@see #intersects
Determine if this Rect partly or wholly overlaps the rectangle
defined by x, y, w, h.
@param {number} x
@param {number} y
@param {number} w
@param {number} h
@return {boolean} true if there is any overlap.
@see #intersectsRect
@see #intersect
Determine if a given Rect is partly or wholly inside of this Rect.
@param {Rect} r Rect to test intersection with.
@return {boolean} true if there is an intersection.
@see #intersects
@see #intersectRect
Modify this Rect so that a given Spot is at a given (x,y) point using this Rect's size.
Return this rectangle for which the spot is at that point, without modifying the size.
Modify this Rect with new X, Y, Width, and Height values.
@param {number} x
@param {number} y
@param {number} w the width.
@param {number} h the height.
@return {Rect} this.
Modify this Rect by subtracting the given Margin from each side of the Rect.
@param {Margin} m The Margin to subtract from the Rect.
@return {Rect} this smaller Rect.
@see #addMargin
@see #grow
@see #inflate
Modify this Rect to be exactly big enough to contain both the original Rect and the given rectangular area.
@param {number} x The X coordinate of the Point or Rect to include in the new bounds.
@param {number} y The Y coordinate of the Point or Rect to include in the new bounds.
@param {number=} w The Width of the Rect to include in the new bounds, defaults to zero.
@param {number=} h The Height of the Rect to include in the new bounds, defaults to zero.
@return {Rect} this.
@see #unionRect
@see #unionPoint
Modify this Rect to be exactly big enough to contain both the original Rect and the given Point.
@param {Point} p The Point to include in the new bounds.
@return {Rect} this.
@see #unionRect
@see #union
Modify this Rect to be exactly big enough to contain this Rect and the given Rect.
@param {Rect} r The Rect to include in the new bounds.
@return {Rect} this.
@see #unionPoint
@see #union