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 horizontal location of the point around which the element is rotated and scaled.

ModifiersBuilders.Transformation.Builder

Sets the vertical location 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
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.2.0
fun build(): ModifiersBuilders.Transformation

Builds an instance from accumulated values.

setPivotX

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

Sets the horizontal location of the point around which the element is rotated and scaled. With type DpProp, it is the offset from the element center; otherwise with type BoundingBoxRatio, it is the location proportional to the bounding box width. Dynamic value is supported. If not set, defaults to the element center.

setPivotY

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

Sets the vertical location of the point around which the element is rotated and scaled. With type DpProp, it is the offset from the element center; otherwise with type BoundingBoxRatio, it is the location proportional to the bounding box height. Dynamic value is supported. If not set, defaults to the element center.

setRotation

Added in 1.2.0
@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. If not set, defaults to zero.

setScaleX

Added in 1.2.0
@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. If not set, defaults to one.

setScaleY

Added in 1.2.0
@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. If not set, defaults to one.

setTranslationX

Added in 1.2.0
@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. If not set, defaults to zero.

setTranslationY

Added in 1.2.0
@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. If not set, defaults to zero.