Function

MorphPolygonShape

Creates a Shape that morphs between start and end as progress moves from 0f to 1f.

MorphPolygonShape

Source set: Common
public fun MorphPolygonShape(start: PolygonShape, end: PolygonShape, progress: () -> Float): Shape

Creates a Shape that morphs between start and end as progress moves from 0f to 1f.

Reads progress each time the outline is resolved. Values at or below 0f resolve to start; values at or above 1f resolve to end. Create a separate instance for each morphing element. Two shapes created with equal endpoints and the same progress instance compare equal.

Parameters

start starting shape of the morph
end ending shape of the morph
progress returns the current morph progress

Content updated: