tlc wrote:
> I have a table where its cells background are partially transparent.  The
> cells' background are set using a CellEvent (see
> http://www.nabble.com/Different-transparency-for-cells-in-PdfPtable-td21511310.html).
>  
> However, there is a border drawn for the cells

No, there isn't!!!

> even when I set the
> borderWidth and border to 0. 

There is no border.

> How do I get rid of this border? 

You are drawing transparent rectangles.
These rectangles overlap.
I don't know if you know the Quality Street candy from MacIntosh.
These sweets are wrapped in transparent paper.
Let's say you take the sweets with strawberry. They have a red wrapping.
Now if you overlap two of those wrappings, you get a deeper red.

That's what you see in your table: NOT BORDERS, but a deeper blue,
because two transparent blue rectangles overlap.

Need proof? Change:
>         cb.rectangle(rect.getLeft(), rect.getBottom(), rect.getWidth(), rect
>             .getHeight());

to:
cb.rectangle(
        rect.getLeft(), rect.getBottom(),
        rect.getWidth() - 0.5f, rect.getHeight() - 0.5f);

There are of course, more elegant solutions.
I'd use a table event instead of a cell event to avoid having to draw
different rectangles.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to