Compose Unstyled 2.0 is out! Check the official announcement blog ->
Interface

ScaleScope

An interface that introduces the scaleX and scaleY properties to a Style receiver scope.

Source set: Common
@ExperimentalFoundationStyleApi
interface ScaleScope

An interface that introduces the scaleX and scaleY properties to a Style receiver scope.

Functions

scaleX

fun scaleX(@FloatRange(from = 0.0) value: Float)

Scales the component horizontally around its center pivot point.

Setting scaleX will override the horizontal scaling set by a previous call to scale.

This property is not inherited

Parameters

value The scaling factor for the X-axis. 1.0f is no scale.

scaleY

fun scaleY(@FloatRange(from = 0.0) value: Float)

Scales the component vertically around its center pivot point.

Setting scaleX will override the vertical scaling set by a previous call to scale.

This property is not inherited

Parameters

value The scaling factor for the Y-axis. 1.0f is no scale.

Last updated: