Profile Picture

NPolygonF geometrical methods

Posted By Leonardo Rocha 12 Years Ago
Author
Message
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Leo,

The code looks Ok. Can you send the polygon data and point you're testing with?



Best Regards,
Nevron Support Team



Leonardo Rocha
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 7, Visits: 1

Hi,

I've been trying to select a NPolygon instance using the Contains(NpointF) method and it is returning false for a point inside the polygon. I also tried the Intersect(Rectangle) with a small rectangle with any sucess. What am I doing wrong in the code below?

      foreach (NPolygonF polygon in this.polygons)            {                if (polygon.Contains(point))                {                    return polygon;                }            }
Rgds,
Leo

 





Similar Topics


Reading This Topic