BitmapGraphics

open class BitmapGraphics(val width: Int, val height: Int, val image: Bitmap = Bitmap.createBitmap(width, height, ARGB_8888)) : AndroidDrawingInterface(source)

An AndroidDrawingInterface that uses a Canvas (here referred to as "Classic Canvas") to draw into a Bitmap.

For a modern Canvas, see DrawScopeGraphics which uses Jetpack Compose.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, image: Bitmap = Bitmap.createBitmap(width, height, ARGB_8888))

Properties

Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
open override fun drawBitmap(img: Bitmap, x: Int, y: Int)
Link copied to clipboard
open override fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)
Link copied to clipboard
open override fun drawImage(rawData: ByteArray?, x: Int, y: Int)
Link copied to clipboard
open override fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double)
Link copied to clipboard
open override fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)
Link copied to clipboard
open override fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int, thickness: Double)
Link copied to clipboard
open override fun fill(color: Int)
Link copied to clipboard
open override fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int)
Link copied to clipboard
open override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int)
Link copied to clipboard
open override fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int)
Link copied to clipboard
open override fun getBytes(format: String, quality: Int): ByteArray
Link copied to clipboard
open override fun nativeImage(): Bitmap