| goog.math.Rect |
|
x
:
Left.
|
|
y
:
Top.
|
|
w
:
Width.
|
|
h
:
Height.
|
boundingRect(rect)
Expand this rectangle to also include the area of the given rectangle.
Arguments:
|
code » | ||
|
Returns a new copy of the rectangle.
Returns:
A clone of this Rectangle.
|
code » | ||
|
Tests whether this rectangle entirely contains another rectangle or
coordinate.
Arguments:
Returns:
Whether this rectangle contains given rectangle or coordinate.
|
code » | ||
|
Computes the difference regions between this rectangle and
rect. The
return value is an array of 0 to 4 rectangles defining the remaining regions
of this rectangle after the other has been subtracted.
Arguments:
Returns:
An array with 0 to 4 rectangles which together define the difference area of rectangle a minus rectangle b.
|
code » | ||
|
Returns the size of this rectangle.
Returns:
The size of this rectangle.
|
code » | ||
|
Computes the intersection of this rectangle and the rectangle parameter. If
there is no intersection, returns false and leaves this rectangle as is.
Arguments:
Returns:
True iff this rectangle intersects with the parameter.
|
code » | ||
|
Returns whether a rectangle intersects this rectangle.
Arguments:
Returns:
Whether rect intersects this rectangle.
|
code » | ||
|
Returns a new Box object with the same position and dimensions as this
rectangle.
Returns:
A new Box representation of this Rectangle.
|
code » | ||
|
Returns a nice string representing size and dimensions of rectangle.
Returns:
In the form (50, 73 - 75w x 25h).
|
code » |
|
Returns a new rectangle which completely contains both input rectangles.
Arguments:
Returns:
A new bounding rect, or null if either rect is null.
|
code » | |||
|
Creates a new Rect object with the same position and dimensions as a given
Box. Note that this is only the inverse of toBox if left/top are defined.
Arguments:
Returns:
A new Rect initialized with the box's position and size.
|
code » | |||
|
Computes the difference regions between two rectangles. The return value is
an array of 0 to 4 rectangles defining the remaining regions of the first
rectangle after the second has been subtracted.
Arguments:
Returns:
An array with 0 to 4 rectangles which together define the difference area of rectangle a minus rectangle b.
|
code » | |||
|
Compares rectangles for equality.
Arguments:
Returns:
True iff the rectangles have the same left, top, width, and height, or if both are null.
|
code » | |||
|
Returns the intersection of two rectangles. Two rectangles intersect if they
touch at all, for example, two zero width and height rectangles would
intersect if they had the same top and left.
Arguments:
Returns:
A new intersection rect (even if width and height are 0), or null if there is no intersection.
|
code » | |||
|
Returns whether two rectangles intersect. Two rectangles intersect if they
touch at all, for example, two zero width and height rectangles would
intersect if they had the same top and left.
Arguments:
Returns:
Whether a and b intersect.
|
code » |