QrCodeSymbol

An encoded QR Code symbol.

Draw each module as a square of a whole number of pixels or printer dots, leaving at least QrCode.QUIET_ZONE_MODULES light modules around the symbol.

Properties

Link copied to clipboard
Link copied to clipboard

Human readable interpretation of the GS1 data, e.g. (01)09501101020917(10)ABC123; empty for plain text.

Link copied to clipboard
val mask: Int

Mask pattern used, 0-7.

Link copied to clipboard
val size: Int

Width and height in modules (17 + 4 * version), quiet zone excluded.

Link copied to clipboard

The encoded text, e.g. a GS1 Digital Link URI.

Link copied to clipboard

QR Code version, 1-40.

Functions

Link copied to clipboard
operator fun get(row: Int, column: Int): Boolean

true if the module at row, column is dark. Row 0 is the top.

Link copied to clipboard
fun sizeMm(xDimensionMm: Double, quietZone: Int = QrCode.QUIET_ZONE_MODULES): Double

Physical width (and height) for a module size of xDimensionMm, including quiet zones.

Link copied to clipboard
fun toModules(quietZone: Int = QrCode.QUIET_ZONE_MODULES): Array<BooleanArray>

Rows of modules (true = dark) with quietZone light modules on every side.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun QrCodeSymbol.toSvg(moduleSize: Double = 10.0, unit: String = "", quietZone: Int = QrCode.QUIET_ZONE_MODULES, darkColor: String = "#000000", lightColor: String? = "#ffffff"): String

Renders the symbol as an SVG document.