group layers design

Boudewijn Rempt boud at valdyas.org
Sat Dec 24 14:22:19 CET 2005


On Saturday 24 December 2005 12:00, Gábor Lehel wrote:
> Hi all,
> I've been thinking about how the group layers should be designed. The
> question is basically how much of the functionality to put into
> KisLayer, and how much into KisGroupLayer. At one extreme,
> QListViewItem has no concept of 'plain items' vs 'group items' --
> every item can have children, just not all actually do. That doesn't
> quite work in Krita's case, as a KisPaintLayer with child layers
> doesn't make much sense. 

Are you sure? How about adjustment layers -- they should be children of an 
paint layer, I think.

> KisLayer want to deal with child layers, you would have to
> dynamic_cast to KisGroupLayer, and the only possible way for a layer
> to have child layers would be by inheriting KisGroupLayer.

> There's the following issues I can think of at the moment:
> - Say someone wants to create a Very Weird Layer Type (VWLT), that has
> child layers, but does something new and funky with them, instead of
> just compositing them together. How do we make this possible?

The only way of doing that is having the layer export the capabilities
it has, so the visitors know which layer is applicable. On the other
hand, I'm fine with not being that flexible right now. Let's first get
experience with grouped layers, and then make it flexible for 2.0 when
we know what we are doing.

<... snip thorough thinking ...>

> There are probably more issues and options; if I saw the whole
> situation clearly I probably wouldn't be writing this mail but
> would've chosen one already.

I think two things are important at this point: get it done quickly,
otherwise we won't have time to finish the rest of the features & fix
all bugs, and make the code uncomplicated enough that reworking it later 
isn't a major chore. However, we need to be clear on whether adjustment layers
are part of the layer stack in a group, or are children of the paint layer.

I prefer the latter, because the former always confuses me when I try to
think about it.
	
-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20051224/152ee8cf/attachment.pgp


More information about the kimageshop mailing list