| java.lang.Object | |
| ↳ | com.facebook.drawee.drawable.DrawableUtils |
Helper class containing functionality commonly used by drawables.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DrawableUtils() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static Drawable |
cloneDrawable(Drawable drawable)
Clones the specified drawable.
| ||||||||||
| static void |
copyProperties(Drawable to, Drawable from)
Copies various properties from one drawable to the other.
| ||||||||||
| static int |
getOpacityFromColor(int color)
Gets the opacity from a color.
| ||||||||||
| static int |
multiplyColorAlpha(int color, int alpha)
Multiplies the color with the given alpha.
| ||||||||||
| static void |
setCallbacks(Drawable drawable, Drawable.Callback callback, TransformCallback transformCallback)
Sets callback to the drawable.
| ||||||||||
| static void |
setDrawableProperties(Drawable drawable, DrawableProperties properties)
Sets various paint properties on the drawable
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Clones the specified drawable.
| drawable | the drawable to clone. |
|---|
Copies various properties from one drawable to the other.
| to | drawable to copy properties to |
|---|---|
| from | drawable to copy properties from |
Gets the opacity from a color. Inspired by Android ColorDrawable.
Multiplies the color with the given alpha.
| color | color to be multiplied |
|---|---|
| alpha | value between 0 and 255 |
Sets callback to the drawable.
| drawable | drawable to set callbacks to |
|---|---|
| callback | standard Android Drawable.Callback |
| transformCallback | TransformCallback used by TransformAwareDrawables |
Sets various paint properties on the drawable
| drawable | Drawable on which to set the properties |
|---|---|
| properties | wrapper around mValue values to set on the drawable |