# TextureBitmapStore

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/TextureBitmapStore.android.kt+class:androidx.ink.brush.TextureBitmapStore) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

*** ** * ** ***


```
public fun interface TextureBitmapStore
```

<br />

*** ** * ** ***

Interface for a callback to allow the caller to provide a particular `https://developer.android.com/reference/android/graphics/Bitmap.html` corresponding to a client-provided texture ID.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/android/graphics/Bitmap.html` | `https://developer.android.com/reference/androidx/ink/brush/TextureBitmapStore#get(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId)` Retrieve a `https://developer.android.com/reference/android/graphics/Bitmap.html` for the given texture id. |

## Public methods

### get

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

```
abstract Bitmap get(@NonNull String clientTextureId)
```

Retrieve a `https://developer.android.com/reference/android/graphics/Bitmap.html` for the given texture id. This may be called synchronously during `onDraw`, so loading of texture files from disk and decoding them into `https://developer.android.com/reference/android/graphics/Bitmap.html` objects should be done on init. The result may be cached by consumers, so this should return a deterministic result for a given input.

Textures can be disabled by having load always return null. null should also be returned when a texture can not be loaded. If null is returned, the texture layer in question should be ignored, allowing for graceful fallback. It's recommended that implementations log when a texture can not be loaded.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html` | The texture bitmap, if any, associated with the given id. |