VL Skia path hittest



Is there a recommended way to do a hittest/intersection test for a skia path?


Hi TobyK,

you can create a very small simple path (like Rectangle) and do the Paths > Op (path Operation: Intersect) between your path and this small rect path (for example attached to mouse position). Then you can check if the resulting path is empty or not: Paths > IsEmpty.

This is a general approach which works in many scenarios.

Skia has also Contains, which takes a path and a point (XY). But this one is missing in VL.Skia for the moment. We’ll add it soon.



Thanks, will try it