On Jul 2, 2008, at 10:03, Luca Furini wrote:

Hi Luca

On Mon, Jun 23, 2008 at 5:12 PM, Luca Furini <[EMAIL PROTECTED]> wrote:

If there is a block-container with both width and height set, its
position can be correctly controlled using top and left (and indeed
there are many testcases checking that) but bottom and right do not
have any visible effect.

I've solved the bug for simple situations, but the solution is not
nearly general enough to be committed.

The point is: right and bottom distances need to be respectively
translated into x- and y-offset at some time, and in doing this we
must know the ipd and bpd of the nearest ancestor reference area, as,
for example,
  x-offset = reference-bpd - object-bpd - right-distance

My first idea was to set the offsets at the LM level, when creating
areas, so that there would be no changes at all for the renderers, but
I failed to find a way to obtain the nearest ancestor reference area,
as areas have no parent pointer (and I couldn't even think of a nice
way to find the appropriate region reference ...).

I'm beginning to wonder...
If you have the area's own dimensions, and the complement properties (bottom-right), is that not enough?

For the renderer:
-> top = (bottom - area-bpd - borders - padding))
-> left = (right - area-bpd - borders - padding))

IIC, It is only this very simple translation that is missing somewhere.
Either all four values should be preserved in the area tree, or this computation needs to be done before that, so we get the two derived values for (top, left) instead of (0, 0)...

It seems so simple... Am I missing something?

(It's hot here, too! ;-))


Cheers

Andreas

Reply via email to