Rectangle<T extends num> class

A class for representing two-dimensional rectangles whose properties are immutable.

A class for representing two-dimensional rectangles whose properties are immutable.

Implemented by

Constructors

Rectangle(T left, T top, T width, T height)
const
Create a rectangle spanned by (left, top) and (left+width, top+height).
Rectangle.fromPoints(Point<T> a, Point<T> b)
Create a rectangle spanned by the points a and b;

Instance Properties

left T
read-only
top T
read-only
width T
read-only
height T
read-only
hashCode int Inherited
read-only
read-only
bottom T Inherited
read-only
topLeft Point<T> Inherited
read-only
topRight Point<T> Inherited
read-only
bottomRight Point<T> Inherited
read-only
bottomLeft Point<T> Inherited
read-only
bottomLeft Point<T> Inherited
read-only
bottomRight Point<T> Inherited
read-only
topRight Point<T> Inherited
read-only
bottom T Inherited
read-only
read-only
topLeft Point<T> Inherited
read-only

Instance Methods

toString() → String Inherited
Returns a string representation of this object.
intersection(Rectangle<T> other) → Rectangle<T> Inherited
Computes the intersection of this and other.
intersects(Rectangle<num> other) → bool Inherited
Returns true if this intersects other.
boundingBox(Rectangle<T> other) → Rectangle<T> Inherited
Returns a new rectangle which completely contains this and other.
containsRectangle(Rectangle<num> another) → bool Inherited
Tests whether this entirely contains another.
containsPoint(Point<num> another) → bool Inherited
Tests whether another is inside or along the edges of this.
boundingBox(Rectangle<T> other) → Rectangle<T> Inherited
Returns a new rectangle which completely contains this and other.
intersection(Rectangle<T> other) → Rectangle<T> Inherited
Computes the intersection of this and other.

Operators

operator ==(other) → bool Inherited
The equality operator.