goog.math.Box |
top
: number
Top.
|
right
: number
Right.
|
bottom
: number
Bottom.
|
left
: number
Left.
|
Rounds the fields to the next larger integer values.
Returns: !goog.math.Box
This box with ceil'd fields.
|
code » | |||||
Creates a copy of the box with the same dimensions.
Returns: !goog.math.Box
A clone of this Box.
|
code » | |||||
Returns whether the box contains a coordinate or another box.
Arguments:
Returns: boolean
Whether the box contains the coordinate or other box.
|
code » | |||||
Expands box with the given margins.
Arguments:
Returns: !goog.math.Box
A reference to this Box.
|
code » | |||||
![]()
Expand this box to include another box.
NOTE(user): This is used in code that needs to be very fast, please don't
add functionality to this function at the expense of speed (variable
arguments, accepting multiple argument types, etc).
Arguments:
|
code » | |||||
Rounds the fields to the next smaller integer values.
Returns: !goog.math.Box
This box with floored fields.
|
code » | |||||
Rounds the fields to nearest integer values.
Returns: !goog.math.Box
This box with rounded fields.
|
code » | |||||
Scales this coordinate by the given scale factors. The x and y dimension
values are scaled by
sx and opt_sy respectively.
If opt_sy is not given, then sx is used for both x and y.
Arguments:
Returns: !goog.math.Box
This box after scaling.
|
code » | |||||
Returns a nice string representing the box.
Returns: string
In the form (50t, 73r, 24b, 13l).
|
code » | |||||
Translates this box by the given offsets. If a
goog.math.Coordinate
is given, then the left and right values are translated by the coordinate's
x value and the top and bottom values are translated by the coordinate's y
value. Otherwise, tx and opt_ty are used to translate the x
and y dimension values.
Arguments:
Returns: !goog.math.Box
This box after translating.
|
code » |
Creates a Box by bounding a collection of goog.math.Coordinate objects
Arguments:
Returns: !goog.math.Box
A Box containing all the specified Coordinates.
|
code » | ||||
Returns whether a box contains a coordinate or another box.
Arguments:
Returns: boolean
Whether the box contains the coordinate or other box.
|
code » | ||||
Returns the distance between a coordinate and the nearest corner/side of a
box. Returns zero if the coordinate is inside the box.
Arguments:
Returns: number
The distance between
coord and the nearest
corner/side of box , or zero if coord is inside
box .
|
code » | ||||
Compares boxes for equality.
Arguments:
Returns: boolean
True iff the boxes are equal, or if both are null.
|
code » | ||||
Returns whether two boxes intersect.
Arguments:
Returns: boolean
Whether the boxes intersect.
|
code » | ||||
Returns whether two boxes would intersect with additional padding.
Arguments:
Returns: boolean
Whether the boxes intersect.
|
code » | ||||
Returns the relative x position of a coordinate compared to a box. Returns
zero if the coordinate is inside the box.
Arguments:
Returns: number
The x position of
coord relative to the nearest
side of box , or zero if coord is inside box .
|
code » | ||||
Returns the relative y position of a coordinate compared to a box. Returns
zero if the coordinate is inside the box.
Arguments:
Returns: number
The y position of
coord relative to the nearest
side of box , or zero if coord is inside box .
|
code » |