Open mustanggb opened 2 years ago
Ugh, very good question. To be fair, I've written that code over four years ago, and I'm not even certain anymore what the actual logic in there was supposed to do.
Reading through it a little bit, the general logic was apparently this:
If some element inherits the main color, it is added to the global path object, otherwise it is directly drawn with the given rotation and color through the image back-end.
I guess the correct solution would be to rotate each path when appending it to the module path.
When you write a fix for that, please make sure to cover that new logic with one or more unit test, see:
https://github.com/Bacon/BaconQrCode/tree/master/test/Integration
I guess the correct solution would be to rotate each path when appending it to the module path.
This was my thought also, unfortunately path doesn't have a rotate function (yet).
My understanding of the codebase isn't able to chuck one in quickly either at the moment.
If I figure it out I'll be sure to let you know.
In
drawEye()
rotation will be ignored ifinheritsBothColors()
inheritsExternalColor()
orinheritsInternalColor()
returntrue
.Not sure what the best solution is, open to suggestions.