Rectangle class final
Rectangle with inclusive-exclusive bounds: [min, max).
Upstream: third_party/ultraviolet/buffer.go (Rectangle).
A rectangle with inclusive-exclusive bounds: [min, max).
Describes a region in cell coordinates using top-left (minX, minY) and bottom-right (maxX, maxY) corners. Width and height are derived.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- height → int
-
The height of this rectangle in cells.
no setter
- isEmpty → bool
-
Whether this rectangle has no area.
no setter
- maxX → int
-
final
- maxY → int
-
final
- minX → int
-
final
- minY → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
The width of this rectangle in cells.
no setter
Methods
-
contains(
Position p) → bool -
Returns whether
plies within this rectangle. -
containsRect(
Rectangle other) → bool -
Returns whether
otheris entirely contained within this rectangle. -
intersect(
Rectangle other) → Rectangle -
Returns the intersection of this and
other, or an empty rectangle. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlaps(
Rectangle other) → bool -
Returns whether
otheroverlaps this rectangle. -
toString(
) → String -
A string representation of this object.
inherited
-
union(
Rectangle other) → Rectangle -
Returns the minimal rectangle that contains both this and
other.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override