//qrcode-kotlin/qrcode.color/QRCodeColorFunction

QRCodeColorFunction

interface QRCodeColorFunction

A function that selects a color for a give square. The default implementation chooses between fg, bg and margin given what should be rendered.

Inheritors

 
DefaultColorFunction
LinearGradientColorFunction

Functions

Name Summary
beforeRender [common]
open fun beforeRender(qrCode: QRCode, qrCodeGraphics: QRCodeGraphics)
Called before rendering starts, to setup something if needed
bg [common]
abstract fun bg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the background color
colorFn [common]
open fun colorFn(square: QRCodeSquare, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
fg [common]
abstract fun fg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the foreground color
margin [common]
open fun margin(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int
What is the margin color. Defaults to bg