impending doom - new layers structure

Casper Boemann cbr at boemann.dk
Wed Dec 21 13:12:07 CET 2005


Hi Krita devs

I'm currently working on a HUGE refactoring of Krita, affecting nearly every 
file. When I commit you should expect a lot of fallout.

Everything from saving,loading, merging anything that has to do with layers 
will probably not be working correctly or at all!

What will be working is images with one layer created with custom startup 
dialog. And basic painting onto that layer and filtering of that layer.

I hope that you wil all chip in and help get Krita back to normal as soon as 
possible.

Illisius will do the layerbox reenabling
BCoppens will do the embedding and saving/loading
Boud will do everything else (incl previewwidget)
I, boemann, will do everything else as well (incl. being standby for you 
almost 24/7)

The rest of you please help along. Let's try to make the commits come fast. 
Each fix should be fairly small.

Now some words about what is about to change.

We used to have KisLayer be a subclass of KisPaintDevice

This is no longer the case.

We now have KisLayer which is an abstract class. Subclasses are 
KisGroupLayer,KisPaintLayer,KisPartLayer and later on KisAdjustmentLayer.

KisGroupLayer contains a list of sublayers. And KisImage has a m_rootLayer 
which is a KisGroupLayer

KisPaintLayer owns (not inherits) a KisPaintDeviceImpl.

KisPartLayer will be for Bart to design

KisImage has two methods activeLayer() and activeDevice(). The activeLayer can 
be any of the above types. You wont know and you shouldn't. know. Use only to 
set layer properties like name, visibillity, lock, opacity, position and 
compositeops. The activeDevice (type KisPaintDeviceImplSP) can be 0 if the 
activeLayer is not a KisPaintLayer.

KisImage no longer has the notion of index for layers. Position is given by 
parentLayer and layerBelow. if layerBelow is 0 the layer is the last layer 
within the parent.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list