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

[Skia] Hit testing does not work precisely with scaling #19246

Open
MartinZikmund opened this issue Jan 16, 2025 · 0 comments
Open

[Skia] Hit testing does not work precisely with scaling #19246

MartinZikmund opened this issue Jan 16, 2025 · 0 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers triage/untriaged Indicates an issue requires triaging or verification

Comments

@MartinZikmund
Copy link
Member

MartinZikmund commented Jan 16, 2025

Current behavior

The When_Border_CornerRadius_HitTesting(true, true) test is failing on Skia targets when scaling of 150 % is applied. This does not happen with 100 % scaling.

As per my investigation, the problem happens when trying the 20, 125 point - probably due to the scaling and layout rounding, the tested rect is off by 0.333, which makes the hit test to miss the Rectangle.

It is possible that the test condition it just not correct, as under this scaling the hit test is just off, but it is worth investigating this.

Expected behavior

Test should pass.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

Test was adjusted to validate point (21, 125) instead of (20, 125) to avoid this rounding error

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@MartinZikmund MartinZikmund added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers triage/untriaged Indicates an issue requires triaging or verification labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

1 participant