# BrushPaint.TilingTexture

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

*** ** * ** ***


```
public final class BrushPaint.TilingTexture 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.TilingTexture](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. Each copy of the texture will have the same size and shape, modulo reflections.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Builder` Builder for `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture`. |
| `public final class https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Origin` Specification of the origin point to use for the texture. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#TilingTexture(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,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/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeX, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeY, float offsetX, float offsetY, @https://developer.android.com/reference/androidx/ink/geometry/AngleDegreesFloat float rotationDegrees, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit sizeUnit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Origin origin, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapX, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapY, @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.TilingTexture` 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.TilingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#builder()()` Returns a new `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Builder`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#copy(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,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/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeX, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeY, float offsetX, float offsetY, @https://developer.android.com/reference/androidx/ink/geometry/AngleDegreesFloat float rotationDegrees, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit sizeUnit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Origin origin, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapX, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapY, @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. |
| `boolean` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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.TilingTexture#getClientTextureId()()` The client texture ID for this texture layer. |
| `final float` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getOffsetX()()` The horizontal offset for the texture, specified as a fraction of the texture width. |
| `final float` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getOffsetY()()` The vertical offset for the texture, specified as a fraction of the texture height. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Origin` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getOrigin()()` The origin that will be used for positioning this texture layer. |
| `final float` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getRotationDegrees()()` Angle specifying the rotation of the texture. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getSizeUnit()()` The units in which this texture layer's width and height are measured. |
| `final float` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getSizeX()()` The width of the texture, specified in `sizeUnit`s. |
| `final float` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getSizeY()()` The height of the texture, specified in `sizeUnit`s. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getWrapX()()` The horizontal wrapping mode for this texture layer. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#getWrapY()()` The vertical wrapping mode for this texture layer. |
| `int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#hashCode()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#toBuilder()()` Returns a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.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.TilingTexture#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

### TilingTexture

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

```
public TilingTexture(
    @NonNull String clientTextureId,
    @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeX,
    @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeY,
    float offsetX,
    float offsetY,
    @AngleDegreesFloat float rotationDegrees,
    @NonNull BrushPaint.TextureLayer.SizeUnit sizeUnit,
    @NonNull BrushPaint.TilingTexture.Origin origin,
    @NonNull BrushPaint.TextureLayer.Wrap wrapX,
    @NonNull BrushPaint.TextureLayer.Wrap wrapY,
    @NonNull BrushPaint.TextureLayer.BlendMode blendMode
)
```

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

Java callers should use the `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.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/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeX` | The X size in `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit` of the image specified by `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)`. |
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeY` | The Y size in `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit` of the image specified by `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)`. |
| `float offsetX` | An offset into the texture, specified as fractions of the texture `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)`. |
| `float offsetY` | An offset into the texture, specified as fractions of the texture `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)`. |
| `@https://developer.android.com/reference/androidx/ink/geometry/AngleDegreesFloat float rotationDegrees` | Angle in degrees specifying the rotation of the texture. The rotation is carried out about the center of the texture's first repetition along both axes. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.SizeUnit sizeUnit` | The units used to specify `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)` and `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.Origin origin` | The origin point to be used for texture space. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapX` | The wrap mode along the horizontal texture axis. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TextureLayer.Wrap wrapY` | The wrap mode along the vertical texture axis. |
| `@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). |

## 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.TilingTexture.Builder builder()
```

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

### copy

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

```
public final @NonNull BrushPaint.TilingTexture copy(
    @NonNull String clientTextureId,
    @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeX,
    @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float sizeY,
    float offsetX,
    float offsetY,
    @AngleDegreesFloat float rotationDegrees,
    @NonNull BrushPaint.TextureLayer.SizeUnit sizeUnit,
    @NonNull BrushPaint.TilingTexture.Origin origin,
    @NonNull BrushPaint.TextureLayer.Wrap wrapX,
    @NonNull BrushPaint.TextureLayer.Wrap wrapY,
    @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.TilingTexture.Builder` instead.

### equals

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

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

### getOffsetX

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

```
public final float getOffsetX()
```

The horizontal offset for the texture, specified as a fraction of the texture width.

### getOffsetY

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

```
public final float getOffsetY()
```

The vertical offset for the texture, specified as a fraction of the texture height.

### getOrigin

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

```
public final @NonNull BrushPaint.TilingTexture.Origin getOrigin()
```

The origin that will be used for positioning this texture layer.

### getRotationDegrees

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

```
public final float getRotationDegrees()
```

Angle specifying the rotation of the texture. The rotation is carried out about the center of the texture's first repetition along both axes.

### getSizeUnit

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

```
public final @NonNull BrushPaint.TextureLayer.SizeUnit getSizeUnit()
```

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

### getSizeX

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

```
public final float getSizeX()
```

The width of the texture, specified in `sizeUnit`s.

### getSizeY

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

```
public final float getSizeY()
```

The height of the texture, specified in `sizeUnit`s.

### getWrapX

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

```
public final @NonNull BrushPaint.TextureLayer.Wrap getWrapX()
```

The horizontal wrapping mode for this texture layer.

### getWrapY

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

```
public final @NonNull BrushPaint.TextureLayer.Wrap getWrapY()
```

The vertical wrapping mode 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.TilingTexture.Builder toBuilder()
```

Returns a `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture.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.TilingTexture`. Kotlin developers, see `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.TilingTexture#copy(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.ink.brush.BrushPaint.TextureLayer.SizeUnit,androidx.ink.brush.BrushPaint.TilingTexture.Origin,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.Wrap,androidx.ink.brush.BrushPaint.TextureLayer.BlendMode)` method.

### toString

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