Orientation

function Orientation(const Polygon: TArrayOfFloatPoint): Boolean;


Orientation returns true if the supplied polygon's orientation is clockwise.

Orientation is important to differentiate outer 'container' polygon contours from inner 'hole' polygon contours.

When polygons are Added to a TClipper object, it doesn't matter whether outer polygons have clockwise or counter-clockwise orientation, it's only important that inner polygons have the opposite orientation to outer polygons.

However, when polygons are passed to the InflatePolygons function, it is important that outer polygons have a clockwise orientation.

It is assumed that the programmer understands polygon winding rules and how these affect polygon filling (rendering), and that polygon orientation is integral to determining winding values.

See Also

TClipper, TClipperBase.Add, InflatePolygons, ReversePolygon, ReversePolygons, TPolyFillType