# ModifiersBuilders.Transformation.Builder

# ModifiersBuilders.Transformation.Builder

Artifact:[androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ModifiersBuilders.java+class:androidx.wear.protolayout.ModifiersBuilders.Transformation.Builder)  
Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder "View this page in Java")

<br />

```
class ModifiersBuilders.Transformation.Builder
```

<br />

*** ** * ** ***

Builder for[Transformation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation)

## Summary

|                                                                                                                                    ### Public constructors                                                                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#Builder())`()` Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder). |

|                                                                     ### Public functions                                                                      |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ModifiersBuilders.Transformation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation)                 | [build](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#build())`()` Builds an instance from accumulated values.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setPivotX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setPivotX(androidx.wear.protolayout.DimensionBuilders.PivotDimension))`(pivotX: `[DimensionBuilders.PivotDimension](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.PivotDimension)`)` Sets the horizontal location of the point around which the element is rotated and scaled.            |
| [ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setPivotY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setPivotY(androidx.wear.protolayout.DimensionBuilders.PivotDimension))`(pivotY: `[DimensionBuilders.PivotDimension](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.PivotDimension)`)` Sets the vertical location of the point around which the element is rotated and scaled.              |
| [ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setRotation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setRotation(androidx.wear.protolayout.DimensionBuilders.DegreesProp))`(rotation: `[DimensionBuilders.DegreesProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DegreesProp)`)` Sets the clockwise degrees that the element is rotated around the pivot point.                          |
| [ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setScaleX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setScaleX(androidx.wear.protolayout.TypeBuilders.FloatProp))`(scaleX: `[TypeBuilders.FloatProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/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](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setScaleY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setScaleY(androidx.wear.protolayout.TypeBuilders.FloatProp))`(scaleY: `[TypeBuilders.FloatProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/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](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setTranslationX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setTranslationX(androidx.wear.protolayout.DimensionBuilders.DpProp))`(translationX: `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)`)` Sets the horizontal offset of this element relative to the location where the element's layout placed it.  |
| [ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 400)` [setTranslationY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setTranslationY(androidx.wear.protolayout.DimensionBuilders.DpProp))`(translationY: `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)  

```
Builder()
```

Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder).  

## Public functions

### build

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)  

```
fun build(): ModifiersBuilders.Transformation
```

Builds an instance from accumulated values.  

### setPivotX

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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.