ly.img.android.pesdk.utils / BitmapFactoryUtils / drawResource

drawResource

open static fun drawResource(res: Resources!, 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

Parameters

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.

open static fun drawResource(res: Resources!, resId: Int): Bitmap!

Draw a XML Drawable resource to a Bitmap because a XML Drawable not can be decoded by #decodeResource

Parameters

res - Resources!: Application Resource

resId - Int: Drawable Resource id.

Return
Bitmap!: A transparent bitmap with the drawable painted to it.