🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

rotateRad

Add a rotation (in radians clockwise) to the current transform at the given pivot point.

rotateRad

Source set: Common
public fun Canvas.rotateRad(radians: Float, pivotX: Float = 0.0f, pivotY: Float = 0.0f)

Add a rotation (in radians clockwise) to the current transform at the given pivot point. The pivot coordinate remains unchanged by the rotation transformation

Parameters

radians Rotation transform to apply to the Canvas
pivotX The x-coord for the pivot point
pivotY The y-coord for the pivot point

rotateRad

Source set: Common
public inline fun DrawScope.rotateRad(
    radians: Float,
    pivot: Offset = center,
    block: DrawScope.() -> Unit,
)

Add a rotation (in radians clockwise) to the current transform at the given pivot point. The pivot coordinate remains unchanged by the rotation transformation

Parameters

radians to rotate clockwise
pivot The coordinate for the pivot point, defaults to the center of the coordinate space
block lambda that is called to issue drawing commands within the rotated coordinate space

rotateRad

Source set: Common
public inline fun DrawTransform.rotateRad(radians: Float, pivot: Offset = center): Unit

Add a rotation (in radians clockwise) to the current transform at the given pivot point. The pivot coordinate remains unchanged by the rotation transformation

Parameters

radians to rotate clockwise
pivot The coordinate for the pivot point, defaults to the center of the coordinate space