<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : SetClippingPathEvenOdd</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : SetClippingPathEvenOdd]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 07:15:32 +0000</pubDate>
  <lastBuildDate>Tue, 24 May 2022 14:04:33 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=3984</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[SetClippingPathEvenOdd : I&amp;#039;ve got this working as...]]></title>
   <link>http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16111.html#16111</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3325">fellafoo</a><br /><strong>Subject:</strong> 3984<br /><strong>Posted:</strong> 24 May 22 at 2:04PM<br /><br />I've got this working as expected now. I was starting my loop at 1 instead of 0. So this is compatible with the logic I use to create polygons and clipping regions with Windows.PolyPolygon. As in...<div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>&nbsp; BeginPath(aDC);</div><div>&nbsp; PolyPolygon(aDC, aPtArr^, aPtCount^, aPlyCount);</div><div>&nbsp; EndPath(aDC);</div><div><br></div><div>&nbsp; Rgn := PathToRegion(aDC);</div><div>&nbsp; SelectClipRgn(aDC, Rgn);</div></div><div></pre></td></tr></table></div><div>...and what I was hoping for.</div>]]>
   </description>
   <pubDate>Tue, 24 May 2022 14:04:33 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16111.html#16111</guid>
  </item> 
  <item>
   <title><![CDATA[SetClippingPathEvenOdd : Thanks Kevin,I&amp;#039;ll need to...]]></title>
   <link>http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16110.html#16110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3325">fellafoo</a><br /><strong>Subject:</strong> 3984<br /><strong>Posted:</strong> 24 May 22 at 1:18PM<br /><br />Thanks Kevin,<div><br></div><div>I'll need to do some more experimenting. I was looking for a way to start a new path before setting the clipping path but assumed MovePath was for actually moving the path not an equivalent to MoveTo. So at least I've got that part straightened out.</div><div><br></div><div>My point arrays / loops are closed (i.e., the first and last points are the same) so I don't think I need to call ClosePath. Section '8.5.3.3 Filling'<span style=": rgb251, 251, 253;">&nbsp;of the PDF 1.7 document describes the Nonzero Winding Number and Even-Odd rules. The point order is considered in the first case but not the second.</span></div><div><span style=": rgb251, 251, 253;"><br></span></div><div><span style=": rgb251, 251, 253;">MFM</span></div>]]>
   </description>
   <pubDate>Tue, 24 May 2022 13:18:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16110.html#16110</guid>
  </item> 
  <item>
   <title><![CDATA[SetClippingPathEvenOdd : Hello MFM,I could be mistaken...]]></title>
   <link>http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16107.html#16107</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3324">kevinqpl</a><br /><strong>Subject:</strong> 3984<br /><strong>Posted:</strong> 23 May 22 at 9:17PM<br /><br />Hello MFM,<div><br></div><div>I could be mistaken but I think the different clipping path modes are related to the direction of the "inner" path, in other words if the points are clockwise or anticlockwise compared to the direction of the outer curve. Although maybe it's to do with paths that overlap themselves?</div><div><br></div><div>In any case, the following code shows how to have a void in a clipping path. The trick is to close the outer path, then move to the start of your inner path, and close that path when its done. Finally, set the clipping path depending on the direction.</div><div><br></div><div>You can change AntiClockwise to True or False and it will have the same effect as the direction of the inner curve is changed.</div><div><br></div><div><div>&nbsp; &nbsp; QP.StartPath(100, 700);</div><div>&nbsp; &nbsp; QP.AddLineToPath(500, 700);</div><div>&nbsp; &nbsp; QP.AddLineToPath(500, 300);</div><div>&nbsp; &nbsp; QP.AddLineToPath(100, 300);</div><div>&nbsp; &nbsp; QP.AddLineToPath(100, 700);</div><div>&nbsp; &nbsp; QP.ClosePath;</div><div><br></div><div>&nbsp; &nbsp; AntiClockwise := False;</div><div><br></div><div>&nbsp; &nbsp; if (AntiClockwise) then</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; QP.MovePath(120, 320);</div><div>&nbsp; &nbsp; &nbsp; QP.AddLineToPath(480, 320);</div><div>&nbsp; &nbsp; &nbsp; QP.AddLineToPath(300, 680);</div><div>&nbsp; &nbsp; &nbsp; QP.ClosePath;</div><div>&nbsp; &nbsp; &nbsp; QP.SetClippingPath;</div><div>&nbsp; &nbsp; end else</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; QP.MovePath(120, 320);</div><div>&nbsp; &nbsp; &nbsp; QP.AddLineToPath(300, 680);</div><div>&nbsp; &nbsp; &nbsp; QP.AddLineToPath(480, 320);</div><div>&nbsp; &nbsp; &nbsp; QP.ClosePath;</div><div>&nbsp; &nbsp; &nbsp; QP.SetClippingPathEvenOdd;</div><div>&nbsp; &nbsp; end;</div></div><div><br></div><div><div>&nbsp; &nbsp; QP.SetFillColor(1, 0, 0);</div><div>&nbsp; &nbsp; QP.DrawCircle(300, 500, 250, 1);</div></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 23 May 2022 21:17:35 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16107.html#16107</guid>
  </item> 
  <item>
   <title><![CDATA[SetClippingPathEvenOdd : Hello Forum Members:Do any of...]]></title>
   <link>http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16104.html#16104</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3325">fellafoo</a><br /><strong>Subject:</strong> 3984<br /><strong>Posted:</strong> 21 May 22 at 3:58PM<br /><br />Hello Forum Members:<div><br></div><div>Do any of you have experience with SetClippingPath/EvenOdd?</div><div><br></div><div>I am able to create a path, set a clipping path, and draw a bitmap over it and have it clipped to the outer boundary of the path. However, I also need to handle voids. I've tried drawing the perimeter, setting the clipping path, then drawing the interior void and setting the clipping path, but the bitmap always gets clipped to the 'smaller' path. The EvenOdd options seems to make no difference.</div><div><br></div><div>Here's the gist of my code:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>&nbsp; if Pipe.ToPlotter then</div><div>&nbsp; &nbsp; PrinterPDF.SaveState; { Save current clipping path (there should be none at this point). }</div><div><br></div><div>&nbsp; { PrinterPDF Clipping Path }</div><div>&nbsp; { Convert point array for clipping path }</div><div>&nbsp; PDF_Pnts := PntsArr;</div><div>&nbsp; PDF_Cnts := PolyCounts;</div><div>&nbsp; for i := 0 to Pred(Num_Contours) do begin { x Polygons }</div><div>&nbsp; &nbsp; SetLength(iePtsArr, PDF_Cnts^); { No. Points in curr. Polygon }</div><div>&nbsp; &nbsp; for j := 0 to Pred(PDF_Cnts^) do begin</div><div>&nbsp; &nbsp; &nbsp; iePtsArr&#091;j&#093; := PDF_Pnts^; { Array of points in curr. Polygon. }</div><div>&nbsp; &nbsp; &nbsp; Inc(PDF_Pnts);</div><div>&nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; Inc(PDF_Cnts);</div><div><br></div><div>&nbsp; &nbsp; X1 := iePtsArr&#091;0&#093;.X / 600; { Convert printer canvas coordinate to inches }</div><div>&nbsp; &nbsp; Y1 := iePtsArr&#091;0&#093;.Y / 600;</div><div>&nbsp; &nbsp; PrinterPDF.StartPath(X1, Y1);</div><div>&nbsp; &nbsp; for k := 1 to High(iePtsArr) do begin</div><div>&nbsp; &nbsp; &nbsp; X2 := iePtsArr&#091;k&#093;.X / 600;</div><div>&nbsp; &nbsp; &nbsp; Y2 := iePtsArr&#091;k&#093;.Y / 600;</div><div>&nbsp; &nbsp; &nbsp; PrinterPDF.AddLineToPath(X2, Y2);</div><div>&nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; //PrinterPDF.SetClippingPath;</div><div>&nbsp; &nbsp; PrinterPDF.SetClippingPathEvenOdd;</div><div>&nbsp; end;</div><div><br></div></div><div><div>&nbsp; ImageID := PrinterPDF.AddImageFromFile(ImgFName, 6);</div><div>&nbsp; if (ImageID &lt;&gt; 0) then begin</div><div>&nbsp; &nbsp; PrinterPDF.SelectImage(ImageID);</div><div>&nbsp; &nbsp; PrinterPDF.DrawRotatedImage(PDF_ImgLeft, PDF_ImgTop, PDF_ImgWidth, PDF_ImgHeight, 270);</div><div>&nbsp; &nbsp; PrinterPDF.ReleaseImage(ImageID);</div><div>&nbsp; &nbsp; //PrinterPDF.ClearImage(ImageID);</div><div>&nbsp; end;</div><div>&nbsp; PrinterPDF.LoadState; { Restore clipping path (there should be none after this point). }</div></div><div></pre></td></tr></table></div><div><br></div><div>Thank You,</div><div><br></div><div>MFM</div>]]>
   </description>
   <pubDate>Sat, 21 May 2022 15:58:54 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setclippingpathevenodd_topic3984_post16104.html#16104</guid>
  </item> 
 </channel>
</rss>