# BrushPaint.StampingTexture.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.StampingTexture.Builder) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***


```
public final class BrushPaint.StampingTexture.Builder
```

<br />

*** ** * ** ***

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

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

## Summary

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#build()()` Constructs a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer` from this `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setAnimationColumns(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationColumns)` Sets the number of animation columns in this texture layer. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setAnimationDurationMillis(kotlin.Long)( @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 16777216) long animationDurationMillis )` Sets the duration of the animation for this texture layer. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setAnimationFrames(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 16777216) int animationFrames)` Sets the number of animation frames in this texture layer. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setAnimationRepeatMode(androidx.ink.brush.BrushPaint.AnimationRepeatMode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode animationRepeatMode )` Sets what should happen when this texture layer's animation repeats. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setAnimationRows(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationRows)` Sets the number of animation rows in this texture layer. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setBlendMode(androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode)` Sets the blend mode used for blending this and all previous texture layers with the next one. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder#setClientTextureId(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId)` Sets the client texture ID for this texture layer. |

## Public methods

### build

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

```
public final @NonNull BrushPaint.StampingTexture build()
```

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

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

### setAnimationColumns

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationColumns(@IntRange(from = 1, to = 4096) int animationColumns)
```

Sets the number of animation columns in this texture layer.

### setAnimationDurationMillis

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationDurationMillis(
    @IntRange(from = 0, to = 16777216) long animationDurationMillis
)
```

Sets the duration of the animation for this texture layer.

### setAnimationFrames

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationFrames(@IntRange(from = 1, to = 16777216) int animationFrames)
```

Sets the number of animation frames in this texture layer.

### setAnimationRepeatMode

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationRepeatMode(
    @NonNull BrushPaint.AnimationRepeatMode animationRepeatMode
)
```

Sets what should happen when this texture layer's animation repeats.

### setAnimationRows

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setAnimationRows(@IntRange(from = 1, to = 4096) int animationRows)
```

Sets the number of animation rows in this texture layer.

### setBlendMode

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setBlendMode(@NonNull BrushPaint.TextureLayer.BlendMode blendMode)
```

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

### setClientTextureId

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

```
public final @NonNull BrushPaint.StampingTexture.Builder setClientTextureId(@NonNull String clientTextureId)
```

Sets the client texture ID for this texture layer.