Interface

RemoteDrawTransform

Defines geometric transformations and clipping operations applied within RemoteDrawScope.withTransform.

Source set: JvmAndAndroid
public sealed interface RemoteDrawTransform

Defines geometric transformations and clipping operations applied within RemoteDrawScope.withTransform.

Properties

size

Source set: JvmAndAndroid
public val size: RemoteSize

Dimensions of the current drawing area in pixels.

center

Source set: JvmAndAndroid
public val center: RemoteOffset

Center coordinate of the current drawing area in pixels.

Functions

translate

Source set: JvmAndAndroid
public fun translate(left: RemoteFloat = 0f.rf, top: RemoteFloat = 0f.rf)

Translates the coordinate space by left and top pixels.

Parameters

left horizontal translation offset in pixels
top vertical translation offset in pixels

rotate

Source set: JvmAndAndroid
public fun rotate(degrees: RemoteFloat, pivot: RemoteOffset = center)

Rotates the coordinate space clockwise by degrees around pivot.

Parameters

degrees clockwise rotation angle in degrees
pivot coordinate around which the rotation occurs, defaults to center

scale

Source set: JvmAndAndroid
public fun scale(scale: RemoteFloat, pivot: RemoteOffset = center)

Scales the coordinate space uniformly by scale along both axes around pivot.

Parameters

scale uniform scale factor along both axes
pivot coordinate that remains unchanged after scaling, defaults to center

scale

Source set: JvmAndAndroid
public fun scale(
        scaleX: RemoteFloat,
        scaleY: RemoteFloat,
        pivot: RemoteOffset = center,
    )

Scales the coordinate space by scaleX horizontally and scaleY vertically around pivot.

Parameters

scaleX horizontal scale factor
scaleY vertical scale factor
pivot coordinate that remains unchanged after scaling, defaults to center

clipRect

Source set: JvmAndAndroid
public fun clipRect(
        left: RemoteFloat = 0f.rf,
        top: RemoteFloat = 0f.rf,
        right: RemoteFloat = size.width,
        bottom: RemoteFloat = size.height,
    )

Intersects the current clip region with the rectangle `left, top, right, bottom`.

Parameters

left left bound of the clip rectangle in pixels
top top bound of the clip rectangle in pixels
right right bound of the clip rectangle in pixels
bottom bottom bound of the clip rectangle in pixels
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: