PolygonsHelper

PolygonsHelper

Overview

PolygonsHelper is a class in Aspose.PDF FOSS for .NET.

Polygon and rectangle geometry utilities — point/polygon containment, segment hit-testing and rectangle/polygon classification.

This class provides 9 methods for working with PolygonsHelper objects in .NET programs. Available methods include: GetRectanglePositionRelativePolygon, IsIntersectLine, IsPointInsidePolygon, IsPointInsideRectangle, IsPointOnLineSegment, IsPolygonInsidePolygon, IsPolygonInsideRectangle. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.

Methods

SignatureDescription
GetRectanglePositionRelativePolygon(rect: Rectangle, polygon: Point[])Classifies the position of rect relative to polygon.
IsPolygonInsidePolygon(outer: Point[], inner: Point[])Returns true when every vertex of inner lies strictly inside the polygon outer.
IsPolygonInsidePolygon(outer: Point[], inner: Point[], includeBoundary: bool)Returns true when every vertex of inner lies inside the polygon outer.
IsPointInsidePolygon(polygon: Point[], point: Point)Returns true when point is strictly inside the polygon (excluding boundary).
IsPointInsidePolygon(polygon: Point[], point: Point, includeBoundary: bool)Returns true when point is inside the polygon.
IsPointOnLineSegment(a: Point, b: Point, p: Point)Returns true when point p lies on the segment from a to b.
IsIntersectLine(y: double, polygon: Point[])Returns true when the horizontal line y = y intersects any edge of polygon.
IsPolygonInsideRectangle(polygon: Point[], rect: Rectangle, includeBoundary: bool)Returns true when every vertex of polygon is inside rect.
IsPointInsideRectangle(px: double, py: double, width: double, height: double, includeBoundary: bool)Returns true when point (px, py) is inside the axis-aligned rectangle [0..width] × [0..height].

See Also