# Shader.TileMode

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# TileMode

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/Shader.TileMode "View this page in Java")  

```
class TileMode
```

|---|---|----------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                          |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\<[android.graphics.Shader.TileMode](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#)\> ||
|   | ↳ | [android.graphics.Shader.TileMode](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#) |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [Shader.TileMode.CLAMP](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:CLAMP),[Shader.TileMode.DECAL](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:DECAL),[Shader.TileMode.MIRROR](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:MIRROR),[Shader.TileMode.REPEAT](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:REPEAT) |-----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| | [Shader.TileMode.CLAMP](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:CLAMP)   | Replicate the edge color if the shader draws outside of its original bounds.                                          | | [Shader.TileMode.DECAL](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:DECAL)   | Render the shader's image pixels only within its original bounds.                                                     | | [Shader.TileMode.MIRROR](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:MIRROR) | Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. | | [Shader.TileMode.REPEAT](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:REPEAT) | Repeat the shader's image horizontally and vertically.                                                                | |

## Summary

|                                                                                                             Enum values                                                                                                              ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CLAMP](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:CLAMP) Replicate the edge color if the shader draws outside of its original bounds.                                            |
| [DECAL](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:DECAL) Render the shader's image pixels only within its original bounds.                                                       |
| [MIRROR](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:MIRROR) Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. |
| [REPEAT](https://developer.android.com/reference/kotlin/android/graphics/Shader.TileMode#ENUM_VALUE:REPEAT) Repeat the shader's image horizontally and vertically.                                                                |

## Enum values

### CLAMP

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val CLAMP : Shader.TileMode
```

Replicate the edge color if the shader draws outside of its original bounds.  

### DECAL

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val DECAL : Shader.TileMode
```

Render the shader's image pixels only within its original bounds. If the shader draws outside of its original bounds, transparent black is drawn instead.  

### MIRROR

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val MIRROR : Shader.TileMode
```

Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam.  

### REPEAT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val REPEAT : Shader.TileMode
```

Repeat the shader's image horizontally and vertically.