Orientation
function Orientation(const poly: TPolygon): boolean;
bool Orientation(const Polygon &poly);
public static bool Orientation(Polygon poly);
Given that polygon vertices are declared in a specific order, orientation refers to the direction (clockwise or counter-clockwise) that these vertices progress around the contents of a polygon.
Orientation is also dependent on axis direction:
- On Y-axis positive upward displays, Orientation will return true if the polygon's orientation is counter-clockwise.
- On Y-axis positive downward displays, Orientation will return true if the polygon's orientation is clockwise.

Notes:
- Self-intersecting polygons have indeterminate orientations. If a self-intersecting polygon is passed to this function it won't return a predictable result.
- The majority of 2D graphic display libraries (eg GDI, GDI+, XLib, Cairo, AGG, Graphics32) and even the SVG file format have their coordinate origins at the top-left corner of their respective viewports with their Y axes increasing downward. However, some display libraries (eg Quartz, OpenGL) have their coordinate origins undefined or in the classic bottom-left position with their Y axes increasing upward.
- For Non-Zero filled polygons, the orientation of holes must be opposite that of outer polygons.
- For polygons in the solution returned by Clipper's Execute method, their orientations will always be true for outer polygons and false for hole polygons (unless the ReverseSolution property has been enabled).
- For the OffsetPolygons function to work as expected, outer polygons must have a true orientation and hole polygons must have a false orientation.
See Also
Overview, Clipper.ReverseSolution, OffsetPolygons, Polygon
Copyright ©2010-2013 Angus Johnson - Clipper Ver 5.1.6 - Help file built on 24-May-2013