Package-level declarations

Composables (Gs1DataMatrixBarcode, Gs1Code128Barcode, Gs1QrCodeBarcode), painters for Image, and toImageBitmap for sharing or printing. Modules are always drawn with whole pixels so the symbols stay sharp.

Types

Link copied to clipboard
class Code128Painter(symbol: Code128Symbol, quietZone: Int = Gs1Code128.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White) : Painter

Draws the bars of a GS1-128 symbol over the full height, centred horizontally, with whole-pixel modules. The human readable text is not drawn (see Gs1Code128Barcode).

Link copied to clipboard
class DataMatrixPainter(symbol: DataMatrixSymbol, quietZone: Int = Gs1DataMatrix.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White) : Painter

Draws a GS1 DataMatrix symbol, centred and as large as fits, with whole-pixel modules.

Link copied to clipboard
class QrCodePainter(symbol: QrCodeSymbol, quietZone: Int = QrCode.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White) : Painter

Draws a QR Code symbol (e.g. a GS1 Digital Link QR Code), centred and as large as fits, with whole-pixel modules.

Properties

Link copied to clipboard

Default style of the human readable text under GS1-128 symbols.

Functions

Link copied to clipboard
fun Gs1Code128Barcode(message: Gs1Message, modifier: Modifier = Modifier, moduleWidth: Dp = 2.dp, barHeight: Dp = 64.dp, quietZone: Int = Gs1Code128.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White, textStyle: TextStyle? = Gs1HumanReadableTextStyle)

Encodes message and shows it as a GS1-128 symbol.

fun Gs1Code128Barcode(symbol: Code128Symbol, modifier: Modifier = Modifier, moduleWidth: Dp = 2.dp, barHeight: Dp = 64.dp, quietZone: Int = Gs1Code128.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White, textStyle: TextStyle? = Gs1HumanReadableTextStyle)

Shows a GS1-128 symbol with its human readable text underneath.

Link copied to clipboard
fun Gs1DataMatrixBarcode(symbol: DataMatrixSymbol, modifier: Modifier = Modifier, moduleSize: Dp = 4.dp, quietZone: Int = Gs1DataMatrix.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White)

Shows a GS1 DataMatrix symbol.

fun Gs1DataMatrixBarcode(message: Gs1Message, modifier: Modifier = Modifier, shape: DataMatrixShape = DataMatrixShape.SQUARE, moduleSize: Dp = 4.dp, quietZone: Int = Gs1DataMatrix.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White)

Encodes message and shows it as a GS1 DataMatrix symbol.

Link copied to clipboard
fun Gs1QrCodeBarcode(symbol: QrCodeSymbol, modifier: Modifier = Modifier, moduleSize: Dp = 4.dp, quietZone: Int = QrCode.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White)

Shows a QR Code symbol, e.g. one made by Gs1QrCode.

fun Gs1QrCodeBarcode(message: Gs1Message, modifier: Modifier = Modifier, domain: String = Gs1DigitalLink.CANONICAL_DOMAIN, errorCorrection: QrErrorCorrection = QrErrorCorrection.M, moduleSize: Dp = 4.dp, quietZone: Int = QrCode.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White)

Shows message as a QR Code with its GS1 Digital Link URI, e.g. https://example.com/01/09501101020917/10/ABC123.

Link copied to clipboard
fun DataMatrixSymbol.toImageBitmap(modulePixels: Int = 10, quietZone: Int = Gs1DataMatrix.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White): ImageBitmap
fun QrCodeSymbol.toImageBitmap(modulePixels: Int = 10, quietZone: Int = QrCode.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White): ImageBitmap

Renders the symbol to a bitmap with exactly modulePixels pixels per module, e.g. for sharing or sending to a printer (use the printer's dots per module for sharp edges).

fun Code128Symbol.toImageBitmap(modulePixels: Int = 2, barHeightPixels: Int = 128, quietZone: Int = Gs1Code128.QUIET_ZONE_MODULES, darkColor: Color = Color.Black, lightColor: Color = Color.White): ImageBitmap

Renders the bars to a bitmap with exactly modulePixels pixels per module and barHeightPixels high. The human readable text is not included.