//qrcode-kotlin/qrcode.shape/DefaultShapeFunction

DefaultShapeFunction

open class DefaultShapeFunction(val squareSize: Int = DEFAULT_CELL_SIZE, innerSpace: Int = 1) : QRCodeShapeFunction

Inheritors

 
RoundSquaresShapeFunction

Constructors

   
DefaultShapeFunction [common]
constructor(squareSize: Int = DEFAULT_CELL_SIZE, innerSpace: Int = 1)

Properties

Name Summary
squareSize [common]
val squareSize: Int

Functions

Name Summary
beforeRender [common]
open fun beforeRender(qrCode: QRCode, qrCodeGraphics: QRCodeGraphics)
Called before rendering starts, to set up something if needed
drawRect [common]
open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double, canvas: QRCodeGraphics)
The function to actually draw the outline of a cell. Extend this to easily create your own shape :)
fillRect [common]
open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int, canvas: QRCodeGraphics)
The function to actually draw a filled cell. Extend this to easily create your own shape :)
renderControlSquare [common]
open override fun renderControlSquare(xOffset: Int, yOffset: Int, colorFn: QRCodeColorFunction, square: QRCodeSquare, canvas: QRCodeGraphics, qrCode: QRCode)
Renders a control square (those bigger ones on the edges).
renderSquare [common]
open override fun renderSquare(x: Int, y: Int, colorFn: QRCodeColorFunction, square: QRCodeSquare, canvas: QRCodeGraphics, qrCode: QRCode)
Renders a single square.