g0dkar / qrcode-kotlin

QRCode Generator implemented in pure Kotlin
https://qrcodekotlin.com/
MIT License
160 stars 13 forks source link

4.1.0 #109

Closed g0dkar closed 6 months ago

g0dkar commented 6 months ago

Disregard the name of the branch :P

4.1.0

After I merge this PR I'll release v4.1.0 with the main following changes:

Feel free to leave any suggestions, comments, nitpicks, etc.!

image

Once again, I have no words to how grateful I am to you all for using and contributing to the library ^^

Happy holidays, Merry Christmas, Happy New Year everyone!

chphmh commented 6 months ago

Hello @g0dkar, thank you for introducing a fix for the problem I mentioned in #107!

I'm not sure if I understand it completely though: As far as I got it, in renderShaded() in line 284 if the QR code has a margin > 0, one big square should be drawn with marginColor that covers the whole QR code's background including the margin around the actual code cells? https://github.com/g0dkar/qrcode-kotlin/blob/dc4e32f20d6199b46a65fca5c9635f6bd2b1a8ee/src/commonMain/kotlin/qrcode/raw/QRCodeProcessor.kt#L275-L285

Now with the new change in the renderer function used by render() in line 231 the margin rectangle that is drawn has the size margin,margin. Shouldn't it be the size of the whole QR code instead (the number that computeImageSize() calculates with size*cellSize+margin*2, or am I misunderstanding something here? https://github.com/g0dkar/qrcode-kotlin/blob/dc4e32f20d6199b46a65fca5c9635f6bd2b1a8ee/src/commonMain/kotlin/qrcode/raw/QRCodeProcessor.kt#L223-L233