toBitmap

fun Drawable.toBitmap(@Px width: UInt, @Px height: UInt, @ColorInt background: Int): Bitmap

Converts this drawable to a bitmap with a background.