Title: Message
Hello all!
 
In my project I need to make iText & JFreeChart APIs to work on UNIX running without graphical subsystem. iText works well, however JFreeChart requires java.awt.Graphics2D and java.awt.Font classes which in turn require X environment. To overcome this limitation I introduced my own implementation of Graphics class which relies on com.lowagie.text.pdf.PdfContentByte methods. Then I went through all classes of JFreeChart and changed references to Graphics2D on references to my class. Also I changed java.awt.Font on com.lowagie.text.Font. After two days of working it all started working as I expected. However there are few things that need to be fixed.
 
It was pretty easy to implement such methods as fill(), draw() and drawText(). Now I am stack with implementation of clip(), getClip() and  setClip() methods. PdfContentByte class features method clip. Below  is the API documentation on this method:
Modify the current clipping path by intersecting it with the current path, using the nonzero winding number rule to determine which regions lie inside the clipping path.
It is not clear what the clipping path is and how I can manage it. According to the documentation iText deals with two paths: clipping path and current path. PdfContentByte's methods like lineTo affect current path. How I set and get the state of clipping path? Are there any examples of using clip method?
 
Thank you very much! Any help will be greatly appreciated.
 
--Alexander
 

Reply via email to