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

input: Make TabletToolEvent depend on AbsolutePositionEvent, and apply output transform to tablet events in anvil #1593

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Nov 20, 2024

I noticed that TabletToolEvent provides methods like position_transformed, but doesn't depend on AbsolutePositionEvent. This makes it slightly inconvenient to make generic code that handles both tablet and touch events.

I think this is a reasonable way to change this.

`TabletToolEvent` provides all the methods that are provide by
`AbsolutePositionEvent`. Seemingly with the only difference that tablet
events guarantee the untransformed coordinates are in mm, while it is
otherwise unspecified with `AbsolutePositionEvent`.

Re-using the `AbsolutePositionEvent` trait here makes it easier to
share a bit of code for handling tablet and touch events.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.32%. Comparing base (5e137dc) to head (2127ec3).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1593      +/-   ##
==========================================
- Coverage   19.61%   19.32%   -0.30%     
==========================================
  Files         170      169       -1     
  Lines       27956    27608     -348     
==========================================
- Hits         5484     5335     -149     
+ Misses      22472    22273     -199     
Flag Coverage Δ
wlcs-buffer 17.12% <ø> (+0.05%) ⬆️
wlcs-core 16.85% <ø> (+0.05%) ⬆️
wlcs-output ?
wlcs-pointer-input 18.64% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

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.

3 participants