Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

SKRegion SetPath always returns false.

$
0
0

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.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>