# FitWidthBitmapDrawable

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/graphics/FitWidthBitmapDrawable.java+class:androidx.leanback.graphics.FitWidthBitmapDrawable) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***

<br />

```
class FitWidthBitmapDrawable : Drawable
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | [androidx.leanback.graphics.FitWidthBitmapDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable) |

*** ** * ** ***

Subclass of `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` that can be used to draw a bitmap into a region. Bitmap will be scaled to fit the full width of the region and will be aligned to the top left corner. Any region outside the bounds will be clipped during `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#draw(android.graphics.Canvas)` call. Top position of the bitmap can be controlled by `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setVerticalOffset(int)` call or `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#PROPERTY_VERTICAL_OFFSET()`.

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/android/util/Property.html<https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#PROPERTY_VERTICAL_OFFSET()` Property for `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setVerticalOffset(int)` and `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getVerticalOffset()`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#FitWidthBitmapDrawable()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#draw(android.graphics.Canvas)(canvas: https://developer.android.com/reference/android/graphics/Canvas.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getAlpha()()` |
| `https://developer.android.com/reference/android/graphics/Bitmap.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getBitmap()()` Returns the bitmap. |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getConstantState()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getOpacity()()` **This function is deprecated.** |
| `https://developer.android.com/reference/android/graphics/Rect.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getSource()()` Returns the `https://developer.android.com/reference/android/graphics/Rect.html` used for extracting the bitmap. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getVerticalOffset()()` Returns the current vertical offset. |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#mutate()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setAlpha(int)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setBitmap(android.graphics.Bitmap)(bitmap: https://developer.android.com/reference/android/graphics/Bitmap.html!)` Sets the bitmap. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setColorFilter(android.graphics.ColorFilter)(colorFilter: https://developer.android.com/reference/android/graphics/ColorFilter.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setSource(android.graphics.Rect)(source: https://developer.android.com/reference/android/graphics/Rect.html!)` Sets the `https://developer.android.com/reference/android/graphics/Rect.html` used for extracting the bitmap. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setVerticalOffset(int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the vertical offset which will be used for drawing the bitmap. |

### Inherited functions

From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme)(t: https://developer.android.com/reference/android/content/res/Resources.Theme.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter()()` `https://developer.android.com/reference/android/graphics/Rect.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromPath(java.lang.String)(pathName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String)(

res: https://developer.android.com/reference/android/content/res/Resources.html!,

value: https://developer.android.com/reference/android/util/TypedValue.html!,

is: https://developer.android.com/reference/java/io/InputStream.html!,

srcName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!

)` `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromStream(java.io.InputStream, java.lang.String)(is: https://developer.android.com/reference/java/io/InputStream.html!, srcName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser)(r: https://developer.android.com/reference/android/content/res/Resources.html!, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!)` `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(

r: https://developer.android.com/reference/android/content/res/Resources.html!,

parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!,

attrs: https://developer.android.com/reference/android/util/AttributeSet.html!

)` `https://developer.android.com/reference/android/graphics/Rect.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getBounds()()` `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCallback()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getChangingConfigurations()()` `https://developer.android.com/reference/android/graphics/ColorFilter.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getColorFilter()()` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCurrent()()` `https://developer.android.com/reference/android/graphics/Rect.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect)(outRect: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicWidth()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth()()` `https://developer.android.com/reference/android/graphics/Insets.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline)(outline: https://developer.android.com/reference/android/graphics/Outline.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect)(padding: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getState()()` `https://developer.android.com/reference/android/graphics/Region.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getTransparentRegion()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(r: https://developer.android.com/reference/android/content/res/Resources.html!, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!, attrs: https://developer.android.com/reference/android/util/AttributeSet.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onBoundsChange(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[])(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#resolveOpacity(int, int)(op1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, op2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long)(what: https://developer.android.com/reference/java/lang/Runnable.html!, when: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean)(mirrored: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback)(cb: https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int)(configs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean)(dither: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setFilterBitmap(boolean)(filter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int)(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[])(stateSet: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int)(tintColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode)(blendMode: https://developer.android.com/reference/android/graphics/BlendMode.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList)(tint: https://developer.android.com/reference/android/content/res/ColorStateList.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode)(tintMode: https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean)(visible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, restart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable)(what: https://developer.android.com/reference/java/lang/Runnable.html!)`

## Constants

### PROPERTY_VERTICAL_OFFSET

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

```
const val PROPERTY_VERTICAL_OFFSET: Property<FitWidthBitmapDrawable!, Int!>!
```

Property for `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#setVerticalOffset(int)` and `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#getVerticalOffset()`.

## Public constructors

### FitWidthBitmapDrawable

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

```
FitWidthBitmapDrawable()
```

## Public functions

### draw

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

```
fun draw(canvas: Canvas): Unit
```

### getAlpha

```
fun getAlpha(): Int
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Alpha value between 0(inclusive) and 255(inclusive) |

### getBitmap

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

```
fun getBitmap(): Bitmap!
```

Returns the bitmap.

### getConstantState

```
fun getConstantState(): Drawable.ConstantState!
```

### getOpacity

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

```
fun getOpacity(): Int
```

> [!CAUTION]
> **This function is deprecated.**   

### getSource

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

```
fun getSource(): Rect!
```

Returns the `https://developer.android.com/reference/android/graphics/Rect.html` used for extracting the bitmap.

### getVerticalOffset

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

```
fun getVerticalOffset(): Int
```

Returns the current vertical offset.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#PROPERTY_VERTICAL_OFFSET()` |   |

### mutate

```
fun mutate(): Drawable!
```

### setAlpha

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

```
fun setAlpha(alpha: Int): Unit
```

### setBitmap

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

```
fun setBitmap(bitmap: Bitmap!): Unit
```

Sets the bitmap.

### setColorFilter

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

```
fun setColorFilter(colorFilter: ColorFilter!): Unit
```

### setSource

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

```
fun setSource(source: Rect!): Unit
```

Sets the `https://developer.android.com/reference/android/graphics/Rect.html` used for extracting the bitmap.

### setVerticalOffset

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

```
fun setVerticalOffset(offset: Int): Unit
```

Sets the vertical offset which will be used for drawing the bitmap. The bitmap drawing will start the provided vertical offset.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/FitWidthBitmapDrawable#PROPERTY_VERTICAL_OFFSET()` |   |