A class for representing CSS dimensions.
In contrast to the more general purpose Rectangle class, this class's values are mutable, so one can change the height of an element programmatically.
Important note: use of these methods will perform CSS calculations that can trigger a browser reflow. Therefore, use of these properties during an animation frame is discouraged. See also: Browser Reflow
- Extends
- Object
- MutableRectangle<num>
- CssRect
Properties
- num bottom
-
read-only, inheritedThe y-coordinate of the bottom edge.
- Point<num> bottomLeft
-
read-only, inherited
- Point<num> bottomRight
-
read-only, inherited
- int hashCode
-
read-only, inherited
- num height
-
read / writeThe height of this rectangle.
- num height
-
read / write, inheritedSets the height of the rectangle.
- num left
-
read-only
- num left
-
read / write, inheritedThe x-coordinate of the left edge.
- num right
-
read-only, inheritedThe x-coordinate of the right edge.
- num top
-
read-only
- num top
-
read / write, inheritedThe y-coordinate of the left edge.
- Point<num> topLeft
-
read-only, inherited
- Point<num> topRight
-
read-only, inherited
- num width
-
read / writeThe width of this rectangle.
- num width
-
read / write, inheritedSets the width of the rectangle.
Constructors
Operators
-
operator ==(
other) → bool -
inheritedThe equality operator.
Methods
-
boundingBox(
Rectangle<num> other) → Rectangle<num> -
inheritedReturns a new rectangle which completely contains
this
andother
. -
containsPoint(
Point<num> another) → bool -
inheritedTests whether
another
is inside or along the edges ofthis
. -
containsRectangle(
Rectangle<num> another) → bool -
inheritedTests whether
this
entirely containsanother
. -
intersection(
Rectangle<num> other) → Rectangle<num> -
inheritedComputes the intersection of
this
andother
. -
intersects(
Rectangle<num> other) → bool -
inheritedReturns true if
this
intersectsother
. -
toString(
) → String -
inheritedReturns a string representation of this object.