ModifiersBuilders.Transformation.Builder


public final class ModifiersBuilders.Transformation.Builder


Builder for Transformation

Summary

Public constructors

Creates an instance of Builder.

Public methods

@NonNull ModifiersBuilders.Transformation

Builds an instance from accumulated values.

@NonNull ModifiersBuilders.Transformation.Builder

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

@NonNull ModifiersBuilders.Transformation.Builder

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

@NonNull ModifiersBuilders.Transformation.Builder

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

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

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

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

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

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

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

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

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
public Builder()

Creates an instance of Builder.

Public methods

build

Added in 1.2.0-alpha01
public @NonNull ModifiersBuilders.Transformation build()

Builds an instance from accumulated values.

setPivotX

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

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)
public @NonNull ModifiersBuilders.Transformation.Builder setPivotY(@NonNull DimensionBuilders.PivotDimension pivotY)

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)
public @NonNull ModifiersBuilders.Transformation.Builder setRotation(@NonNull DimensionBuilders.DegreesProp rotation)

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)
public @NonNull ModifiersBuilders.Transformation.Builder setScaleX(@NonNull TypeBuilders.FloatProp scaleX)

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)
public @NonNull ModifiersBuilders.Transformation.Builder setScaleY(@NonNull TypeBuilders.FloatProp scaleY)

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)
public @NonNull ModifiersBuilders.Transformation.Builder setTranslationX(@NonNull DimensionBuilders.DpProp translationX)

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)
public @NonNull ModifiersBuilders.Transformation.Builder setTranslationY(@NonNull DimensionBuilders.DpProp translationY)

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