Angus Leeming wrote:

> I haven't been following this thread very closely, but isn't the problem
> one of calculating the length of the document when it is first loaded?
> Thereafter, the scrollbar would change size only when the document was
> modified. (This could happen just by scrolling through a read-only
> document I guess as figures are loaded and therefore the graphics inset
> changes size.)
> 
> Alfredo, would it be expensive to do a one time, accurate calculation of
> the document height? If so, why? Would use of the nullpainter help?

It's not terribly expensive, a fullRebreak of the UG is a matter of about a
second on some fast computer (1.3.x does that on loading, and there is some
loading time where it just said "rebreaking document" or something). We
don't need the second drawing step, as all vertical  height can be computed
in the metrics phase.

The problem, as Asger pointed out, is to mantain this information
up-to-date. Think for instance of a change in evironment-depth, that may
affect several screens down of paragrahs. IMO, though, we can live with
'old data size', and only update the information when drawing on screen. I
may try to implement something like that this weekend.

Regards, Alfredo


Reply via email to