# BrushPaint.TextureLayer

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

*** ** * ** ***


```
public abstract class BrushPaint.TextureLayer
```

<br />

Known direct subclasses [BrushPaint.StampingTexture](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.StampingTexture), [BrushPaint.TilingTexture](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture)

|---|---|
| `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. |
| `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture` | A texture layer that will repeat according to a 2D affine transformation of vertex positions. |

*** ** * ** ***

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.BlendMode` The method by which the combined texture layers (index \<= i) are blended with the next layer. |
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit` Units for specifying `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer` dimensions. |
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap` Wrap modes for specifying `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer` wrapping behavior. |

| ### Public methods |
|---|---|
| `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 methods

### calculateMinimumRequiredVersion

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

```
public final @NonNull Version 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`.

By default, decoding a `https://developer.android.com/reference/androidx/ink/brush/BrushFamily` containing a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer` with a minimum required version higher than `https://developer.android.com/reference/androidx/ink/brush/Version#MAX_SUPPORTED()` will fail.

### getBlendMode

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

```
public final @NonNull BrushPaint.TextureLayer.BlendMode getBlendMode()
```

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

I.e. `BrushPaint::texture_layers[index].blend_mode` will be used to combine "src", which is the result of blending layers 0..index, with "dst", which is the layer at index + 1. If index refers to the last texture layer, then the layer at "index + 1" is the brush color layer.