On 20 Jan 2009, at 19:28, Andreas Delmelle wrote:

<snip />
I think that taking it into account for both (offset and width) is the correct way to implement it: the block-container should be offset by 77pt from the page's edge (which is the same as the region- body's edge here).

... and then the inner block should be offset another 77pt from the block-container's start-edge (= 154pt from the page's edge), unless you would reset start-indent to 0pt on the block.


The nested block does get the correct width (the cyan background should be covered by magenta at the end-edge).

So this is wrong. The nested block should be another 77pt less wide than it currently is.



I'll debug it to check, but seems like a trivial fix at first glance.

I noticed that BlockContainerLayoutManager.getNextKnuthElementsAbsolute() assumes zero for both the X- and Y-offset of the content-rectangle. Not sure if this is intended, or was a slight oversight. For a quick-fix, naively copying the code for computing those offsets from getNextKnuthElements() and replacing the zero arguments passed to updateRelDims() (both occurrences) seems to produce the correct result for this case.

A definitive fix should obviously try to avoid the code duplication, perhaps by computing those offsets in getNextKnuthElements() /before/ the conditional branching to getNextKnuthElementsAbsolute().


Cheers

Andreas

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

Reply via email to