NmLassoSelection class
Represents a lasso selection path drawn by the user
Constructors
-
NmLassoSelection({required List<
Offset> points, required bool isClockwise, required DateTime startTime}) -
Creates a NmLassoSelection.
const
- NmLassoSelection.start(Offset point)
-
Create a new lasso with a starting point
factory
Properties
- boundingBox → Rect
-
Get the bounding box of the lasso
no setter
- duration → Duration
-
Duration since lasso started
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClockwise → bool
-
Is clockwise.
final
- isValid → bool
-
Check if the lasso area is large enough to be valid
no setter
-
points
→ List<
Offset> -
Points.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime
-
Start time.
final
Methods
-
addPoint(
Offset point) → NmLassoSelection - Add a point to the lasso path
-
calculateArea(
) → double - Calculate the area of the lasso polygon
-
close(
) → NmLassoSelection - Close the lasso (add starting point to end)
-
containsPoint(
Offset point) → bool - Check if point is inside lasso polygon using ray casting
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
simplify(
double tolerance) → NmLassoSelection - Simplify the path by removing points that are too close together
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isClockwiseDirection(
List< Offset> points) → bool - Determine if lasso was drawn clockwise (select) or counter-clockwise (exclude)