ParticleRect class
Help to reuse colors after rendering
Constructors
- ParticleRect.fromLTWH(double left, double top, double width, double height)
- Creates a ParticleRect from the left, top, width, and height parameters.
Properties
- bottom ↔ double
-
The offset of the bottom edge of this rectangle from the y axis.
getter/setter pairoverride-getter
- bottomCenter → Offset
-
The offset to the center of the bottom edge of this rectangle.
no setterinherited
- bottomLeft → Offset
-
The offset to the intersection of the bottom and left edges of this rectangle.
no setterinherited
- bottomRight → Offset
-
The offset to the intersection of the bottom and right edges of this rectangle.
no setterinherited
- center → Offset
-
The offset to the point halfway between the left and right and the top and
bottom edges of this rectangle.
no setterinherited
- centerLeft → Offset
-
The offset to the center of the left edge of this rectangle.
no setterinherited
- centerRight → Offset
-
The offset to the center of the right edge of this rectangle.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNaN → bool
-
Whether any of the dimensions are
NaN
.no setterinherited - height → double
-
The distance between the top and bottom edges of this rectangle.
no setterinherited
- isEmpty → bool
-
Whether this rectangle encloses a non-zero area. Negative areas are
considered empty.
no setterinherited
- isFinite → bool
-
Whether all coordinates of this rectangle are finite.
no setterinherited
- isInfinite → bool
-
Whether any of the coordinates of this rectangle are equal to positive infinity.
no setterinherited
- left ↔ double
-
The offset of the left edge of this rectangle from the x axis.
getter/setter pairoverride-getter
- longestSide → double
-
The greater of the magnitudes of the width and the height of this
rectangle.
no setterinherited
- right ↔ double
-
The offset of the right edge of this rectangle from the x axis.
getter/setter pairoverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortestSide → double
-
The lesser of the magnitudes of the width and the height of this
rectangle.
no setterinherited
- size → Size
-
The distance between the upper-left corner and the lower-right corner of
this rectangle.
no setterinherited
- top ↔ double
-
The offset of the top edge of this rectangle from the y axis.
getter/setter pairoverride-getter
- topCenter → Offset
-
The offset to the center of the top edge of this rectangle.
no setterinherited
- topLeft → Offset
-
The offset to the intersection of the top and left edges of this rectangle.
no setterinherited
- topRight → Offset
-
The offset to the intersection of the top and right edges of this rectangle.
no setterinherited
- width → double
-
The distance between the left and right edges of this rectangle.
no setterinherited
Methods
-
contains(
Offset offset) → bool -
Whether the point specified by the given offset (which is assumed to be
relative to the origin) lies between the left and right and the top and
bottom edges of this rectangle.
inherited
-
deflate(
double delta) → Rect -
Returns a new rectangle with edges moved inwards by the given delta.
inherited
-
expandToInclude(
Rect other) → Rect -
Returns a new rectangle which is the bounding box containing this
rectangle and the given rectangle.
inherited
-
inflate(
double delta) → Rect -
Returns a new rectangle with edges moved outwards by the given delta.
inherited
-
intersect(
Rect other) → Rect -
Returns a new rectangle that is the intersection of the given
rectangle and this rectangle. The two rectangles must overlap
for this to be meaningful. If the two rectangles do not overlap,
then the resulting Rect will have a negative width or height.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlaps(
Rect other) → bool -
Whether
other
has a nonzero area of overlap with this rectangle.inherited -
shift(
Offset offset) → Rect -
Returns a new rectangle translated by the given offset.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
double translateX, double translateY) → Rect -
Returns a new rectangle with translateX added to the x components and
translateY added to the y components.
inherited
-
update(
int width, int height) → void - Updates the particle's rectangle by setting the right and bottom edges based on the given width and height.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited