W3cubDocs

/Dart 2

Rectangle<T extends num> class

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

Implementers

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)
factory
Create a rectangle spanned by the points a and b; [...]

Properties

height → T
final
The height of the rectangle.
left → T
final
The x-coordinate of the left edge.
top → T
final
The y-coordinate of the top edge.
width → T
final
The width of the rectangle.
bottom → T
read-only, inherited
The y-coordinate of the bottom edge.
bottomLeftPoint<T>
read-only, inherited
bottomRightPoint<T>
read-only, inherited
hashCodeint
read-only, inherited
The hash code for this object. [...]
The x-coordinate of the right edge.
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
topLeftPoint<T>
read-only, inherited
topRightPoint<T>
read-only, inherited

Methods

boundingBox(Rectangle<T> other) → Rectangle<T>
inherited
Returns a new rectangle which completely contains this and other.
containsPoint(Point<num> another) → bool
inherited
Tests whether another is inside or along the edges of this.
containsRectangle(Rectangle<num> another) → bool
inherited
Tests whether this entirely contains another.
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.
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
toString() → String
inherited
Returns a string representation of this object.

Operators

operator ==(dynamic other) → bool
inherited
The equality operator. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-math/Rectangle-class.html