-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Hi,
I've noticed that QRCodeCanvas is sometimes isn't sharp when I apply zoom like 130%, so that my 512px QRCodeCanvas becomes 667px internally.
I guess it's because the calculated path to draw QR contains non-integer numbers (though I haven't time to check it).
Can perhaps the numbers in the path be rounded so that an always sharp QR is rendered? It will make modules have a bit different size (+- 1 pixel) but I guess it should be fine for scanners and also not so noticeable by people...
Another idea would be to ensure equal module sizes by shrinking the QR area and adding some additional margins. Though it can be unexpected because the margin size is already specified in modules, but more pixels will be added there.
Perhaps it could be a new setting like enum HandleScaling { FRACTIONAL_RENDERING /* current behavior */, ROUND, SHRINK }.