Function

rotateBy

Rotate without animation by a degrees degrees and suspend until it's set.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
Deprecated Maintained for binary compatibility

rotateBy

suspend fun TransformableState.rotateBy(degrees: Float) = rotateBy(degrees, Offset.Unspecified)

Rotate without animation by a degrees degrees and suspend until it's set.

Parameters

degrees degrees by which to rotate

rotateBy

Common
suspend fun TransformableState.rotateBy(degrees: Float, centroid: Offset = Offset.Unspecified) =
    transform {
        transformByWithCentroid(
            centroid = centroid,
            zoomChange = 1f,
            panChange = Offset.Zero,
            rotationChange = degrees,
        )
    }

Rotate without animation by a degrees degrees and suspend until it's set.

Parameters

degrees degrees by which to rotate
centroid the Offset around which the rotation should occur, if any. The default value is Offset.Unspecified, which leaves the behavior up to the implementation of the TransformableState.