<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Maintained for binary compatibility



<h2 id="animateby-zoomfactor-panoffset-rotationdegrees-zoomanimationspec-pananimationspec-rotationanimationspec">animateBy</h2>

```kotlin
suspend fun TransformableState.animateBy(
    zoomFactor: Float,
    panOffset: Offset,
    rotationDegrees: Float,
    zoomAnimationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
    panAnimationSpec: AnimationSpec<Offset> = SpringSpec(stiffness = Spring.StiffnessLow),
    rotationAnimationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
) =
    animateBy(
        zoomFactor = zoomFactor,
        panOffset = panOffset,
        rotationDegrees = rotationDegrees,
        zoomAnimationSpec = zoomAnimationSpec,
        panAnimationSpec = panAnimationSpec,
        rotationAnimationSpec = rotationAnimationSpec,
        centroid = Offset.Unspecified,
    )
```


Animate zoom, pan, and rotation simultaneously and suspend until the animation is finished.

Zoom is animated by a ratio of `zoomFactor` over the current size. Pan is animated by `panOffset`
in pixels. Rotation is animated by the value of `rotationDegrees` clockwise. Any of these
parameters can be set to a no-op value that will result in no animation of that parameter. The
no-op values are the following: `1f` for `zoomFactor`, `Offset.Zero` for `panOffset`, and `0f`
for `rotationDegrees`.

#### 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. |
| panOffset | offset to pan, in pixels |
| rotationDegrees | the degrees by which to rotate clockwise |
| zoomAnimationSpec | `AnimationSpec` to be used for animating zoom |
| panAnimationSpec | `AnimationSpec` to be used for animating offset |
| rotationAnimationSpec | `AnimationSpec` to be used for animating rotation |






<hr class="docs-overload-divider">


<h2 id="animateby-zoomfactor-panoffset-rotationdegrees-zoomanimationspec-pananimationspec-rotationanimationspec-centroid">animateBy</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
suspend fun TransformableState.animateBy(
    zoomFactor: Float,
    panOffset: Offset,
    rotationDegrees: Float,
    zoomAnimationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
    panAnimationSpec: AnimationSpec<Offset> = SpringSpec(stiffness = Spring.StiffnessLow),
    rotationAnimationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow),
    centroid: Offset = Offset.Unspecified,
)
```


Animate zoom, pan, and rotation simultaneously and suspend until the animation is finished.

Zoom is animated by a ratio of `zoomFactor` over the current size. Pan is animated by `panOffset`
in pixels. Rotation is animated by the value of `rotationDegrees` clockwise. Any of these
parameters can be set to a no-op value that will result in no animation of that parameter. The
no-op values are the following: `1f` for `zoomFactor`, `Offset.Zero` for `panOffset`, and `0f`
for `rotationDegrees`.

#### 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. |
| panOffset | offset to pan, in pixels |
| rotationDegrees | the degrees by which to rotate clockwise |
| zoomAnimationSpec | `AnimationSpec` to be used for animating zoom |
| panAnimationSpec | `AnimationSpec` to be used for animating offset |
| rotationAnimationSpec | `AnimationSpec` to be used for animating rotation |
| centroid | the `Offset` around which the animation should occur, if any. The default value is `Offset.Unspecified`, which leaves the behavior up to the implementation of the `TransformableState`. |