Use moveTo and lineTo to draw the star.  Clip.  Draw your picture.

Unless you use the "even-odd winding rule" clipping, you should be able
to just pick out the 5 corners of the star, close the path, and clip:

PdfContentByte cb = ...

cb.saveState();
cb.moveTo(100, 100); // top
cb.lineTo(125, 50); // bottom right
cb.lineTo(50, 75);  // left
cb.lineTo(150, 75); // right
cb.lineTo(75, 50);  // bottom left
cb.closePath();     // back to the top
cb.clip();
cb.addImage(...);
cb.restoreState();



--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 
 

> -----Original Message-----
> From: amonk [mailto:[email protected]] 
> Sent: Thursday, February 17, 2011 6:42 AM
> To: [email protected]
> Subject: [iText-questions] more complex Clipping Path
> 
> 
> Hi, 
> 
> I would get such an effect.
> 
> Star is a single path. 
> 
> I can export path to WMF ( I've seen, that iText has 
> interpreter Meta data for wmf),
> 
> Do you have any idea how can I achieve this?
> 
> http://itext-general.2136553.n4.nabble.com/file/n3310866/clip.jpg 
> 
> Thx.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/more-complex-Clippi
ng-Path-tp3310866p3310866.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --------------------------------------------------------------
> ----------------
> The ultimate all-in-one performance toolkit: Intel(R) 
> Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to