Chapter 4.2.2 Common Traits defines four traits (top-position,
bottom-position, left-position, right-position) which describes the
placement of areas within the nearest ancestor reference-area (or the
page-viewport-area). We don't use these trait but recreate the placement
of individual areas in the renderer (actually and effectively in each 
(!) renderer). I wondered a few times during the last month if we should
have the layout manager handle the calculation of the coordinates. This
has a few advantages:
- All layout is really in the layout managers.
- Each renderer really only paints the areas in the place it is told to.

The obvious disadvantage is the effort needed to write the code that
generates these traits in all layout managers.

The reason I'm bringing this up now is my attempt to implement table row
backgrounds where I don't manage to place the background areas in the
right places due to placement logic in the renderer(s). Of course, there
are work-arounds and I only have to fix AbstractRenderer in this case
but it doesn't feel right. There's already enough placement logic in the
PDFRenderer which needs to be duplicated in all other renderers. I can
also remember the synchronization effort when I wrote the original

I think it would also simplify the renderers itself, making it easier to
develop a new one, if we started using left-position and top-position
traits. The other two may be necessary as soon as there's more effort
towards implementing writing-modes.

Keiron responded to a similar question in 2002:[EMAIL PROTECTED]&by=thread&from=214823

I don't share his opinion on point 3 because whenever we have a change
in reference-orientation we also have a new reference-area which
establishes a new coordinate system. So I don't think it will be
complicated to calculate the right coordinates. But I may be wrong.


Jeremias Maerki

Reply via email to