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

scale

Scales the component uniformly (both horizontally and vertically) around its center pivot point.

scale

Source set: Common
@ExperimentalFoundationStyleApi
fun ScaleScope.scale(@FloatRange(from = 0.0) value: Float)

Scales the component uniformly (both horizontally and vertically) around its center pivot point.

Setting scale will override the horizontal scaling set by a previous call to ScaleScope.scaleX and the previous vertical scaling set by calling ScaleScope.scaleY.

This property is not inherited

Parameters

value The scaling factor for both X and Y axes. 1.0f is no scale.

scale

Source set: Common
@ExperimentalFoundationStyleApi
fun ScaleScope.scale(@FloatRange(from = 0.0) x: Float, @FloatRange(from = 0.0) y: Float)

Scales the component uniformly (both horizontally and vertically) around its center pivot point.

Setting scale will override the horizontal scaling set by a previous call to ScaleScope.scaleX and the previous vertical scaling set by calling ScaleScope.scaleY.

This property is not inherited

Parameters

x The scaling factor for X axes. 1.0f is no scale.
y The scaling factor for Y axes. 1.0f is no scale.

Last updated: