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

AirBrushTool: attempting to get a smoother, better performing Airbrush #645

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

dsizzle
Copy link
Collaborator

@dsizzle dsizzle commented Nov 5, 2023

  • only calculate 1/4 of the brush and draw 4 pixels at once
  • use LINEAR_INTERPOLATION in the CoordinateReader to get a smoother line
  • adjusted linear interpolation to only get 1/10th of the coordinates
  • remove snooze

@humdingerb can you give this a try to see if it's a better Airbrush experience? It works a lot better on my end but I'm also not seeing what you're seeing, so this is just a more general attempt to improve the Airbrush feeling.

- only calculate 1/4 of the brush and draw 4 pixels at once
- use LINEAR_INTERPOLATION in the CoordinateReader to get a smoother line
- adjusted linear interpolation to only get 1/10th of the coordinates
- remove snooze
- changed FreeLineTool to NO_INTERPOLATION; it doesn't need interpolation
@humdingerb
Copy link
Member

Nice. With this change it's again as fast as before!

@dsizzle
Copy link
Collaborator Author

dsizzle commented Nov 5, 2023

Ok, I cleaned up the change a bit - please re-test and if it still behaves well I can merge it.

EDIT: also I changed LINEAR_INTERPOLATION to NO_INTERPOLATION for the Free Line tool. It doesn't need the interpolation and it was showing slowness with large brushes.

@humdingerb
Copy link
Member

Still perfect. Good change!

@dsizzle dsizzle merged commit 8973a5f into HaikuArchives:master Nov 6, 2023
2 checks passed
@dsizzle
Copy link
Collaborator Author

dsizzle commented Nov 6, 2023

merged!

@dsizzle dsizzle deleted the airbrush-test branch November 6, 2023 18:07
@dsizzle dsizzle mentioned this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants