Stay organized with collections
Save and categorize content based on your preferences.
TileMode
class TileMode
Summary
Enum values |
Replicate the edge color if the shader draws outside of its original bounds.
|
Render the shader's image pixels only within its original bounds.
|
Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam.
|
Repeat the shader's image horizontally and vertically.
|
Enum values
CLAMP
enum val CLAMP : Shader.TileMode
Replicate the edge color if the shader draws outside of its original bounds.
DECAL
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
enum val MIRROR : Shader.TileMode
Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam.
REPEAT
enum val REPEAT : Shader.TileMode
Repeat the shader's image horizontally and vertically.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Shader.TileMode\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTileMode\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/Shader.TileMode \"View this page in Java\") \n\n```\nclass TileMode\n```\n\n|---|---|---------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.graphics.Shader.TileMode](#)\\\u003e ||\n| | ↳ | [android.graphics.Shader.TileMode](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [Shader.TileMode.CLAMP](#ENUM_VALUE:CLAMP), [Shader.TileMode.DECAL](#ENUM_VALUE:DECAL), [Shader.TileMode.MIRROR](#ENUM_VALUE:MIRROR), [Shader.TileMode.REPEAT](#ENUM_VALUE:REPEAT) |----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| | [Shader.TileMode.CLAMP](#ENUM_VALUE:CLAMP) | Replicate the edge color if the shader draws outside of its original bounds. | | [Shader.TileMode.DECAL](#ENUM_VALUE:DECAL) | Render the shader's image pixels only within its original bounds. | | [Shader.TileMode.MIRROR](#ENUM_VALUE:MIRROR) | Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. | | [Shader.TileMode.REPEAT](#ENUM_VALUE:REPEAT) | Repeat the shader's image horizontally and vertically. | |\n\nSummary\n-------\n\n| Enum values ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [CLAMP](#ENUM_VALUE:CLAMP) Replicate the edge color if the shader draws outside of its original bounds. |\n| [DECAL](#ENUM_VALUE:DECAL) Render the shader's image pixels only within its original bounds. |\n| [MIRROR](#ENUM_VALUE:MIRROR) Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. |\n| [REPEAT](#ENUM_VALUE:REPEAT) Repeat the shader's image horizontally and vertically. |\n\nEnum values\n-----------\n\n### CLAMP\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val CLAMP : Shader.TileMode\n```\n\nReplicate the edge color if the shader draws outside of its original bounds. \n\n### DECAL\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val DECAL : Shader.TileMode\n```\n\nRender the shader's image pixels only within its original bounds. If the shader draws outside of its original bounds, transparent black is drawn instead. \n\n### MIRROR\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val MIRROR : Shader.TileMode\n```\n\nRepeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. \n\n### REPEAT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val REPEAT : Shader.TileMode\n```\n\nRepeat the shader's image horizontally and vertically."]]