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

animatePanBy

Animate pan by offset Offset in pixels and suspend until its finished

animatePanBy

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

Animate pan by offset Offset in pixels and suspend until its finished

Parameters

offset offset to pan, in pixels
animationSpec AnimationSpec to be used for pan animation

animatePanBy

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

Animate pan by offset Offset in pixels and suspend until its finished

Parameters

offset offset to pan, in pixels
animationSpec AnimationSpec to be used for pan animation
centroid the Offset around which the pan should occur, if any. The default value is Offset.Unspecified, which leaves the behavior up to the implementation of the TransformableState.