1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
<html>
<head>
<script type="text/javascript" src="../../../../Scripts/jquery.js">
</script>
<script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shCore.js">
</script>
<script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushDelphi.js">
</script>
<script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCpp.js">
</script>
<script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCSharp.js">
</script>
<link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shCoreDefault.css">
<link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shThemeDefault.css">
<title>ClipType</title>
<link rel="stylesheet" href="../../../../Styles/default.css" type="text/css">
<script type="text/javascript" src="../../../../Scripts/bootstrap.js">
</script>
</head>
<body bgcolor="#FFFFFF">
<!-- THIS FILE HAS BEEN AUTOMATICALLY PROCESSED FROM A SOURCE COPY -->
<!-- DO NOT EDIT MANUALLY !!! -->
<table class="Banner" cellspacing="0" cellpadding="0" border="1" bordercolorlight="#303080" bordercolordark="#7070B0">
<tr>
<td class="Banner" nowrap=""><a href="../../../_Body.htm" class="Banner"><img src="../../../../Images/_Home.gif" align="absmiddle">Home</a>
</td>
<td class="Banner" nowrap=""><a href="../_Body.htm" class="Banner"><img src="../../../../Images/_Unit.gif" align="absmiddle">ClipperLib</a>
</td>
<td class="Banner" width="100%" align="right"><img src="../../../../Images/_Project_Logo.gif" align="absmiddle">
</td>
</tr>
</table>
<h1>ClipType</h1>
<p class="Decl"><span class="Comment">Del.»</span> <b>type</b> TClipType = (ctIntersection, ctUnion, ctDifference, ctXor);</p>
<p class="Decl2"><span class="Comment">C++ »</span> <b>enum </b>ClipType { ctIntersection, ctUnion, ctDifference, ctXor };</p>
<p class="Decl3"><span class="Comment">C# »</span> <b>public enum</b> ClipType { ctIntersection, ctUnion, ctDifference, ctXor };</p>
<br>
<p class="Body"> There are four boolean operations - AND, OR, NOT & XOR.<br><br> Given that subject and clip polygon brush 'filling' is defined both by their vertices and their respective <a href="./PolyFillType.htm">filling rules</a>, the four boolean operations can be applied to polygons to define new filling regions:
<ul>
<li>AND (intersection) - create regions where both subject <b>and</b> clip polygons are filled</li>
<li>OR (union) - create regions where <b>either</b> subject <b>or</b> clip polygons (or both) are filled</li>
<li>NOT (difference) - create regions where subject polygons are filled <b>except</b> where clip polygons are filled</li>
<li>XOR (exclusive or) - create regions where <b>either</b> subject <b>or</b> clip polygons are filled <b>but not</b> where <b>both</b> are filled</li>
</ul> <br> </p>
<p class="Body"> <img src="../../../../Images/cliptype.png" width="175" height="200" alt=""><br> <img src="../../../../Images/intersection.png" width="175" height="200" alt=""> <img src="../../../../Images/union.png" width="175" height="200" alt=""> <img src="../../../../Images/difference.png" width="175" height="200" alt=""> <img src="../../../../Images/xor.png" width="175" height="200" alt=""><br><br> All polygon clipping is performed with a <a href="../Classes/Clipper/_Body.htm">Clipper</a> object with the specific boolean operation indicated by the <em>ClipType</em> parameter passed in its <a href="../Classes/Clipper/Methods/Execute.htm">Execute</a> method. </p><br>
<p class="Body"> With regard to <b>open</b> paths (polylines), clipping rules generally match those of closed paths (polygons).<br> However, when there are both polyline and polygon subjects, the following clipping rules apply:
<ul>
<li>union operations - polylines will be clipped by any overlapping polygons so that non-overlapped portions will be returned in the solution together with the union-ed polygons</li>
<li>intersection, difference and xor operations - polylines will be clipped only by 'clip' polygons and there will be not interaction between polylines and subject polygons.</li>
</ul> </p><br>
<p class="Body"> Example of clipping behaviour when mixing polyline and polygon subjects:<br> <img src="../../../../Images/line_clipping2.png"> </p>
<h2 id="Auto-SeeAlso">See Also</h2>
<p class="Body"><a href="../../../Overview/_Body.htm">Overview</a>, <a href="../Classes/Clipper/_Body.htm">Clipper</a>, <a href="../Classes/Clipper/Methods/Execute.htm">Clipper.Execute</a>, <a href="PolyFillType.htm">PolyFillType</a></p>
<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>
</body>
</html>
|