As opposed to not allowing any user-defined Paint at all? I'd say it is.
-Bill Ensley
www.bearprinting.com
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of NCA
Sent: Thursday, January 04, 2007 1:56 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] PdfGraphics2D and specific Paint
PdfGraphics2D transforms unknown Paint into BufferedImage so when user is
zooming the Pdf file, it's an image zoom, pixelized, it's not very
elegant...
----- Original Message -----
From: Bill <mailto:[EMAIL PROTECTED]> Ensley
To: 'Post all your questions <mailto:[email protected]>
about iText here'
Sent: Wednesday, January 03, 2007 7:02 PM
Subject: Re: [iText-questions] PdfGraphics2D and specific Paint
There is no technical hurdle to this, but the trouble is at some point that
unknown paint needs to be converted into instructions for PDF.
I think that PdfGraphics2D does a fairly elegant job of handling unknown
paints already.
If you come up with something, please share it. If its good it will
probably make it into the distribution.
-Bill Ensley
Bear Printing
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of NCA
Sent: Wednesday, January 03, 2007 8:56 AM
To: Post all your questions about iText here
Subject: [iText-questions] PdfGraphics2D and specific Paint
Hello,
Is it possible to wrap a specific Paint in the PdfGraphics2D with a specific
class or function to draw a shape, as it is done for the GradientPaint ?
ex :
g2.setPaint ( new MyPaint () );
=>
private void setPaint(boolean invert, double xoffset, double yoffset,
boolean fill)
{
...
else if (paint instanceof GradientPaint)
{
...
}
...
else
{
// first search for a specific wraper
PaintWrapper wrapper = searchWrapper ( paint );
if ( wrapper != null )
wrapper.paint ( cb, paint );
else
{
// default, unchanged
}
}
}
Thanks, for your answer.
_____
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_____
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/