Rect<T extends num> class
Utility
Represents a rectangle defined by a top-left corner left, top and a width and height.
Constructors
Properties
- bottom → num
-
The y-coordinate of the bottom edge of the rectangle.
Calculated as
top + height
.no setter - centerX → double
-
The x-coordinate of the center of the rectangle.
Calculated as
left + width / 2
.no setter - centerY → double
-
The y-coordinate of the center of the rectangle.
Calculated as
top + height / 2
.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- height ↔ T
-
The height of the rectangle.
getter/setter pair
- left ↔ T
-
The x-coordinate of the left edge of the rectangle.
getter/setter pair
- right → num
-
The x-coordinate of the right edge of the rectangle.
Calculated as
left + width
.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- top ↔ T
-
The y-coordinate of the top edge of the rectangle.
getter/setter pair
- width ↔ T
-
The width of the rectangle.
getter/setter pair
- x ↔ T
-
The x-coordinate of the left edge of the rectangle. Alias for left.
getter/setter pair
- y ↔ T
-
The y-coordinate of the top edge of the rectangle. Alias for top.
getter/setter pair
Methods
-
containsPoint(
num px, num py) → bool -
Checks if the rectangle contains the point (
px
,py
). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
T left, T top, T width, T height) → dynamic - Sets the properties of this rectangle.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override