//qrcode-kotlin/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), val rowSize: Int = 1, val colSize: Int = 1, val parent: QRCodeSquare? = null)
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), rowSize: Int = 1, colSize: Int = 1, parent: QRCodeSquare? = null) |
Name | Summary |
---|---|
col | [common] val col: Int The column (left-to-right) that this square represents. |
colSize | [common] val colSize: Int = 1 How many actual QRCode squares this one take up? (1 = a single square, >1 = likely a probe) |
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) |
parent | [common] val parent: QRCodeSquare? = null Filled if this square is part of a larger one (like a QRCodeSquareType.POSITION_PROBE) |
rendered | [common] var rendered: Boolean |
row | [common] val row: Int The row (top-to-bottom) that this square represents. |
rowSize | [common] val rowSize: Int = 1 How many actual QRCode squares this one take up? (1 = a single square, >1 = likely a probe) |
squareInfo | [common] val squareInfo: QRCodeSquareInfo What does this square represent within the QRCode? |
Name | Summary |
---|---|
absoluteX | [common] @JvmOverloads fun absoluteX(cellSize: Int = QRCodeProcessor.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 = QRCodeProcessor.DEFAULT_CELL_SIZE): Int Calculates where is the Y position where this square will be in the main QRCode image given a cellSize. |
equals | [common] open operator override fun equals(other: Any?): Boolean |
hashCode | [common] open override fun hashCode(): Int |