On Sun, 22 Jun 2003, Adam McDaniel wrote:
> The whole point behind GetLineMetrics() is to figure out exactly how
> big the document is for the sake of the scrollbar, etc. Unfortunatly
> it does technically have to pre-render everything to get an accurate
> idea on the height of things.

Exactly.  But then there is no need for WriteLine() when we are doing the
initial CalculateHeight() once we've rendered what's in the viewport,
because all the calculations have already been done.  Right now, both
GetLineMetrics() and WriteLine() are called for every line in the document
when a new document is opened.

> A better way to optimize it is to somehow cache the data
> GetLineMetrics() builds so that when DrawParagraph() actually starts
> drawing to the screen, it doesn't have to re-calculate already
> rendered data.

I am not worried about the speed of actual writing to the screen.  I am
just worried about the speed of opening a new page.

Alex

--
Dr. Alexander R. Pruss  || e-mail: [EMAIL PROTECTED]
Philosophy Department   || online papers and home page:
Georgetown University   ||  www.georgetown.edu/faculty/ap85
Washington, DC 20057    ||
U.S.A.                  ||
-----------------------------------------------------------------------------
   "Philosophiam discimus non ut tantum sciamus, sed ut boni efficiamur."
       - Paul of Worczyn (1424)

_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to