zoomBy

abstract suspend fun zoomBy(zoomFactor: Float, centroid: Offset = Offset.Unspecified, animationSpec: AnimationSpec<Float> = DefaultZoomAnimationSpec)

Zooms in or out around centroid by a ratio of zoomFactor relative to the current size, and suspends until it's finished.

Parameters

zoomFactor

Ratio by which to zoom relative to the current size. For example, a zoomFactor of 3f will triple the current zoom level.

centroid

Focal point for this zoom within the content's size. Defaults to the center of the content.

animationSpec

The animation spec to use or SnapSpec for no animation.