1<html> 2 3<head> 4 5 <script type="text/javascript" src="../../../../Scripts/jquery.js"> 6 </script> 7 8 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shCore.js"> 9 </script> 10 11 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushDelphi.js"> 12 </script> 13 14 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCpp.js"> 15 </script> 16 17 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCSharp.js"> 18 </script> 19 20 <link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shCoreDefault.css"> 21 22 <link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shThemeDefault.css"> 23 24 25 <title>Orientation</title> 26 27 <link rel="stylesheet" href="../../../../Styles/default.css" type="text/css"> 28 29 30 <script type="text/javascript" src="../../../../Scripts/bootstrap.js"> 31 </script> 32 33</head> 34 35<body bgcolor="#FFFFFF"> 36 37 <!-- THIS FILE HAS BEEN AUTOMATICALLY PROCESSED FROM A SOURCE COPY --> 38 39 <!-- DO NOT EDIT MANUALLY !!! --> 40 41 <table class="Banner" cellspacing="0" cellpadding="0" border="1" bordercolorlight="#303080" bordercolordark="#7070B0"> 42 <tr> 43 <td class="Banner" nowrap=""><a href="../../../_Body.htm" class="Banner"><img src="../../../../Images/_Home.gif" align="absmiddle">Home</a> 44 </td> 45 <td class="Banner" nowrap=""><a href="../_Body.htm" class="Banner"><img src="../../../../Images/_Unit.gif" align="absmiddle">ClipperLib</a> 46 </td> 47 <td class="Banner" width="100%" align="right"><img src="../../../../Images/_Project_Logo.gif" align="absmiddle"> 48 </td> 49 </tr> 50 </table> 51 <h1>Orientation</h1> 52 53 54 <p class="Decl"><span class="Comment">Del.»</span> <b>function</b> Orientation(<b>const</b> poly: <a href="../Types/Path.htm">TPath</a>): boolean;</p> 55 56 <p class="Decl2"><span class="Comment">C++ »</span> <b>bool</b> Orientation(<b>const</b> <a href="../Types/Path.htm">Path</a> &poly); <span class="Comment">// Function in the ClipperLib namespace.</span></p> 57 58 <p class="Decl3"><span class="Comment">C# »</span> <b>public static bool</b> Orientation(<a href="../Types/Path.htm">Path</a> poly); <span class="Comment">// Static method of the Clipper class in the ClipperLib namespace.</span></p> 59 60 61 <p class="Body">Orientation is only important to <em>closed</em> paths. Given that vertices are declared in a specific order, orientation refers to the direction (clockwise or counter-clockwise) that these vertices progress around a closed path.<br><br> Orientation is also dependent on axis direction:<br> 62 <ul> 63 64 <li>On <b>Y-axis positive <em>upward</em> displays</b>, Orientation will return true if the polygon's orientation is counter-clockwise.</li> 65 66 <li>On <b>Y-axis positive <em>downward</em> displays</b>, Orientation will return true if the polygon's orientation is clockwise.</li> 67 68 </ul> </p> 69 70 71 <p class="Body"> <img src="../../../../Images/orientation.png" alt="" border="0" align="left"><br style="clear:both"><br> <b>Notes:</b><br> 72 <ul> 73 74 <li>Self-intersecting polygons have indeterminate orientations in which case this function won't return a meaningful value.</li> 75 76 <li>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 <em>with their Y axes increasing downward</em>. 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.</li> 77 78 <li>For Non-Zero filled polygons, the orientation of <a href="../../../Overview/_Body.htm#terminology">holes</a> <em>must be opposite</em> that of <a href="../../../Overview/_Body.htm#terminology">outer</a> polygons.</li> 79 80 <li>For closed paths (polygons) in the <em>solution</em> returned by Clipper's Execute method, their orientations will always be <em>true</em> for outer polygons and <em>false</em> for hole polygons (unless the <a href="../Classes/Clipper/Properties/ReverseSolution.htm"><b>ReverseSolution</b></a> property has been enabled).</li> 81 82 </ul> </p> 83<br> 84 85 <h2 id="Auto-SeeAlso">See Also</h2> 86 <p class="Body"><a href="../../../Overview/_Body.htm">Overview</a>, <a href="../Classes/Clipper/Properties/ReverseSolution.htm">Clipper.ReverseSolution</a>, <a href="../Types/Path.htm">Path</a></p> 87 88 <p class="Copyright" id="auto"> <br><br> Copyright ©2010-2014 Angus Johnson - Clipper 6.2.1 - Help file built on 1-November-2014 <br><br> </p> 89 90</body> 91 92</html>