//qrcode-kotlin/qrcode.raw/QRCodeProcessor/render
[common]
fun render(cellSize: Int = DEFAULT_CELL_SIZE, margin: Int = DEFAULT_MARGIN, brightColor: Int = Colors.WHITE, darkColor: Int = Colors.BLACK, marginColor: Int = Colors.WHITE): QRCodeGraphics
Renders a QR Code image based on its computed data. This function exists to ease the interop with Java :)
A QRCodeGraphics with the QR Code rendered on it. It can then be saved or manipulated as desired.
common
cellSize | The size in pixels of each square (cell) in the QR Code. Defaults to 25 . |
margin | Amount of space in pixels to add as a margin around the rendered QR Code. Defaults to 0 . |
brightColor | Color to be used for the "bright" parts of the QR Code. In RGBA space. Defaults to white. |
darkColor | Color to be used for the "dark" parts of the QR Code. In RGBA space. Defaults to black. |
marginColor | Color to be used for the "margin" part of the QR Code. In RGBA space. Defaults to white. |
QRCodeProcessor.renderShaded |
QRCodeSquare |
QRCodeGraphics |
Colors |
[common]\
fun render(cellSize: Int = DEFAULT_CELL_SIZE, margin: Int = DEFAULT_MARGIN, rawData: QRCodeRawData = encode(), qrCodeGraphics: QRCodeGraphics = graphicsFactory.newGraphicsSquare( computeImageSize( cellSize, margin, rawData, ), ), brightColor: Int = Colors.WHITE, darkColor: Int = Colors.BLACK, marginColor: Int = Colors.WHITE): QRCodeGraphics
Renders a QR Code image based on its computed data.
Tip: for the "traditional look-and-feel" QR Code, set margin equal to cellSize.
A QRCodeGraphics with the QR Code rendered on it. It can then be saved or manipulated as desired.
common
cellSize | The size in pixels of each square (cell) in the QR Code. Defaults to 25 . |
margin | Amount of space in pixels to add as a margin around the rendered QR Code. Defaults to 0 . |
rawData | The data matrix of the QR Code. Defaults to this.encode(). |
qrCodeGraphics | The QRCodeGraphics where the QRCode will be painted into. |
brightColor | Color to be used for the "bright" parts of the QR Code. In RGBA space. Defaults to white. |
darkColor | Color to be used for the "dark" parts of the QR Code. In RGBA space. Defaults to black. |
marginColor | Color to be used for the "margin" part of the QR Code. In RGBA space. Defaults to white. |
QRCodeProcessor.renderShaded |
QRCodeSquare |
QRCodeGraphics |
Colors |