ExpressiveMorph class

A morph between two library shapes (Compose's Morph): the curves of both matched once, then any progress between them written into a Path the caller owns and reuses — nothing is allocated per frame. The matched data is shared and immutable; the output path never is, so any number of clippers and painters can use one pair at their own progress. Progress is what a spring drives (0: from, 1: to; a little beyond overshoots).

Constructors

ExpressiveMorph(ExpressiveMaterialShape from, ExpressiveMaterialShape to)
The morph from from to to; ExpressiveMorph.between shares one.
ExpressiveMorph.between(ExpressiveMaterialShape from, ExpressiveMaterialShape to)
The shared morph from from to to, matched once per pair.
factory

Properties

from → ExpressiveMaterialShape
The shape the morph starts from.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
to → ExpressiveMaterialShape
The shape the morph ends at.
final

Methods

cubicsAt(double progress) → List<List<double>>
The shape at progress as Compose's cubics, each a list of eight numbers (anchor, control, control, anchor): allocates, for tests and tools, never per frame.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
writePath(Path into, double progress, Size size) → void
Writes the shape at progress in the unit square scaled to size (Compose's Morph.toPath, start angle 0) into into, replacing its contents. into belongs to the caller: keep one per clipper or painter and reuse it every frame.

Operators

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