Browse Source
Merge pull request #6657 from PJB3005/21-09-29-custom-draw-hit-test
Fix ICustomDrawOperation HitTest coordinate space.
pull/6675/head
Jumar Macato
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
src/Avalonia.Visuals/Rendering/SceneGraph/CustomDrawOperation.cs
|
|
|
@ -17,7 +17,12 @@ namespace Avalonia.Rendering.SceneGraph |
|
|
|
|
|
|
|
public override bool HitTest(Point p) |
|
|
|
{ |
|
|
|
return Custom.HitTest(p * Transform); |
|
|
|
if (Transform.HasInverse) |
|
|
|
{ |
|
|
|
return Custom.HitTest(p * Transform.Invert()); |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
public override void Render(IDrawingContextImpl context) |
|
|
|
|