[Skia] Hit testing does not work precisely with scaling #19246
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
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 theRectangle
.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
The text was updated successfully, but these errors were encountered: