//qrcode-kotlin/qrcode.shape/CircleShapeFunction

CircleShapeFunction

open class CircleShapeFunction@JvmOverloadsconstructor(val squareSize: Int = DEFAULT_CELL_SIZE, innerSpace: Int = defaultInnerSpace(squareSize)) : RoundSquaresShapeFunction

Creates circles instead of squares while drawing the QRCode. By default, the circles will keep 8% of the squareSize pixels away from each other, to have a more pleasing aesthetics.

Parameters

common

   
squareSize How big each "square" will be, in pixels (defaults to DEFAULT_CELL_SIZE)
innerSpace How much space inside each "square" will be left empty (1 = 1px of the inner area won’t be drawn)

Constructors

   
CircleShapeFunction [common]
@JvmOverloads
constructor(squareSize: Int = DEFAULT_CELL_SIZE, innerSpace: Int = defaultInnerSpace(squareSize))

Types

Name Summary
Companion [common]
object Companion

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 override 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 override 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.