How does krita render tiles to the screen?
Michael Thaler
michael.thaler at physik.tu-muenchen.de
Fri Oct 10 21:35:34 CEST 2003
Hello,
I was looking at kritas tile/rendering. I think basically it works
like this:
- the pixel data is stored inside a 64x64 pixel tile. The stile also
stores some more information like its current status etc. The tiles
can also make a copy of themselves and they can also swap themselves
(but I am not exactly sure what that means. I guess they make a copy
of themselves and when the tile is modified, the swapped version can
be used for undo? Is that right?). Then there is also some cache stuff
which is not used?
- Then there are the kisTileMgr and kisTileMediator classes. They
manage the stiles, set there status to clean/dirty, valid/invalid
etc. They can also delete tiles, add tiles etc. They can also return
the number of the tile that contains a specific pixel etc. But I did
not really understand the difference between the two classes. It looks
like they do pretty much the same. Can you please briefly explain me
the difference.
- Then there is the higer level kispaint_device which is used by
kispainter to draw something.
- kispainter does the actual drawing options.
I did not understand all the details, but in principle I think I
understand how the above mentioned classes work.
I also have to look at kislayer and kisimage again and see what they are
exactly doing. kisimage probably provides some methods to load/save an
image and kisimage is build out of several kislayers.
But I still don't know how the changed (dirty) tiles are rendered to
the screen (e.g. a qwidget). Can you please tell me where I can find
this code?
Cheers,
Michael
More information about the kimageshop
mailing list