Function

zoomBy

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

Common
Deprecated Maintained for binary compatibility

zoomBy

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

zoomBy

Common
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 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.