ScaleScope

Known direct subclasses
LayerStyleScope

This interface is deprecated. This scope type is being removed.

Known indirect subclasses
StyleScope

This interface is deprecated. This scope type is being removed.


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

See also
StyleScope

Summary

Public functions

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

This function is deprecated. This scope type is being removed.

Cmn
Unit
scaleY(value: @FloatRange(from = 0.0) Float)

This function is deprecated. This scope type is being removed.

Cmn

Extension functions

Unit

This function is deprecated. This style property is being removed.

Cmn
Unit
@ExperimentalFoundationStyleApi
ScaleScope.scale(
    x: @FloatRange(from = 0.0) Float,
    y: @FloatRange(from = 0.0) Float
)

This function is deprecated. This style property is being removed.

Cmn

Public functions

scaleX

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

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: @FloatRange(from = 0.0) Float

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

scaleY

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

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: @FloatRange(from = 0.0) Float

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

Extension functions

ScaleScope.scale

@ExperimentalFoundationStyleApi
fun ScaleScope.scale(value: @FloatRange(from = 0.0) Float): Unit

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: @FloatRange(from = 0.0) Float

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

ScaleScope.scale

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

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: @FloatRange(from = 0.0) Float

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

y: @FloatRange(from = 0.0) Float

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