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

Fix mottled transparent lines #41

Merged
merged 2 commits into from
Nov 6, 2021

Conversation

mrfoogles
Copy link
Contributor

When you use the pen tool to draw transparent lines, they end up different colors across, since the pen is drawing multiple times on each pixel.

I added Canvas.previous_pixel so that the pen tool will now only draw once on each pixel until you move the mouse onto another.

Original

broken.mov

Fixed (I meant to use the same color on both, but this one is dark blue)

fixed.mov

This fixes the weird mottled lines you get whenever you draw transparent with the pen.
This also fixes the bug where the click handler draws the last point in a freehand line on mouseup after it's already been drawn on by the mouse-move (the mouse-move to get to the point)
 - moved on click to on mouseup, and added a checker to make it return if it's already drawn on a point this click (if the user dragged the mouse)
@theabbie
Copy link
Collaborator

@mrfoogles Looks Good, we will review these changes soon.

@mrfoogles
Copy link
Contributor Author

...it's been two months
oh well

@rgab1508 rgab1508 merged commit acd7bb1 into rgab1508:master Nov 6, 2021
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 this pull request may close these issues.

None yet

3 participants