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

Rectangle({required int minX, required int minY, required int maxX, required int maxY})
const

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 p lies within this rectangle.
containsRect(Rectangle other) bool
Returns whether other is 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 other overlaps 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