-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use the himetric location instead of the pixel location. #16850
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
Use the himetric location instead of the pixel location. #16850
Conversation
You can test this PR using the following package version. |
@walterlv There are some conflicts that must be resolved (edit: and your branch is write-protected). |
a2dee88
to
295f0c8
Compare
@MrJul Confliction Resolved 😉 |
You can test this PR using the following package version. |
…16850) * Add an overload with more precise point transformation. * Use the himetric location instead of the pixel location. * The pen also use the himetric location. * Similar codes. * Use the raw location instead of the predicted one. See: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-pointer_info * Fix wrong multi-screen location * Add lost win32 api. (cherry picked from commit 0bd90d8)
…16850) * Add an overload with more precise point transformation. * Use the himetric location instead of the pixel location. * The pen also use the himetric location. * Similar codes. * Use the raw location instead of the predicted one. See: https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-pointer_info * Fix wrong multi-screen location * Add lost win32 api. (cherry picked from commit 0bd90d8)
What does the pull request do?
This PR uses the
ptHimetricLocation
in thePOINTER_INFO
struct instead of theptPixelLocation
which makes the touch pointer more accurate.As a result, if we draw all the touch points line-by-line, the path will be more smooth and accurate. See the following image for the comparison:
The following is a sample output of the touch points with the
ptPixelLocation
andptHimetricLocation
:What is the current behavior?
ptPixelLocation
which is an integer value.PointToClient
method only receivesPixelPoint
parameter which loses the decimal part of the touch point.What is the updated/expected behavior with this PR?
ptHimetricLocation
which is a float value.PointToClient
method receivesPoint
parameter which keeps the decimal part of the touch point. I've written a new overload for the existed one.How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
I think there is no breaking changes.
Obsoletions / Deprecations
Fixed issues