I have the following function:
private bool IsInside(SKPath pInput, SKPath pBoundary)
{
var input = new SKRegion();
var boundary = new SKRegion();
//input.SetRect (ToIntRect(pInput.Bounds));
//boundary.SetRect(ToIntRect(pBoundary.Bounds));
pInput.Close();
pBoundary.Close();
if (input.SetPath(pInput))
if (boundary.SetPath(pBoundary))
{
var contained = boundary.Contains(input);
return contained;
}
return false;
}
It is meant to check if one path is inside another. However it doesn't because input.setpath always returns false. I tried it with test rectangles, it does perform correctly when I use the rectangles, but these are too course and do not take into account concave geometry.