0

I need to decide whether a Point is inside a given Path.

In WPF I was able to use Geometry.FillContains: https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.geometry.fillcontains?view=netframework-4.8#System_Windows_Media_Geometry_FillContains_System_Windows_Point_

How can I do the same in UWP?

Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46
  • Just one point? Don't know if it's in uwp but the wpf alternative is to hit test. It is slow though. – Andy May 02 '19 at 08:06
  • 1
    I know that Win2D gives you much more functionality with regards to Geometry, including hit testing I believe. A quick Google search gives me this Q&A which could point you in the right direction - https://stackoverflow.com/questions/41854591/drawing-editable-and-selectable-shapes-with-win2d – Adam McMahon May 02 '19 at 09:24
  • 1
    Thanks @AdamMcMahon, I was able to achieve my result using CanvasGeometry.FillContainsPoint. If you copy your comment as an answer I can accept it. – Cristiano Ghersi May 13 '19 at 21:00

1 Answers1

1

I know that Win2D gives you much more functionality with regards to Geometry, including hit testing I believe.

A quick Google search gives me this Q&A which could point you in the right direction - Win2D Geomery Hit Testing

Adam McMahon
  • 765
  • 3
  • 24