CompositionSettings.Builder


class CompositionSettings.Builder


A builder for CompositionSettings instances.

Summary

Public constructors

Creates a new Builder.

Public functions

CompositionSettings

Builds the CompositionSettings.

CompositionSettings.Builder
setAlpha(alpha: @FloatRange(from = 0, to = 1) Float)

Sets the alpha.

CompositionSettings.Builder
setOffset(
    offsetX: @FloatRange(from = "-1", to = 1) Float,
    offsetY: @FloatRange(from = "-1", to = 1) Float
)

Sets the offset.

CompositionSettings.Builder
setScale(scaleX: Float, scaleY: Float)

Sets the scale.

Public constructors

Builder

Added in 1.5.0-alpha04
Builder()

Creates a new Builder.

The default alpha is 1.0f, the default offset is (0.0f, 0.0f), the default scale is (1.0f, 1.0f).

Public functions

setAlpha

Added in 1.5.0-alpha04
fun setAlpha(alpha: @FloatRange(from = 0, to = 1) Float): CompositionSettings.Builder

Sets the alpha. 0 means fully transparent, 1 means fully opaque.

Parameters
alpha: @FloatRange(from = 0, to = 1) Float

alpha value.

Returns
CompositionSettings.Builder

Builder instance.

setOffset

Added in 1.5.0-alpha04
fun setOffset(
    offsetX: @FloatRange(from = "-1", to = 1) Float,
    offsetY: @FloatRange(from = "-1", to = 1) Float
): CompositionSettings.Builder

Sets the offset.

Parameters
offsetX: @FloatRange(from = "-1", to = 1) Float

offset X value.

offsetY: @FloatRange(from = "-1", to = 1) Float

offset Y value.

Returns
CompositionSettings.Builder

Builder instance.

setScale

Added in 1.5.0-alpha04
fun setScale(scaleX: Float, scaleY: Float): CompositionSettings.Builder

Sets the scale.

Parameters
scaleX: Float

scale X value.

scaleY: Float

scale Y value.

Returns
CompositionSettings.Builder

Builder instance.