Skip to content

Instantly share code, notes, and snippets.

@Marchuck
Created May 19, 2021 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marchuck/d0de2acecf5d4de364272c5e204a1772 to your computer and use it in GitHub Desktop.
Save Marchuck/d0de2acecf5d4de364272c5e204a1772 to your computer and use it in GitHub Desktop.
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