On 12 Jun 2009, at 13:23, Vincent Hennebert wrote:

Hi Vincent

I'm wondering whether it would not be equally feasible to have the
FlowLM check the total height of the block-boxes up to a point
(estimated). Do this after every call to childLM.getNextKnuthElements().
Then, if the total height exceeds the BPD for the current page, call
back to check if the next page has the same IPD (or the same amount of
columns). If so, then we happily continue, just as we do now. If not,
then we hand the list off to the PageBreaker, run it through a
PageBreakingAlgorithm to compute the page-breaks up to that point, add
the areas, and resume later, passing the LineBreakingAlgorithm an
updated LayoutContext corresponding to the next page.

While this is a good idea, it will imply more disruptive changes to the
codebase. I’d like to keep the necessary changes to a strict minimum.
Plus I’m not even sure yet that my idea will not lead to a dead end.

Your idea is not incompatible with mine, however. It’s an additional
step performing some optimization. We can always re-consider it once
I have some working code.

OK, I already played with it a bit last night, just to see whether I was not proposing the impossible, and it seems to be feasible. As you note, it will require some more invasive changes across more classes than simply the BreakingAlgorithm.

I'll set it aside for the moment, but will surely pick it back up once you have developed your approach a bit further.



Reply via email to