Skip to content

Commit

Permalink
Merge pull request #6657 from PJB3005/21-09-29-custom-draw-hit-test
Browse files Browse the repository at this point in the history
Fix ICustomDrawOperation HitTest coordinate space.
  • Loading branch information
jmacato committed Sep 30, 2021
2 parents 593045c + 4888fe9 commit d95f489
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ public CustomDrawOperation(ICustomDrawOperation custom, Matrix transform)

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

0 comments on commit d95f489

Please sign in to comment.