Returns a new rectangle which completely contains both input rectangles.
Arguments:
Returns: goog.math.Rect
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: !goog.math.Rect
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: !Array.<!goog.math.Rect>
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: boolean
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: goog.math.Rect
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: boolean
Whether a and b intersect.
|
code » |