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

translate

Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively

translate

Source set: Common
public inline fun DrawScope.translate(
    left: Float = 0.0f,
    top: Float = 0.0f,
    block: DrawScope.() -> Unit,
)

Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively

Parameters

left Pixels to translate the coordinate space in the x-axis
top Pixels to translate the coordinate space in the y-axis
block lambda that is called to issue drawing commands within the translated coordinate space