You are really taking the hard way! There are several ways to solve the
problem of the missing awt toolkit with X simulators and there's even a java
only solution that replaces the native awt (and works).
If you are really set to replace Graphics2D start with PdfGraphics2D
specially the clip section as this is a very tricky and works differently in
awt and PDF.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Alexander Kolomietz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 18:52
Subject: [iText-questions] re: com.lowagie.text.pdf.PdfContentByte.clip()


> 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
>
>



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to