rotateRad
Function
Common
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 |
Common
inline fun DrawTransform.rotateRad(radians: Float, pivot: Offset = center) =
rotate(degrees(radians), pivot)
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 |
Common
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 |