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

List:       kde-devel
Subject:    Re: QImage based renderer - design draft
From:       "Dirk Schönberger" <dirk.schoenberger () sz-online ! de>
Date:       2003-09-15 14:42:32
[Download RAW message or body]

Michael Thaler schreibt:

> Hello,
> 
> Please review the following design draft for a qimage based renderer for 
> kpaint. I would like to hear your opinion if this is the right way to go.
> 
> - Use a qimage based canvas instead of a qpixmap based one, because qimage 
> allows access to pixels, which is necessary for e.g. fill operations or 
> transparency
> - to draw the qimage on the screen, we can do the following:
> we compose the image out of e.g. 16 x 16 pixel sized tiles. Whenever one of 
> the t iles is modified, we set a bit in a bitarray and mark the tile
> as modified. This tile is then  copied to a 16 x 16 QPixmap on the
> xserver using KPixmapIO or  QImage::convertToPixmap. The QPixmap is
> then copied to the  screen using bitBlt. This should be quite fast and
> and also looks simple and nice to me.
> 
> Advantages:
> - we can manipulate pixels (read/write). This allows for flood fill,
> transparency effects and so on.
> - it is fast because the amount of data copied to the Xserver is not
> to big. It is also lightwight and not to hard to code and it does not
> need aditional stuff.
> - the zoomed mode should be much faster then now, since only the 16 x
> 16 tiles that are actually modified, has to be transformed. Right now
> the whole pixmap is transformed, even if only a single pixel is changed.
> 
> There are probably more advanced ways to do this, but this seems to me
> simple, lightwight and fast and is probably enough for a simple app
> like kpaint.
> 
> One question remains: what would you use to store the status of the tiles?
> QBitmap or QBitArray or a QByteArray or something else? Which is fastest?
> 
> Suggestions and comments are very welcome,
> Greetings,
> Michael
> 

Hi Michael,

you may google for a concept called "micro-tile array" or uta, which
implements a similar concept (as part of the libart render library)
Unfortunately this somehow conflicts with my rather static oriented view as
expressed in my KPainter, so that I am  not quite sure where to implement
it.

Regards
Dirk
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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