# 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)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 400)
public final 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 |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.PivotDimension` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation#getPivotX()()` Gets the horizontal location of the point around which the element is rotated and scaled. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.PivotDimension` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation#getPivotY()()` Gets the vertical location of the point around which the element is rotated and scaled. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DegreesProp` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation#getRotation()()` Gets the clockwise Degrees that the element is rotated around the pivot point. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp` | `https://developer.android.com/reference/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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp` | `https://developer.android.com/reference/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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation#getTranslationX()()` Gets the horizontal offset of this element relative to the location where the element's layout placed it. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp` | `https://developer.android.com/reference/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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation#toString()()` |

## Public methods

### getPivotX

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

```
public @NonNull DimensionBuilders.PivotDimension getPivotX()
```

Gets the horizontal location of the point around which the element is rotated and scaled. With type `https://developer.android.com/reference/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)

```
public @NonNull DimensionBuilders.PivotDimension getPivotY()
```

Gets the vertical location of the point around which the element is rotated and scaled. With type `https://developer.android.com/reference/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)

```
public @NonNull DimensionBuilders.DegreesProp getRotation()
```

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)

```
public @NonNull TypeBuilders.FloatProp getScaleX()
```

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)

```
public @NonNull TypeBuilders.FloatProp getScaleY()
```

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)

```
public @NonNull DimensionBuilders.DpProp getTranslationX()
```

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)

```
public @NonNull DimensionBuilders.DpProp getTranslationY()
```

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

### toString

```
public @NonNull String toString()
```