//qrcode-kotlin/io.github.g0dkar.qrcode.internals/QRCodeSquare
[common]
data class QRCodeSquare(var dark: Boolean, val row: Int, val col: Int, val moduleSize: Int, val squareInfo: QRCodeSquareInfo = QRCodeSquareInfo(DEFAULT, UNKNOWN))
Represents a single QRCode square unit. It has information about its "color" (either dark or bright), its position (row and column) and what it represents.
It can be part of a position probe (aka those big squares at the extremities), part of a position adjustment square, part of a timing pattern or just another square as any other :)
Rafael Lins - g0dkar
QRCodeSquare | [common] constructor(dark: Boolean, row: Int, col: Int, moduleSize: Int, squareInfo: QRCodeSquareInfo = QRCodeSquareInfo(DEFAULT, UNKNOWN)) |
Name | Summary |
---|---|
col | [common] val col: Int The column (left-to-right) that this square represents. |
dark | [common] var dark: Boolean Is this a painted square? |
moduleSize | [common] val moduleSize: Int How big is the whole QRCode matrix? (e.g. if this is "16" then this is part of a 16x16 matrix) |
row | [common] val row: Int The row (top-to-bottom) that this square represents. |
squareInfo | [common] val squareInfo: QRCodeSquareInfo What does this square represent within the QRCode? |
Name | Summary |
---|---|
absoluteX | [common] @JvmOverloads fun absoluteX(cellSize: Int = QRCode.DEFAULT_CELL_SIZE): Int Calculates where is the X position where this square will be in the main QRCode image given a cellSize. |
absoluteY | [common] @JvmOverloads fun absoluteY(cellSize: Int = QRCode.DEFAULT_CELL_SIZE): Int Calculates where is the Y position where this square will be in the main QRCode image given a cellSize. |