# RoundedBitmapDrawable

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#)  

# RoundedBitmapDrawable

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
class
RoundedBitmapDrawable
`  
`


``

extends `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`


``


`

|---|---|------------------------------------------------------------|
| java.lang.Object                                                 |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | android.support.v4.graphics.drawable.RoundedBitmapDrawable |

<br />

*** ** * ** ***

A Drawable that wraps a bitmap and can be drawn with rounded corners. You can create a RoundedBitmapDrawable from a file path, an input stream, or from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)object.

Also see the[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)class, which handles the management and transformation of raw bitmap graphics, and should be used when drawing to a[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html).

<br />

## Summary

|                                                                                                                                                                                                              ### Public methods                                                                                                                                                                                                              ||
|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                     | ` `[draw](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#draw(android.graphics.Canvas))`(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` canvas) `                                                                                                         |
| ` int`                                                                                      | ` `[getAlpha](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getAlpha())`() `                                                                                                                                                                                                               |
| ` final `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)     | ` `[getBitmap](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getBitmap())`() ` Returns the bitmap used by this drawable to render.                                                                                                                                                         |
| ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html) | ` `[getColorFilter](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getColorFilter())`() `                                                                                                                                                                                                   |
| ` float`                                                                                    | ` `[getCornerRadius](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getCornerRadius())`() `                                                                                                                                                                                                 |
| ` int`                                                                                      | ` `[getGravity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getGravity())`() ` Get the gravity used to position/stretch the bitmap within its bounds.                                                                                                                                    |
| ` int`                                                                                      | ` `[getIntrinsicHeight](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getIntrinsicHeight())`() `                                                                                                                                                                                           |
| ` int`                                                                                      | ` `[getIntrinsicWidth](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getIntrinsicWidth())`() `                                                                                                                                                                                             |
| ` int`                                                                                      | ` `[getOpacity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getOpacity())`() `                                                                                                                                                                                                           |
| ` final `[Paint](https://developer.android.com/reference/android/graphics/Paint.html)       | ` `[getPaint](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#getPaint())`() ` Returns the paint used to render this drawable.                                                                                                                                                               |
| ` boolean`                                                                                  | ` `[hasAntiAlias](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#hasAntiAlias())`() ` Indicates whether anti-aliasing is enabled for this drawable.                                                                                                                                         |
| ` boolean`                                                                                  | ` `[hasMipMap](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#hasMipMap())`() ` Indicates whether the mipmap hint is enabled on this drawable's bitmap.                                                                                                                                     |
| ` boolean`                                                                                  | ` `[isCircular](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#isCircular())`() `                                                                                                                                                                                                           |
| ` void`                                                                                     | ` `[setAlpha](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setAlpha(int))`(int alpha) `                                                                                                                                                                                                   |
| ` void`                                                                                     | ` `[setAntiAlias](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setAntiAlias(boolean))`(boolean aa) ` Enables or disables anti-aliasing for this drawable.                                                                                                                                 |
| ` void`                                                                                     | ` `[setCircular](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setCircular(boolean))`(boolean circular) ` Sets the image shape to circular.                                                                                                                                                |
| ` void`                                                                                     | ` `[setColorFilter](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setColorFilter(android.graphics.ColorFilter))`(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` cf) `                                                                          |
| ` void`                                                                                     | ` `[setCornerRadius](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setCornerRadius(float))`(float cornerRadius) ` Sets the corner radius to be applied when drawing the bitmap.                                                                                                            |
| ` void`                                                                                     | ` `[setDither](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setDither(boolean))`(boolean dither) `                                                                                                                                                                                        |
| ` void`                                                                                     | ` `[setFilterBitmap](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setFilterBitmap(boolean))`(boolean filter) `                                                                                                                                                                            |
| ` void`                                                                                     | ` `[setGravity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setGravity(int))`(int gravity) ` Set the gravity used to position/stretch the bitmap within its bounds.                                                                                                                      |
| ` void`                                                                                     | ` `[setMipMap](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setMipMap(boolean))`(boolean mipMap) ` Enables or disables the mipmap hint for this drawable's bitmap.                                                                                                                        |
| ` void`                                                                                     | ` `[setTargetDensity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(android.util.DisplayMetrics))`(`[DisplayMetrics](https://developer.android.com/reference/android/util/DisplayMetrics.html)` metrics) ` Set the density scale at which this drawable will be rendered. |
| ` void`                                                                                     | ` `[setTargetDensity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(android.graphics.Canvas))`(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` canvas) ` Set the density scale at which this drawable will be rendered.                  |
| ` void`                                                                                     | ` `[setTargetDensity](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(int))`(int density) ` Set the density at which this drawable will be rendered.                                                                                                                        |

|                                                                                                                     ### Protected methods                                                                                                                      ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onBoundsChange](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#onBoundsChange(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` bounds) ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#)From class` `[android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` ` |----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                    | ` applyTheme(`[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg0) `                                                                                                                                                                                                                                                  | | ` boolean`                                                                                                                 | ` canApplyTheme() `                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` clearColorFilter() `                                                                                                                                                                                                                                                                                                                                                      | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` copyBounds() `                                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` copyBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromPath(String arg0) `                                                                                                                                                                                                                                                                                                                                             | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3, `[BitmapFactory.Options](https://developer.android.com/reference/android/graphics/BitmapFactory.Options.html)` arg4) ` | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3) `                                                                                                                      | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromStream(InputStream arg0, String arg1) `                                                                                                                                                                                                                                                                                                                         | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1) `                                                                                                                                                                                                                                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg2) `                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                   | | ` abstract void`                                                                                                           | ` draw(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` arg0) `                                                                                                                                                                                                                                                                             | | ` int`                                                                                                                     | ` getAlpha() `                                                                                                                                                                                                                                                                                                                                                              | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` getBounds() `                                                                                                                                                                                                                                                                                                                                                             | | ` `[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)           | ` getCallback() `                                                                                                                                                                                                                                                                                                                                                           | | ` int`                                                                                                                     | ` getChangingConfigurations() `                                                                                                                                                                                                                                                                                                                                             | | ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                | ` getColorFilter() `                                                                                                                                                                                                                                                                                                                                                        | | ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html) | ` getConstantState() `                                                                                                                                                                                                                                                                                                                                                      | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` getCurrent() `                                                                                                                                                                                                                                                                                                                                                            | | ` `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                              | ` getDirtyBounds() `                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                    | ` getHotspotBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getIntrinsicHeight() `                                                                                                                                                                                                                                                                                                                                                    | | ` int`                                                                                                                     | ` getIntrinsicWidth() `                                                                                                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getLayoutDirection() `                                                                                                                                                                                                                                                                                                                                                    | | ` final int`                                                                                                               | ` getLevel() `                                                                                                                                                                                                                                                                                                                                                              | | ` int`                                                                                                                     | ` getMinimumHeight() `                                                                                                                                                                                                                                                                                                                                                      | | ` int`                                                                                                                     | ` getMinimumWidth() `                                                                                                                                                                                                                                                                                                                                                       | | ` abstract int`                                                                                                            | ` getOpacity() `                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                                                    | ` getOutline(`[Outline](https://developer.android.com/reference/android/graphics/Outline.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` boolean`                                                                                                                 | ` getPadding(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` int[]`                                                                                                                   | ` getState() `                                                                                                                                                                                                                                                                                                                                                              | | ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                          | ` getTransparentRegion() `                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                              | | ` void`                                                                                                                    | ` invalidateSelf() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isAutoMirrored() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isFilterBitmap() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isStateful() `                                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` isVisible() `                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                    | ` jumpToCurrentState() `                                                                                                                                                                                                                                                                                                                                                    | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` mutate() `                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                    | ` onBoundsChange(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                       | | ` boolean`                                                                                                                 | ` onLayoutDirectionChanged(int arg0) `                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` onLevelChange(int arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` boolean`                                                                                                                 | ` onStateChange(int[] arg0) `                                                                                                                                                                                                                                                                                                                                               | | ` static int`                                                                                                              | ` resolveOpacity(int arg0, int arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` scheduleSelf(Runnable arg0, long arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` abstract void`                                                                                                           | ` setAlpha(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setAutoMirrored(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` setCallback(`[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)` arg0) `                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setChangingConfigurations(int arg0) `                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                    | ` setColorFilter(int arg0, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg1) `                                                                                                                                                                                                                                       | | ` abstract void`                                                                                                           | ` setColorFilter(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` arg0) `                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` setDither(boolean arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                    | ` setFilterBitmap(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setHotspot(float arg0, float arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setHotspotBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                                           | ` setLayoutDirection(int arg0) `                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` setLevel(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` setState(int[] arg0) `                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                    | ` setTint(int arg0) `                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setTintList(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` arg0) `                                                                                                                                                                                                                                                   | | ` void`                                                                                                                    | ` setTintMode(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg0) `                                                                                                                                                                                                                                                    | | ` boolean`                                                                                                                 | ` setVisible(boolean arg0, boolean arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` unscheduleSelf(Runnable arg0) `                                                                                                                                                                                                                                                                                                                                           | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### draw

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void draw (Canvas canvas)
```

<br />

<br />

|        Parameters         ||
|----------|-----------------|
| `canvas` | `Canvas` <br /> |

### getAlpha

```
int getAlpha ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getBitmap

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Bitmap getBitmap ()
```

Returns the bitmap used by this drawable to render. May be null.

<br />

|                                        Returns                                         ||
|--------------------------------------------------------------------------------|--------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) | <br /> |

### getColorFilter

```
ColorFilter getColorFilter ()
```

<br />

<br />

|                                             Returns                                              ||
|------------------------------------------------------------------------------------------|--------|
| [ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html) | <br /> |

### getCornerRadius

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getCornerRadius ()
```

<br />

<br />

|                              Returns                               ||
|---------|-----------------------------------------------------------|
| `float` | The corner radius applied when drawing the bitmap. <br /> |

### getGravity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getGravity ()
```

Get the gravity used to position/stretch the bitmap within its bounds.

<br />

|                     Returns                     ||
|-------|------------------------------------------|
| `int` | the gravity applied to the bitmap <br /> |

**See also:**

- [Gravity](https://developer.android.com/https://developer.android.com/reference/android/view/Gravity)  

### getIntrinsicHeight

```
int getIntrinsicHeight ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getIntrinsicWidth

```
int getIntrinsicWidth ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getOpacity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getOpacity ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getPaint

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Paint getPaint ()
```

Returns the paint used to render this drawable.

<br />

|                                       Returns                                        ||
|------------------------------------------------------------------------------|--------|
| [Paint](https://developer.android.com/reference/android/graphics/Paint.html) | <br /> |

### hasAntiAlias

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean hasAntiAlias ()
```

Indicates whether anti-aliasing is enabled for this drawable.

<br />

|                               Returns                                ||
|-----------|-----------------------------------------------------------|
| `boolean` | True if anti-aliasing is enabled, false otherwise. <br /> |

**See also:**

- [setAntiAlias(boolean)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setAntiAlias(boolean))  

### hasMipMap

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean hasMipMap ()
```

Indicates whether the mipmap hint is enabled on this drawable's bitmap.

<br />

|                                                           Returns                                                           ||
|-----------|------------------------------------------------------------------------------------------------------------------|
| `boolean` | True if the mipmap hint is set, false otherwise. If the bitmap is null, this method always returns false. <br /> |

**See also:**

- [setMipMap(boolean)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setMipMap(boolean))  

### isCircular

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isCircular ()
```

<br />

<br />

|                            Returns                             ||
|-----------|-----------------------------------------------------|
| `boolean` | `true`if the image is circular, else`false`. <br /> |

### setAlpha

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAlpha (int alpha)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `alpha` | `int` <br /> |

### setAntiAlias

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAntiAlias (boolean aa)
```

Enables or disables anti-aliasing for this drawable. Anti-aliasing affects the edges of the bitmap only so it applies only when the drawable is rotated.

<br />

|                                     Parameters                                      ||
|------|-------------------------------------------------------------------------------|
| `aa` | `boolean`: True if the bitmap should be anti-aliased, false otherwise. <br /> |

**See also:**

- [hasAntiAlias()](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#hasAntiAlias())  

### setCircular

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCircular (boolean circular)
```

Sets the image shape to circular.

This overwrites any calls made to[setCornerRadius(float)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#setCornerRadius(float))so far.

<br />

<br />

|          Parameters          ||
|------------|------------------|
| `circular` | `boolean` <br /> |

### setColorFilter

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setColorFilter (ColorFilter cf)
```

<br />

<br />

|         Parameters         ||
|------|----------------------|
| `cf` | `ColorFilter` <br /> |

### setCornerRadius

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCornerRadius (float cornerRadius)
```

Sets the corner radius to be applied when drawing the bitmap.

<br />

|           Parameters           ||
|----------------|----------------|
| `cornerRadius` | `float` <br /> |

### setDither

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDither (boolean dither)
```

<br />

<br />

|         Parameters         ||
|----------|------------------|
| `dither` | `boolean` <br /> |

### setFilterBitmap

```
void setFilterBitmap (boolean filter)
```

<br />

<br />

|         Parameters         ||
|----------|------------------|
| `filter` | `boolean` <br /> |

### setGravity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setGravity (int gravity)
```

Set the gravity used to position/stretch the bitmap within its bounds.

<br />

|              Parameters              ||
|-----------|---------------------------|
| `gravity` | `int`: the gravity <br /> |

**See also:**

- [Gravity](https://developer.android.com/https://developer.android.com/reference/android/view/Gravity)  

### setMipMap

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setMipMap (boolean mipMap)
```

Enables or disables the mipmap hint for this drawable's bitmap. See[setHasMipMap(boolean)](https://developer.android.com/reference/android/graphics/Bitmap.html#setHasMipMap(boolean))for more information. If the bitmap is null, or the current API version does not support setting a mipmap hint, calling this method has no effect.

<br />

|                                     Parameters                                      ||
|----------|---------------------------------------------------------------------------|
| `mipMap` | `boolean`: True if the bitmap should use mipmaps, false otherwise. <br /> |

**See also:**

- [hasMipMap()](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable#hasMipMap())  

### setTargetDensity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTargetDensity (DisplayMetrics metrics)
```

Set the density scale at which this drawable will be rendered.

<br />

|                                               Parameters                                               ||
|-----------|---------------------------------------------------------------------------------------------|
| `metrics` | `DisplayMetrics`: The DisplayMetrics indicating the density scale for this drawable. <br /> |

**See also:**

- [setDensity(int)](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#setDensity(int))
- [getDensity()](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#getDensity())  

### setTargetDensity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTargetDensity (Canvas canvas)
```

Set the density scale at which this drawable will be rendered. This method assumes the drawable will be rendered at the same density as the specified canvas.

<br />

|                                      Parameters                                      ||
|----------|----------------------------------------------------------------------------|
| `canvas` | `Canvas`: The Canvas from which the density scale must be obtained. <br /> |

**See also:**

- [setDensity(int)](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#setDensity(int))
- [getDensity()](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#getDensity())  

### setTargetDensity

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTargetDensity (int density)
```

Set the density at which this drawable will be rendered.

<br />

|                          Parameters                           ||
|-----------|----------------------------------------------------|
| `density` | `int`: The density scale for this drawable. <br /> |

**See also:**

- [setDensity(int)](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#setDensity(int))
- [getDensity()](https://developer.android.com/https://developer.android.com/reference/android/graphics/Bitmap#getDensity())

## Protected methods

### onBoundsChange

```
void onBoundsChange (Rect bounds)
```

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `bounds` | `Rect` <br /> |

-

  ## Classes

  - [DrawableCompat](https://developer.android.com/reference/android/support/v4/graphics/drawable/DrawableCompat)
  - [IconCompat](https://developer.android.com/reference/android/support/v4/graphics/drawable/IconCompat)
  - [RoundedBitmapDrawable](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable)
  - [RoundedBitmapDrawableFactory](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory)