You can see the code snippet at the beginning of the thread. I only
change and reset the paint of the gr. context.


> The lines are indeed gray inside the gray...
> 
> I suspect it's something in your code where you forgot to reset the  
> color.
> 
> Leonard

Now I try a different approach. Since I don't understand the
AlphaComposite class, I try to manually create a 1x1 pixel image, read
the blended color I should use, and forget alpha in pdf output.

It doesn't work yet though, it returns black, instead of the gray I need:

Color getTrColor(Color bg, Color fg, int transp)
{
        BufferedImage image = new 
BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB);
        Graphics2D g2 = image.createGraphics();
        g2.setBackground(bg);
        g2.setPaint(new Color(fg.getRed(),fg.getGreen(),fg.getBlue(),transp));
        g2.fill(new Rectangle2D.Float(0,0,1,1));
        return new Color(image.getRGB(0, 0));
}


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

Reply via email to