[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Rendering (Was: Fwd: branches/work/kde4/kdelibs/kate/part)
From:       Christoph Cullmann <cullmann () babylon2k ! de>
Date:       2005-05-26 18:49:58
Message-ID: 200505262050.01412 () cullmann
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


hi,
just wanted to show up some design thoughts :)
perhaps useful for you hamish, or not, but just to share ideas ;)

atm, we have the layouting mixed between view and renderer, don't think this a good \
idea :) the renderer should do it all itself.

My proposed design for the renderer:

  the renderer gets the paintdevice to use, e.g. the kateviewinternal or the kprinter
  the renderer gets the dimensions, e.g. width(),height() of the internal view
  the renderer gets the startLine where to start to layout the text (maybe even \
startcol, too,  too allow perfect reuse with printing, where wrapped lines shouldn't \
be cut away if on the end  of page and no place for whole)
  the renderer will do this:
     - layout text for given size, holding the line ranges needed, which cache the \
                QTextLayouts like atm
     - will keep this layout up to date if lines change in best possible way, like \
                current kateviewinternal
     - provide the stuff needed to map cursor pos to text pos and backwards
     - give back info about shown lines and all

What would this win?
  - Complete painting would be seperate from the input and widget handling
  - Printing would be no problem at all and even use the same layouting algos, no \
need to do this wrapping and  all in three places

Would this concept be worth thinking about while doing the bidi stuff? as the \
renderer will need rewrite in all cases, perhaps this capsulation would make much \
stuff easier.

cu
Christoph

-- 
Christoph Cullmann
KDE Developer, kde.org Maintainance Team
http://www.babylon2k.de, cullmann@kde.org


[Attachment #5 (application/pgp-signature)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic