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
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: