Hi all,

I'm still slogging away with tables, trying to get eliminate border
drawing errors. I think I've made some progress, both in the table and
in the rendering code.

I finally discovered why the background rectangles were hanging out a
pixel or so beyond the borders (at least in PDF). When we want to draw a
filled rectangle, we are using the PDF operator which both fills and
strokes the path. Since there is no way to set the stroke width to 0 (0
means at least 1 device pixel, according to my admittedly ancient PDF
bible), this is drawing a pixel more than the actual size of the
rectangle we are filling. The solution is to use the fill only operator.

In order to reduce the risk of breaking other renderers or other addRect
users, I added a new addFilledRect method which is now used to draw
padding and also borders. PDFRenderer implements this by using the fill
only operator. The base class implements it by calling the existing
addRect method using the same color for fill and stroke.

I'm actually not convinced we need the combined "fill and stroke"
addRect method, especially since it has no parameter for specifying the
stroke width. Any comment from other non-PDF renderer experts?

I also am "experimenting" with drawing borders using addFilledRect
instead of addLine. The problem with addLine in PDF is that it centers
the stroke on the specified path, thus sometimes leading to pixel errors
with respect to the background or other border lines. The only kind of
border-style which the PDF line operator could really help us with is
"dashed" (maybe dot, if we use really small dashes), and we're not doing
them yet anyway. If anyone else has a better way to eliminate the
potential pixel errors using stroke, please have at it.

At least for now, I finally have tables which are completely "clean"!

Regards,
Karen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to