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
fromtoto; ExpressiveMorph.between shares one. - ExpressiveMorph.between(ExpressiveMaterialShape from, ExpressiveMaterialShape to)
-
The shared morph from
fromtoto, 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
progressas 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
progressin the unit square scaled tosize(Compose'sMorph.toPath, start angle 0) intointo, replacing its contents.intobelongs to the caller: keep one per clipper or painter and reuse it every frame.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited