Sry right i forgot to post this line, but i already had it. Its not
working, but i think maybe i am misunderstanding sth. i think i am only
doing this for images but i want the background color of the cell to have
different alpha values. maybe this isnt even possible?!

What i want to do ist to have one color e.g. Color.Green and depending of a
calculated value between 0-100% for each cell i want the cell to be lighter
green or darker green. i thought i could to this by making the
backgroundcolor transparent. Am i misunderstanding sth and if so does
anybody have a hint how i could solve my problem?

thx



2013/10/12 iText mailing list [via iText - General] <
ml-node+s2136553n4659333...@n4.nabble.com>

> On 10/12/2013 12:59 PM, Noisebreath wrote:
> > Hi
> >
> > im trying to set an alpha for the transparency of a color (background
> color
> > of a table cell). Using Color java.awt with alpha value is not working
>
> You were very close to the solution. There was only one line missing.
> I've added it to your snippet below:
>
> > public void cellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[]
> > canvases) {
> > PdfContentByte cb = canvases[PdfPTable.BACKGROUNDCANVAS];
> >              cb.saveState();
> >              PdfGState pdfGState = new PdfGState();
> >              pdfGState.setFillOpacity(color.getAlpha());
> cb.setGState(pdfGState);
> >              cb.setColorFill(color);
> >              cb.fill();
> >              cb.restoreState();
> > }
> >
> > }
>
>
> ------------------------------------------------------------------------------
>
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> iText-questions mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4659333&i=0>
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://itext-general.2136553.n4.nabble.com/Make-Cell-Background-color-transparent-tp4659332p4659333.html
>  To unsubscribe from Make Cell Background color transparent, click 
> here<http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4659332&code=ZmFyYXouZmFsbGFoaUBnb29nbGVtYWlsLmNvbXw0NjU5MzMyfC0xODk0MTA1OTE4>
> .
> NAML<http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Mit freundlichen Grüßen
Faraz Fallahi




--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Make-Cell-Background-color-transparent-tp4659332p4659334.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to