Known direct subclasses
LayerStyleScope

An interface that introduces the graphics layer property to a Style receiver scope.

Known indirect subclasses
StyleScope

A StyleScope is the receiver scope of a Style lambda.


An interface that introduces the translation properties to a Style receiver scope.

See also
StyleScope

Summary

Public functions

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

Translates (moves) the component horizontally.

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

Translates (moves) the component vertically.

Cmn

Extension functions

Unit

Translates (moves) the component by the given Offset.

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

Translates (moves) the component horizontally and vertically.

Cmn

Public functions

translationX

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

Translates (moves) the component horizontally. Positive values move it to the right, negative values to the left.

This property is not inherited

Parameters
value: @FloatRange(from = 0.0) Float

The translation amount on the X-axis in pixels.

translationY

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

Translates (moves) the component vertically. Positive values move it down, negative values up.

This property is not inherited

Parameters
value: @FloatRange(from = 0.0) Float

The translation amount on the Y-axis in pixels.

Extension functions

TranslationScope.translation

@ExperimentalFoundationStyleApi
fun TranslationScope.translation(offset: Offset): Unit

Translates (moves) the component by the given Offset.

This property is not inherited

Parameters
offset: Offset

The translation offset in pixels.

TranslationScope.translation

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

Translates (moves) the component horizontally and vertically.

This property is not inherited

Parameters
x: @FloatRange(from = 0.0) Float

The translation amount on the X-axis in pixels.

y: @FloatRange(from = 0.0) Float

The translation amount on the Y-axis in pixels.