# BrushPaint.TilingTexture.Builder

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/BrushPaint.kt+class:androidx.ink.brush.BrushPaint.TilingTexture.Builder) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS
- Cmn

  ```
  class BrushPaint.TilingTexture.Builder
  ```

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture`.

For Java developers, use `TilingTexture.Builder` to construct a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture` with default values, overriding only as needed. For example: `TilingTexture layer = TilingTexture.builder().setClientTextureId(id).setSizeX(width).setSizeY(height).build();`

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#build()()` Constructs a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture` from this `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setBlendMode(androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)(blendMode: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode)` Sets the blend mode used for blending this and all previous texture layers with the next one. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setClientTextureId(kotlin.String)(clientTextureId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets the client texture ID for this texture layer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setOffsetX(kotlin.Float)(offsetX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the horizontal offset of this texture layer, expressed as a fraction of the texture width. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setOffsetY(kotlin.Float)(offsetY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the vertical offset of this texture layer, expressed as a fraction of the texture height. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setOrigin(androidx.ink.brush.BrushPaint.TilingTexture.Origin)(origin: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Origin)` Sets the origin that should be used for positioning this texture layer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setRotationDegrees(kotlin.Float)(degrees: @https://developer.android.com/reference/kotlin/androidx/ink/geometry/AngleDegreesFloat https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the rotation angle of this texture layer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setSizeUnit(androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit)(sizeUnit: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit)` Sets the units in which this texture layer's width and height are measured. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setSizeX(kotlin.Float)( sizeX: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Sets the width of this texture layer, measured in the units specified by `sizeUnit`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setSizeY(kotlin.Float)( sizeY: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Sets the height of this texture layer, measured in the units specified by `sizeUnit`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setWrapX(androidx.ink.brush.BrushPaint.TextureLayer.Wrap)(wrapX: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TextureLayer.Wrap)` Sets the horizontal wrapping mode for this texture layer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder#setWrapY(androidx.ink.brush.BrushPaint.TextureLayer.Wrap)(wrapY: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TextureLayer.Wrap)` Sets the vertical wrapping mode for this texture layer. | Cmn |

## Public functions

### build

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun build(): BrushPaint.TilingTexture
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture` from this `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.TilingTexture.Builder`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if `clientTextureId`, `sizeX`, and/or `sizeY` were never set |

### setBlendMode

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setBlendMode(blendMode: BrushPaint.TextureLayer.BlendMode): BrushPaint.TilingTexture.Builder
```

Sets the blend mode used for blending this and all previous texture layers with the next one.

### setClientTextureId

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setClientTextureId(clientTextureId: String): BrushPaint.TilingTexture.Builder
```

Sets the client texture ID for this texture layer.

### setOffsetX

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setOffsetX(offsetX: Float): BrushPaint.TilingTexture.Builder
```

Sets the horizontal offset of this texture layer, expressed as a fraction of the texture width.

### setOffsetY

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setOffsetY(offsetY: Float): BrushPaint.TilingTexture.Builder
```

Sets the vertical offset of this texture layer, expressed as a fraction of the texture height.

### setOrigin

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setOrigin(origin: BrushPaint.TilingTexture.Origin): BrushPaint.TilingTexture.Builder
```

Sets the origin that should be used for positioning this texture layer.

### setRotationDegrees

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setRotationDegrees(degrees: @AngleDegreesFloat Float): BrushPaint.TilingTexture.Builder
```

Sets the rotation angle of this texture layer.

### setSizeUnit

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setSizeUnit(sizeUnit: BrushPaint.TextureLayer.SizeUnit): BrushPaint.TilingTexture.Builder
```

Sets the units in which this texture layer's width and height are measured.

### setSizeX

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setSizeX(
    sizeX: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
): BrushPaint.TilingTexture.Builder
```

Sets the width of this texture layer, measured in the units specified by `sizeUnit`.

### setSizeY

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setSizeY(
    sizeY: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
): BrushPaint.TilingTexture.Builder
```

Sets the height of this texture layer, measured in the units specified by `sizeUnit`.

### setWrapX

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setWrapX(wrapX: BrushPaint.TextureLayer.Wrap): BrushPaint.TilingTexture.Builder
```

Sets the horizontal wrapping mode for this texture layer.

### setWrapY

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun setWrapY(wrapY: BrushPaint.TextureLayer.Wrap): BrushPaint.TilingTexture.Builder
```

Sets the vertical wrapping mode for this texture layer.