BoundingBox class

An axis-aligned or rotated bounding box defined by four corner points.

Constructors

BoundingBox({required Point topLeft, required Point topRight, required Point bottomRight, required Point bottomLeft})
Creates a bounding box with four corner points.
const
BoundingBox.fromMap(Map<String, dynamic> map)
Creates a bounding box from a map (isolate deserialization).
factory
BoundingBox.ltrb(double left, double top, double right, double bottom)
Creates an axis-aligned bounding box from left, top, right, and bottom edges.
factory

Properties

bottom → double
Bottom edge of the bounding box (y-coordinate of bottom-right corner).
no setter
bottomLeft → Point
Bottom-left corner point in absolute pixel coordinates.
final
bottomRight → Point
Bottom-right corner point in absolute pixel coordinates.
final
center → Point
Center point of the bounding box in absolute pixel coordinates.
no setter
corners → List<Point>
The four corner points as a list in order: top-left, top-right, bottom-right, bottom-left.
no setter
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height of the bounding box in pixels.
no setter
left → double
Left edge of the bounding box (x-coordinate of top-left corner).
no setter
Right edge of the bounding box (x-coordinate of bottom-right corner).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
top → double
Top edge of the bounding box (y-coordinate of top-left corner).
no setter
topLeft → Point
Top-left corner point in absolute pixel coordinates.
final
topRight → Point
Top-right corner point in absolute pixel coordinates.
final
width → double
Width of the bounding box in pixels.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts this bounding box to a map for isolate serialization.
toString() → String
A string representation of this object.
inherited

Operators

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