FlatMorph class final

A Morph flattened to two coordinate arrays (8 doubles per cubic: anchor0, control0, control1, anchor1) so a frame only lerps numbers into a reused Path (motion-flutter §3.2). asCubics(t) is a pure per-coordinate lerp of the same matched pairs, so this is exact.

Progress outside 0, 1 extrapolates like Morph does (overshoot).

Constructors

FlatMorph.fromCubics(List<Cubic> start, List<Cubic> end)
A morph between two matched cubic lists of equal length.
FlatMorph.fromMorph(Morph morph)
Flattens morph (calls asCubics twice; build it ahead of time).
factory
FlatMorph.still(RoundedPolygon polygon)
A degenerate "morph" that always draws polygon.
factory

Properties

bounds → Rect
Control-point bounds covering both endpoints (unit-square space). The drawn shape lies inside it for progress in 0, 1.
no setter
cubicCount → int
Number of cubics.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

coordinate(int index, double t) → double
Coordinate index (0 ≤ index < 8 × cubicCount) at progress t.
coordinatesAt(double t) → List<double>
Every coordinate at progress t (tests; allocates).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPath(double t, Path path) → Path
Resets path to the shape at progress t and returns it.
toString() → String
A string representation of this object.
inherited

Operators

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