static fun drawResource(@NonNull res: Resources, @DrawableRes resId: int, width: int, height: int): Bitmap
Draw a XML Drawable resource to a Bitmap because a XML Drawable not can be decoded by #decodeResource
res
- Resources: Application Resource
resId
- int: Drawable Resource id.
width
- int: destination width
height
- int: destination height
Return
Bitmap: A transparent bitmap with the drawable painted to it.
static fun drawResource(@NonNull res: Resources, @DrawableRes resId: int): Bitmap
Draw a XML Drawable resource to a Bitmap because a XML Drawable not can be decoded by #decodeResource
res
- Resources: Application Resource
resId
- int: Drawable Resource id.
Return
Bitmap: A transparent bitmap with the drawable painted to it.