//qrcode-kotlin/io.github.g0dkar.qrcode.render/QRCodeGraphics
[common]
expect open class QRCodeGraphics(width: Int, height: Int)
[android, js, jvm, native]
actual open class QRCodeGraphics(val width: Int, val height: Int)
QRCodeGraphics | [common] expect constructor(width: Int, height: Int) [android, js, jvm, native] actual constructor(width: Int, height: Int) |
Name | Summary |
---|---|
Companion | [android, js] [android] object Companion [js] object Companion |
Name | Summary |
---|---|
height | [android, js, jvm, native] [android] val height: Int [js] val height: Int [jvm] val height: Int [native] val height: Int |
width | [android, js, jvm, native] [android] val width: Int [js] val width: Int [jvm] val width: Int [native] val width: Int |
Name | Summary |
---|---|
availableFormats | [common, android, js, jvm, native] [common] expect open fun availableFormats(): Array<String> [android, js, jvm, native] actual open fun availableFormats(): Array<String> Returns the available formats to be passed as parameters to getBytes. |
drawImage | [common, android, js, jvm, native] [common] expect open fun drawImage(img: QRCodeGraphics, x: Int, y: Int) [android, js, jvm, native] actual open fun drawImage(img: QRCodeGraphics, x: Int, y: Int) Draw an image inside another. Mostly used to merge squares into the main QRCode. |
drawLine | [common, android, js, jvm, native] [common] expect open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int) [android, js, jvm, native] actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int) Draw a straight line from point (x1,y1) to (x2,y2) . |
drawRect | [common, android, js, jvm, native] [common] expect open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int) [android, js, jvm, native] actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int) Draw the edges of a rectangle starting at point (x,y) and having width by height . |
drawRoundRect | [common, android, js, jvm, native] [common] expect open fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) [android, js, jvm, native] actual open fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) Draw the edges of a round rectangle starting at point (x,y) and having width by height with edges that are borderRadius pixels round (almost like CSS). |
fill | [common, js, jvm, native] [common] expect open fun fill(color: Int) [js, jvm, native] actual open fun fill(color: Int) Fill the whole area of this canvas with the specified color. [android] actual open fun fill(color: Int) Fill the whole area of this canvas with the especified color. |
fillRect | [common, android, js, jvm, native] [common] expect open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) [android, js, jvm, native] actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) Fills the rectangle starting at point (x,y) and having width by height . |
fillRoundRect | [common, android, js, jvm, native] [common] expect open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) [android, js, jvm, native] actual open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) Fills the round rectangle starting at point (x,y) and having width by height with edges that are borderRadius pixels round (almost like CSS). |
getBytes | [common, js, native] [common] expect open fun getBytes(): ByteArray [js, native] actual open fun getBytes(): ByteArray Returns this image as a ByteArray encoded as PNG. [android] actual open fun getBytes(): ByteArray Returns this image as a ByteArray encoded as PNG. Recommended to use writeImage. [jvm] actual open fun getBytes(): ByteArray Returns this image as a ByteArray encoded as PNG. Usually recommended to use writeImage instead :) [common, js, native] [common] expect open fun getBytes(format: String): ByteArray [js, native] actual open fun getBytes(format: String): ByteArray Returns this image as a ByteArray encoded as the specified format (e.g. PNG , JPG , BMP , …).[android] actual open fun getBytes(format: String): ByteArray Returns this image as a ByteArray encoded as the specified format. Recommended to use writeImage. [jvm] actual open fun getBytes(format: String): ByteArray Returns this image as a ByteArray encoded as the specified format. Usually recommended to use writeImage instead :) |
nativeImage | [common, js, native] [common] expect open fun nativeImage(): Any [js, native] actual open fun nativeImage(): Any Returns the native image object this QRCodeGraphics is working upon. [android] actual open fun nativeImage(): Any Returns the Bitmap object being worked upon. [jvm] actual open fun nativeImage(): Any Returns the BufferedImage object being worked upon. |
toBlob | [js] open fun toBlob(callback: (Blob?) -> Unit) Direct access to the .toBlob() function of the underlying canvas. |
toDataURL | [js] open fun toDataURL(format: String = "png"): String Returns a Data URL to this can be shown in an <img/> tag. |
writeImage | [jvm] @JvmOverloads open fun writeImage(destination: OutputStream, format: String = "PNG") Writes the QRCode image in the specified format into the destination OutputStream. [android] open fun writeImage(destination: OutputStream, format: String = "PNG", quality: Int = 100) Writes the QRCode image in the specified format and quality into the destination OutputStream. |