Skip to content

QrLogoPadding

Alexander Zhirkevich edited this page Sep 5, 2022 · 1 revision

Style of the logo padding

interface QrLogoPadding {

    val value : Float

    val shouldApplyAccuratePadding : Boolean

    fun apply(
        matrix: QrCodeMatrix, 
        logoSize: Int, 
        logoPos : Int,
        logoShape: QrLogoShape
    )

Properties

Property Description
value Size of padding relative to logo size
shouldApplyAccuratePadding Should Accurate padding be applied on top of this padding

Methods

fun apply(matrix: QrCodeMatrix, logoSize: Int, logoPos : Int, logoShape: QrLogoShape)

Apply padding to the QrCodeMatrix


Default implementations

Implementation Description
QrLogoPadding.Empty Empty logo padding. Some QR code pixels can be visible through the logo, if it has transparent parts
QrLogoPadding.Accurate Accurate logo padding shape. Some QR code pattern pixels can be cut
QrLogoPadding.Natural Similar to accurate, but all cute pixels will be fully removed
Clone this wiki locally