Bounds class

Annotations
  • @JS('L.bounds')

Constructors

Bounds(Point corner1, Point corner2)
Creates a Bounds object from two corners coordinate pairs.

Properties

hashCode int
The hash code for this object.
no setterinherited
max Point
The bottom right corner of the rectangle.
getter/setter pair
min Point
The top left corner of the rectangle.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(Bounds otherBounds) bool
Returns true if the rectangle contains the given one
extend(Point point) Bounds
Extends the bounds to contain the given point.
getBottomLeft() Point
Returns the bottom-left point of the bounds.
getBottomRight() Point
Returns the bottom-right point of the bounds (i.e. this.max).
getCenter([bool? round]) Point
Returns the center point of the bounds.
getSize() Point
Returns the size of the given bounds
getTopLeft() Point
Returns the top-left point of the bounds (i.e. this.min).
getTopRight() Point
Returns the top-right point of the bounds.
intersects(Bounds otherBounds) bool
Returns true if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlaps(Bounds otherBounds) bool
Returns true if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.
toString() String
A string representation of this object.
inherited

Operators

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