ModifiersBuilders.Transformation.Builder


class ModifiersBuilders.Transformation.Builder


Builder for Transformation

Summary

Public constructors

Creates an instance of Builder.

Public functions

ModifiersBuilders.Transformation

Builds an instance from accumulated values.

ModifiersBuilders.Transformation.Builder

Sets the x offset of the point around which the element is rotated and scaled.

ModifiersBuilders.Transformation.Builder

Sets the y offset of the point around which the element is rotated and scaled.

ModifiersBuilders.Transformation.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setRotation(rotation: DimensionBuilders.DegreesProp)

Sets the clockwise degrees that the element is rotated around the pivot point.

ModifiersBuilders.Transformation.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setScaleX(scaleX: TypeBuilders.FloatProp)

Sets the scale of this element in the x direction around the pivot point, as a proportion of the element's unscaled width .

ModifiersBuilders.Transformation.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setScaleY(scaleY: TypeBuilders.FloatProp)

Sets the scale of this element in the y direction around the pivot point, as a proportion of the element's unscaled height.

ModifiersBuilders.Transformation.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setTranslationX(translationX: DimensionBuilders.DpProp)

Sets the horizontal offset of this element relative to the location where the element's layout placed it.

ModifiersBuilders.Transformation.Builder
@RequiresSchemaVersion(major = 1, minor = 400)
setTranslationY(translationY: DimensionBuilders.DpProp)

Sets the vertical offset of this element in addition to the location where the element's layout placed it.

Public constructors

Builder

Added in 1.2.0-alpha01
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.2.0-alpha01
fun build(): ModifiersBuilders.Transformation

Builds an instance from accumulated values.

setPivotX

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setPivotX(pivotX: DimensionBuilders.PivotDimension): ModifiersBuilders.Transformation.Builder

Sets the x offset of the point around which the element is rotated and scaled. Dynamic value is supported. By default, the pivot is centered on the element. Note that, for androidx.wear.protolayout.LayoutElementBuilders.ArcText or androidx.wear.protolayout.LayoutElementBuilders.ArcLine, the element inscribes the entire circle and the default pivot is located at the center of the circle.

setPivotY

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setPivotY(pivotY: DimensionBuilders.PivotDimension): ModifiersBuilders.Transformation.Builder

Sets the y offset of the point around which the element is rotated and scaled. Dynamic value is supported. By default, the pivot is centered on the element. Note that, for androidx.wear.protolayout.LayoutElementBuilders.ArcText or androidx.wear.protolayout.LayoutElementBuilders.ArcLine, the element inscribes the entire circle and the default pivot is located at the center of the circle.

setRotation

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setRotation(rotation: DimensionBuilders.DegreesProp): ModifiersBuilders.Transformation.Builder

Sets the clockwise degrees that the element is rotated around the pivot point.

setScaleX

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setScaleX(scaleX: TypeBuilders.FloatProp): ModifiersBuilders.Transformation.Builder

Sets the scale of this element in the x direction around the pivot point, as a proportion of the element's unscaled width .

setScaleY

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setScaleY(scaleY: TypeBuilders.FloatProp): ModifiersBuilders.Transformation.Builder

Sets the scale of this element in the y direction around the pivot point, as a proportion of the element's unscaled height.

setTranslationX

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setTranslationX(translationX: DimensionBuilders.DpProp): ModifiersBuilders.Transformation.Builder

Sets the horizontal offset of this element relative to the location where the element's layout placed it.

setTranslationY

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 400)
fun setTranslationY(translationY: DimensionBuilders.DpProp): ModifiersBuilders.Transformation.Builder

Sets the vertical offset of this element in addition to the location where the element's layout placed it.