Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun generateImage(width: Int, height: Int): Bitmap {
val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
val paint = Paint()
val path = generatePath()
canvas.drawPath(path, paint)
return bitmap
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment