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
parent
commit
d95f489cb6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Avalonia.Visuals/Rendering/SceneGraph/CustomDrawOperation.cs

7
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)

Loading…
Cancel
Save