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

> **Deprecated** Maintained for binary compatibility

<h2 id="zoomby-zoomfactor">zoomBy</h2>

```kotlin
suspend fun TransformableState.zoomBy(zoomFactor: Float) =
    zoomBy(zoomFactor = zoomFactor, centroid = Offset.Unspecified)
```

Zoom without animation by a ratio of `zoomFactor` over the current size and suspend until it's
set.

#### Parameters

| | |
| --- | --- |
| zoomFactor | ratio over the current size by which to zoom |

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

<h2 id="zoomby-zoomfactor-centroid">zoomBy</h2>

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

```kotlin
suspend fun TransformableState.zoomBy(zoomFactor: Float, centroid: Offset = Offset.Unspecified) =
    transform {
        transformByWithCentroid(
            centroid = centroid,
            zoomChange = zoomFactor,
            panChange = Offset.Zero,
            rotationChange = 0f,
        )
    }
```

Zoom without animation by a ratio of `zoomFactor` over the current size and suspend until it's
set.

#### Parameters

| | |
| --- | --- |
| zoomFactor | ratio over the current size by which to zoom |
| centroid | the [Offset](/jetpack-compose/androidx.compose.ui/ui-geometry/functions/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](/jetpack-compose/androidx.compose.foundation/foundation/functions/TransformableState). |