That's the way to do it but not on Graphic. Graphic can only do simple things that don't rely on PdfWriter.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, October 04, 2005 3:17 PM > To: [email protected] > Subject: [iText-questions] Setting the PdfGState of a Graphic object > > > Hi All, > I tried to set the PdfGState of a Graphic object with > following code > > PdfGState state = new PdfGState(); > state.setBlendMode(PdfGState.BM_MULTIPLY); > state.setFillOpacity(0.8f); > g.setGState(state); > > to change the blending mode to multiply with opacity set to > 0.8f. I am trying to render a transparent polygon onto a > Graphic created with > Graphic g = new Graphic(); > However, I just get a null pointer exception throws inside of > PdfContentByte as > > Exception in thread "main" java.lang.NullPointerException > at > com.lowagie.text.pdf.PdfContentByte.setGState(PdfContentByte.j > ava:2647) > ......... > Anyone have any ideas as to what I am doing wrong. I don't > even know if this is the correct way to get transparent > shapes or not :-/ > Regards, > William Leeson > Software Development > > PILZ Ireland Industrial Automation, > Business & Technology Park, Model Farm Road, Cork, Ireland. > Telephone +353 (021) 4804-982, Fax +353 (021) 4804-994 > E-Mail: mailto:[EMAIL PROTECTED], Internet: http://www.pilz.ie > > This email is intended solely for the use of the named > addressee(s). Any unauthorised disclosure, copying or > distribution of the confidential information contained > therein, or the taking of any action based on it, is > prohibited. The sender disclaims any liability for the > integrity of this email. Legally binding declarations must be > in written form. > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
