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

*** ** * ** ***


```
public final class ModifiersBuilders.Transformation.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation`

## Summary

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

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#build()()` Builds an instance from accumulated values. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setPivotX(androidx.wear.protolayout.DimensionBuilders.PivotDimension)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.PivotDimension pivotX)` Sets 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/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setPivotY(androidx.wear.protolayout.DimensionBuilders.PivotDimension)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.PivotDimension pivotY)` Sets 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/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setRotation(androidx.wear.protolayout.DimensionBuilders.DegreesProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DegreesProp rotation)` Sets 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/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setScaleX(androidx.wear.protolayout.TypeBuilders.FloatProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setScaleY(androidx.wear.protolayout.TypeBuilders.FloatProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setTranslationX(androidx.wear.protolayout.DimensionBuilders.DpProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp translationX)` Sets 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/ModifiersBuilders.Transformation.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder#setTranslationY(androidx.wear.protolayout.DimensionBuilders.DpProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
public Builder()
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Transformation.Builder`.

## Public methods

### build

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

```
public @NonNull ModifiersBuilders.Transformation build()
```

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)
public @NonNull ModifiersBuilders.Transformation.Builder setPivotX(@NonNull DimensionBuilders.PivotDimension pivotX)
```

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

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

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)
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. 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)
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. 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)
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. 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)
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. If not set, defaults to zero.