Rect class

A 2D rectangle representing bounds in terminal space.

Constructors

Rect(int x, int y, int width, int height)
Creates a new Rect with the specified x, y, width, and height.
const

Properties

bottom int
The bottom edge y-coordinate (exclusive).
no setter
hashCode int
The hash code for this object.
no setteroverride
height int
The height of the rectangle.
final
left int
The left edge x-coordinate.
no setter
The right edge x-coordinate (exclusive).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top int
The top edge y-coordinate.
no setter
width int
The width of the rectangle.
final
x int
The horizontal x-coordinate of the rectangle's top-left corner.
final
y int
The vertical y-coordinate of the rectangle's top-left corner.
final

Methods

contains(int cellX, int cellY) bool
Whether (cellX, cellY) is inside this rectangle.
intersect(Rect other) Rect
Calculates the intersection rectangle between this and other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override