CubicPath class
Manages a sequence of points to form a smooth, drawable path using cubic Bezier curves.
Constructors
- CubicPath.new({SignaturePathSetup setup = const SignaturePathSetup()})
-
Creates a CubicPath with the given
setup
parameters.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDot → bool
-
Indicates whether the path consists of a single 'dot' (a line with zero velocity).
no setter
- isFilled → bool
-
Indicates whether the path contains any drawn lines.
no setter
-
lines
→ List<
CubicLine> -
Returns an unmodifiable list of the CubicLine segments that form this path.
no setter
-
points
→ List<
OffsetPoint> -
Returns an unmodifiable list of the raw OffsetPoints that make up this path.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setup → SignaturePathSetup
-
The setup parameters for this path, including smoothing, velocity, and pressure ratios.
final
Methods
-
add(
Offset point, {double? pressure}) → void -
Adds a new
point
to the active path. This method calculates new cubic line segments and updates the path. -
begin(
Offset point, {double velocity = 0.0, double? pressure}) → void -
Starts a new path at the given
point
. This method must be called before add or end. -
clear(
) → void - Clears all data associated with this path, effectively resetting it.
-
copy(
) → CubicPath -
end(
{Offset? point, double? pressure}) → bool -
Ends the active path at the given
point
. This method finalizes the path segments and handles cases for very short paths (dots or single lines). -
equals(
CubicPath other) → bool -
Checks if this CubicPath is equal to
other
based on their raw points. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setScale(
double ratio) → void -
Scales the entire path by a given
ratio
. This method updates all points, arcs, and lines within the path. -
toArcs(
) → List< CubicArc> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited