Brush2DExtent class

The extent of a 2D brush selection.

Constructors

Brush2DExtent(BrushExtent x, BrushExtent y)
Creates a Brush2DExtent.
const
Brush2DExtent.fromRect(Rect rect)
Creates a Brush2DExtent from a Rect.
factory

Properties

area → double
The area of the selection.
no setter
bottom → double
The bottom edge of the selection.
no setter
hashCode → int
The hash code for this object.
no setteroverride
height → double
The height of the selection.
no setter
isEmpty → bool
Whether the selection is empty.
no setter
left → double
The left edge of the selection.
no setter
normalized → Brush2DExtent
Returns a normalized extent where starts <= ends.
no setter
The right edge of the selection.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
top → double
The top edge of the selection.
no setter
width → double
The width of the selection.
no setter
x → BrushExtent
The horizontal extent.
final
y → BrushExtent
The vertical extent.
final

Methods

clamp(Rect bounds) → Brush2DExtent
Clamps the extent to the given bounds.
contains(double px, double py) → bool
Whether a point is within the selection.
copyWith({BrushExtent? x, BrushExtent? y}) → Brush2DExtent
Creates a copy with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toRect() → Rect
Returns the selection as a Rect.
toString() → String
A string representation of this object.
override

Operators

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

Constants

empty → const Brush2DExtent
Creates an empty extent.