Skip to content

QrOptions

Alexander Zhirkevich edited this page Sep 5, 2022 · 5 revisions

Used to apply visual styles for QR code.

data class QrOptions(
    @IntRange(from = 0) val width : Int,
    @IntRange(from = 0) val height : Int,
    @FloatRange(from = .0, to = .5) val padding : Float,
    val offset: QrOffset,
    val colors : QrColors,
    val logo: QrLogo,
    val background: QrBackground,
    val shapes: QrElementsShapes,
    val codeShape : QrShape,
    val errorCorrectionLevel: QrErrorCorrectionLevel
) 

Properties

Property Description
width Width of the output QR code image in pixels
height Height of the output QR code image in pixels
padding Padding of the QR code pattern. Should be from 0.0f to 0.5f
offset Offset of the QR code pattern relative to it padding.
colors Colors of the QR code elements
logo QR code center logo
background Style of the QR code background
shapes Shapes of the QR code elements
codeShape Shape of the QR code pattern
errorCorrectionLevel Level of QR code error correction. Allows some parts of QR code to be damaged or used for the logo.

Comments

Should be created using QrOptions.Builder class or createQrOptions DSL build function.

Clone this wiki locally