# ModifiersBuilders.Transformation

# ModifiersBuilders.Transformation

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)  
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 "View this page in Java")

<br />

```
@RequiresSchemaVersion(major = 1, minor = 400)
class ModifiersBuilders.Transformation
```

<br />

*** ** * ** ***

A modifier to apply transformations to the element. All of these transformations can be animated by setting dynamic values. This modifier is not layout affecting.

## Summary

|                                                                                                                                               ### Nested types                                                                                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[ModifiersBuilders.Transformation.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder) Builder for[Transformation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation) |

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DimensionBuilders.PivotDimension](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.PivotDimension) | [getPivotX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getPivotX())`()` Gets the horizontal location of the point around which the element is rotated and scaled.                                   |
| [DimensionBuilders.PivotDimension](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.PivotDimension) | [getPivotY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getPivotY())`()` Gets the vertical location of the point around which the element is rotated and scaled.                                     |
| [DimensionBuilders.DegreesProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DegreesProp)       | [getRotation](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getRotation())`()` Gets the clockwise Degrees that the element is rotated around the pivot point.                                          |
| [TypeBuilders.FloatProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.FloatProp)                     | [getScaleX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getScaleX())`()` Gets the scale of this element in the x direction around the pivot point, as a proportion of the element's unscaled width.  |
| [TypeBuilders.FloatProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.FloatProp)                     | [getScaleY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getScaleY())`()` Gets the scale of this element in the y direction around the pivot point, as a proportion of the element's unscaled height. |
| [DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)                 | [getTranslationX](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getTranslationX())`()` Gets the horizontal offset of this element relative to the location where the element's layout placed it.       |
| [DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)                 | [getTranslationY](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#getTranslationY())`()` Gets the vertical offset of this element in addition to the location where the element's layout placed it.      |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                             | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Transformation#toString())`()`                                                                                                                               |

## Public functions

### getPivotX

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

```
fun getPivotX(): DimensionBuilders.PivotDimension
```

Gets 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.  

### getPivotY

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

```
fun getPivotY(): DimensionBuilders.PivotDimension
```

Gets 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.  

### getRotation

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

```
fun getRotation(): DimensionBuilders.DegreesProp
```

Gets the clockwise Degrees that the element is rotated around the pivot point.  

### getScaleX

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

```
fun getScaleX(): TypeBuilders.FloatProp
```

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

### getScaleY

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

```
fun getScaleY(): TypeBuilders.FloatProp
```

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

### getTranslationX

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

```
fun getTranslationX(): DimensionBuilders.DpProp
```

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

### getTranslationY

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

```
fun getTranslationY(): DimensionBuilders.DpProp
```

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

### toString

```
fun toString(): String
```