alexzhirkevich / custom-qr-generator

Android library for creating QR codes with logo, custom shapes, colors, background image. Powered by ZXing
MIT License
173 stars 18 forks source link

Central symmetry of shapes #13

Closed alexzhirkevich closed 1 year ago

alexzhirkevich commented 1 year ago
    How to customise eyes like this, i tried and able to customise with same shape but all the sides are same! how to differentiate left top,  right top and left bottom eye side? 

unitag_qrcode_standard

Originally posted by @hardikbhalodi in https://github.com/alexzhirkevich/custom-qr-generator/issues/8#issuecomment-1371942600

alexzhirkevich commented 1 year ago

Vector codes

From 1.5.5 central symmetry is enabled by default and can be changed with

val options = createQrVectorOptions {
    shapes(centralSymmetry = enabled){
        /// .....
    }
}

Or in builder :

val shapes = QrVectorShapes(
    centralSymmetry = enabled,
    frame = ...,
    ball = ...
)

Raster codes

Central symmetry was enabled by default from the beginning. Cannot be disabled.

hardikbhalodi commented 1 year ago

Thanks, i will check it out

alexzhirkevich commented 1 year ago
    How to customise eyes like this, i tried and able to customise with same shape but all the sides are same! how to differentiate left top,  right top and left bottom eye side? 

unitag_qrcode_standard

Originally posted by @hardikbhalodi in #8 (comment)

Shape like this now can be created using bottomRight = false property in QrVectorFrameShape.RoundCorners and QrVectorBallShape.RoundCorners constructors