dagronf / QRCode

A quick and beautiful macOS/iOS/tvOS/watchOS QR Code generator/detector library for SwiftUI, Swift and Objective-C.
MIT License
438 stars 57 forks source link

Modified README for onPixel to specify certain properties to actually get the pixel style to take effect #41

Closed zdolson closed 6 months ago

zdolson commented 6 months ago

Was running into some issues with leveraging certain onPixel styles via qrcodegen. After digging through some code I saw that the inset-fraction and corner-radius properties were referenced with defaults. Given the issues I was running into, I did a simple test of passing in values for these properties and lo-and-behold got successful usage of the styles that were breaking.

Went through each of the onPixel styles that weren't working for me and tested with each property individually and then combined to see which styles actually needed which properties. Updated README to reflect my findings.

dagronf commented 6 months ago

Hi @zdolson, sorry that you've been having problems.

After reading this I had a wander through the qrcodegen source and found that it is always overwriting the default values for the pixelShape settings (and the eyeShape settings too). The defaults for the shape generators were not really set to 'useful' default values.

I've updated the code to provide defaults for the pixel, eye and pupil shapes so that they (by default) generate images that represent the generator.

Is it possible for you to try again using the 18.4.0 tagged build? It should generate default images that are much more representative of the generator.

Many thanks -- Darren.

dagronf commented 6 months ago

Closed due to lack of feedback