# BrushPaint.StampingTexture

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

*** ** * ** ***


```
public final class BrushPaint.StampingTexture extends BrushPaint.TextureLayer
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.ink.brush.BrushPaint.TextureLayer](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer) ||
|   | ↳ | [androidx.ink.brush.BrushPaint.StampingTexture](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture) |

*** ** * ** ***

A texture that is "stamped" onto each particle of the stroke, scaled or rotated appropriately to cover the whole particle.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` Builder for `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#StampingTexture(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode )` Creates a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture` with the specified parameters. |
| `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#StampingTexture(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 16777216) int animationFrames, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationRows, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationColumns, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 16777216) long animationDurationMillis, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode animationRepeatMode )` Creates a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture` with the specified parameters. |

| ### Public methods |
|---|---|
| `static 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()()` Returns a new `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` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#copy(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode )` Creates a copy of `this` and allows named properties to be altered while keeping the rest unchanged. |
| `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#copy(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 16777216) int animationFrames, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationRows, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationColumns, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 16777216) long animationDurationMillis, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode animationRepeatMode )` Creates a copy of `this` and allows named properties to be altered while keeping the rest unchanged. |
| `boolean` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getAnimationColumns()()` |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 16777216) long` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getAnimationDurationMillis()()` |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 16777216) int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getAnimationFrames()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getAnimationRepeatMode()()` |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getAnimationRows()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#getClientTextureId()()` The client texture ID for this texture layer. |
| `int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#hashCode()()` |
| `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#toBuilder()()` Returns a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` with values set equivalent to `this`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#toString()()` |

### Inherited methods

From [androidx.ink.brush.BrushPaint.TextureLayer](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer) `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/Version` `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer#calculateMinimumRequiredVersion()()`

Returns the minimum required `https://developer.android.com/reference/androidx/ink/brush/Version` for this `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer`.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode` `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer#getBlendMode()()`

The rule by which the texture layers up to and including this one are combined with the subsequent layer.

## Public constructors

### StampingTexture

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

```
public StampingTexture(
    @NonNull String clientTextureId,
    @NonNull BrushPaint.TextureLayer.BlendMode blendMode
)
```

Creates a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture` with the specified parameters.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId` | A string identifier of an image that provides the color for a particular pixel for this layer. The coordinates within this image that will be used are determined by the other parameters. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode` | The method by which the texture layers up to this one (index \<= i) are combined with the subsequent texture layer (index == i+1). For the last texture layer, this defines the method by which the texture layer is combined with the brush color (possibly after that color gets per-vertex adjustments). |

### StampingTexture

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

```
public StampingTexture(
    @NonNull String clientTextureId,
    @NonNull BrushPaint.TextureLayer.BlendMode blendMode,
    @IntRange(from = 1, to = 16777216) int animationFrames,
    @IntRange(from = 1, to = 4096) int animationRows,
    @IntRange(from = 1, to = 4096) int animationColumns,
    @IntRange(from = 0, to = 16777216) long animationDurationMillis,
    @NonNull BrushPaint.AnimationRepeatMode animationRepeatMode
)
```

Creates a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture` with the specified parameters.

Java callers should use the `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` class instead.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId` | A string identifier of an image that provides the color for a particular pixel for this layer. The coordinates within this image that will be used are determined by the other parameters. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode blendMode` | The method by which the texture layers up to this one (index \<= i) are combined with the subsequent texture layer (index == i+1). For the last texture layer, this defines the method by which the texture layer is combined with the brush color (possibly after that color gets per-vertex adjustments). |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 16777216) int animationFrames` | The number of animation frames in this texture, or 1 for no animation. If greater than 1, then the texture image is treated as a grid of animation frame images, with dimensions of `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` by `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` frames. The frames will be indexed in row-major order, where row=0 and column=0 is frame index 0, then row=0 and column=1 is frame index 1, and so on. `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` must be at most the product of `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` and `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)`, and there may be unused frame cells in the final row. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationRows` | The number of frame rows in this texture. See `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` for more detail. When constructing an animation texture image, avoid making it too large in any one dimension by choosing values for `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` and `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` that are close to each other, but just large enough such that `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)`\<= `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` \* `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)`. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 1, to = 4096) int animationColumns` | Like `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)`, but for columns. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0, to = 16777216) long animationDurationMillis` | The duration of one complete animation loop for this texture (either passing through each frame once if `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` is `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#RESTART()`, or passing back and forth through each frame if `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` is `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode#REVERSE()`), or zero to disable automatic looping animations (in which case the current animation frame will be controlled solely by any `https://developer.android.com/reference/androidx/ink/brush/behavior/TargetNode.Target#PAINT_ANIMATION_PROGRESS_OFFSET()` behavior targets). Must be between 0 and 2\^24 (inclusive). Ignored if `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` is 1 (its default value), because that indicates that animation is disabled. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.AnimationRepeatMode animationRepeatMode` | Specifies what should happen when the animation reaches the last frame: either it can immediately restart back at the first frame, or it can reverse direction. Ignored if `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Long,androidx.ink.brush.BrushPaint.AnimationRepeatMode)` is 1 (its default value), because that indicates that animation is disabled. |

## Public methods

### builder

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

```
public static final @NonNull BrushPaint.StampingTexture.Builder builder()
```

Returns a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder`.

### copy

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

```
public final @NonNull BrushPaint.StampingTexture copy(
    @NonNull String clientTextureId,
    @NonNull BrushPaint.TextureLayer.BlendMode blendMode
)
```

Creates a copy of `this` and allows named properties to be altered while keeping the rest unchanged.

Java callers should use `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` instead.

### copy

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

```
public final @NonNull BrushPaint.StampingTexture copy(
    @NonNull String clientTextureId,
    @NonNull BrushPaint.TextureLayer.BlendMode blendMode,
    @IntRange(from = 1, to = 16777216) int animationFrames,
    @IntRange(from = 1, to = 4096) int animationRows,
    @IntRange(from = 1, to = 4096) int animationColumns,
    @IntRange(from = 0, to = 16777216) long animationDurationMillis,
    @NonNull BrushPaint.AnimationRepeatMode animationRepeatMode
)
```

Creates a copy of `this` and allows named properties to be altered while keeping the rest unchanged.

Java callers should use `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` instead.

### equals

```
public boolean equals(Object other)
```

### getAnimationColumns

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

```
public final @IntRange(from = 1, to = 4096) int getAnimationColumns()
```

### getAnimationDurationMillis

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

```
public final @IntRange(from = 0, to = 16777216) long getAnimationDurationMillis()
```

### getAnimationFrames

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

```
public final @IntRange(from = 1, to = 16777216) int getAnimationFrames()
```

### getAnimationRepeatMode

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

```
public final @NonNull BrushPaint.AnimationRepeatMode getAnimationRepeatMode()
```

### getAnimationRows

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

```
public final @IntRange(from = 1, to = 4096) int getAnimationRows()
```

### getClientTextureId

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

```
public final @NonNull String getClientTextureId()
```

The client texture ID for this texture layer.

### hashCode

```
public int hashCode()
```

### toBuilder

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

```
public final @NonNull BrushPaint.StampingTexture.Builder toBuilder()
```

Returns a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture.Builder` with values set equivalent to `this`. Java developers, use the returned builder to build a copy of a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture`. Kotlin developers, see `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture#copy(kotlin.String,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)` method.

### toString

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