mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-21 11:43:55 +00:00
feat: rounded corners compat
This commit is contained in:
@@ -22,8 +22,8 @@ class BitmapUtil {
|
||||
return output
|
||||
}
|
||||
|
||||
fun convertDrawableToBitmap(drawable: Drawable): Bitmap {
|
||||
val bitmap = Bitmap.createBitmap(100, 300, Bitmap.Config.ARGB_8888)
|
||||
fun convertDrawableToBitmap(drawable: Drawable, width: Int, height: Int): Bitmap {
|
||||
val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
|
||||
val canvas = Canvas(bitmap)
|
||||
drawable.setBounds(0, 0, canvas.width, canvas.height)
|
||||
drawable.draw(canvas)
|
||||
|
||||
Reference in New Issue
Block a user