A class that wraps a PointF representing a Polygon. The class members include:
- RectangleF Bounds
- float MinimumX
- float MaximumX
- float Minimum Y
- float Maximum Y
- int NumberOfPoints
- bool IsInBounds(PointF pt)
- bool Contains(PointF pt)
- PointF CenterPointOfBounds
- PointF CenterPoint // Not yet implemented
- decimal Area
IsInBounds returns true if the PointF is within the Rectangular Bounds of the Polygon. Contains returns true if the PointF is actually within the Polygon’s borders.
The class includes both the PolygonF and Polygon classes. Polygon is identical to PolygonF except that it works with an array of Point objects and return ints instead of floats.
First introduced on the blog under Testing to see if a Point is within a Polygon.