Abdelrazak Younes ha scritto:
We don't need a *perfect* scrolling behaviour, just a sensible one.
I agree we may accept a non-perfect scrolling right after having opened
a document, or having made great changes. But, IMHO, after a while
it would be better to have a precise behaviour, while reading you doc,
searching for places to improve/change and editing.
A simple cache of paragraph height would do the job and I wish Tommaso had followed this direction instead.
Well, this is actually what I did, except I'm caching also the width,
the ascent and the descent, along with the height. Thought they could
have turned out to be useful, someday.
Basically, first I added a vector of heights, but immediately after I
realized it was sufficient to reuse the ParagraphMetrics type, with
the rows_ field cleared. So, the par_metrics_[] vector contains width,
height, asc and desc of all *outer* paragraphs in the document, while
only visible ones have the .rows() collection filled in.

Well, it is not really a cache in the "cache" sense...

   T.

Reply via email to