Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing vs. canvas alignment #18

Closed
Tracked by #29
HanzPetrov opened this issue Nov 1, 2021 · 1 comment · Fixed by #33
Closed
Tracked by #29

Drawing vs. canvas alignment #18

HanzPetrov opened this issue Nov 1, 2021 · 1 comment · Fixed by #33

Comments

@HanzPetrov
Copy link
Collaborator

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
Copy link
Owner

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

@HanzPetrov HanzPetrov linked a pull request Dec 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants