SonarSonic / DrawingBotV3

DrawingBotV3 is a software for converting images into vector art
https://docs.drawingbotv3.com
GNU General Public License v3.0
331 stars 43 forks source link

Drawing vs. canvas alignment #18

Closed HanzPetrov closed 2 years ago

HanzPetrov commented 2 years ago

Hi Ollie,

Although only really noticeable when working with small drawing sizes, the drawing and canvas appear to be misaligned. I suspect that this has something to do with stroke coordinates vs. pixel coordinates (corner vs. centre of pixel) - and it may be desired behaviour - but my WYSIWYG expectation would be to have stroke start and end points aligned with pixel centres.

Observed: Observed

Expected: Expected

I have kluged a fix (based on the idea that the misalignment is always equal to one-half pixel), but will hold off on a PR, since this might throw off GCode expections, or have other unintended consequences. Any thoughts welcome. commit

PS. Brilliant work refactoring Scott’s code, developing an elegant GUI, and adding loads of great new features and PFMs!

SonarSonic commented 2 years ago

Hello! Thanks for your work and for spotting this! I added some thoughts to your commits :)