DynamicPath class
A Bezier path with either straight line or cubic Bezier line This is the key component of this package, especially for morphing Instead of constructing a Path object directly like others do, we construct a DynamicPath instead, which remembers all its control points.
Constructors
-
DynamicPath({required Size size, required List<
DynamicNode> nodes})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nodes
↔ List<
DynamicNode> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ Size
-
getter/setter pair
Methods
-
getNextPathControlPointsAt(
int index) → List< Offset> - Get the necessary points to draw the straight or cubic Bezier path at index
-
getNodeWithControlPoints(
int index) → DynamicNode -
getOutlierIndex(
{required Rect bound}) → int -
getPath(
Size newSize) → Path - convert this to a Path
-
getPathLengthAt(
int index) → double -
moveNodeBy(
int index, Offset offset) → void -
moveNodeControlTo(
int index, bool prev, Offset offset) → void - Reserved for future more editing mode move either one of the control point of the node to offset
-
moveNodeTo(
int index, Offset offset) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeOverlappingNodes(
) → void -
resize(
Size newSize) → void - used to try implement multi colored borders does not work great with concave shapes
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- boxBoundingTolerance ↔ double
-
getter/setter pair
- defaultPointPrecision ↔ int
-
getter/setter pair
Static Methods
-
estimateCubicLength(
List< Offset> controlPoints) → double - give a rough estimation of the length of a cubic Bezier path
-
splitCubicAt(
double t, List< Offset> controlPoints) → List<Offset> - split a cubic Bezier path at parameter t