public sealed interface RemoteDrawTransform
Defines geometric transformations and clipping operations applied within RemoteDrawScope.withTransform.
Properties
size
public val size: RemoteSize
Dimensions of the current drawing area in pixels.
center
public val center: RemoteOffset
Center coordinate of the current drawing area in pixels.
Functions
translate
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
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
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
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
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 |