🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

animateZoomBy

Animate zoom by a ratio of zoomFactor over the current size and suspend until its finished.

animateZoomBy

Source set: Common
@Deprecated(message = "Maintained for binary compatibility", level = DeprecationLevel.HIDDEN)
public suspend fun TransformableState.animateZoomBy(
    zoomFactor: Float,
    animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
): Unit

Animate zoom by a ratio of zoomFactor over the current size and suspend until its finished.

Parameters

zoomFactor ratio over the current size by which to zoom. For example, if zoomFactor is 3f, zoom will be increased 3 fold from the current value.
animationSpec AnimationSpec to be used for animation

animateZoomBy

Source set: Common
public suspend fun TransformableState.animateZoomBy(
    zoomFactor: Float,
    animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
    centroid: Offset = Offset.Unspecified,
)

Animate zoom by a ratio of zoomFactor over the current size and suspend until its finished.

Parameters

zoomFactor ratio over the current size by which to zoom. For example, if zoomFactor is 3f, zoom will be increased 3 fold from the current value.
animationSpec AnimationSpec to be used for animation
centroid the Offset around which the zoom should occur, if any. The default value is Offset.Unspecified, which leaves the behavior up to the implementation of the TransformableState.