KisLayer::image() pointer problem

Dmitry Kazakov dimula73 at gmail.com
Tue May 17 13:28:12 CEST 2011


Hi, all!

Boud said recently that the KisLayer and other nodes must not store the link
to the KisImage. I'm totally agree with this point. We have a special
interface for this (KisNodeGraphListener), so there is no reason for it.

I think we can do this right now. KisLayer uses image for three reasons
only:
1) Sending setDirty() notifications.
2) Accessing global selection
3) Fetching colorspace of the image

How can it be solved:
1) KisNodeGraphListener is created exactly for this. So we can just add an
updateProjection() method there.
2) If we make global selection as a selection mask, then global selection
will be easily accessed by traversing parent() hierarchy. This method will
be very easy and useful for a user. Because currently, there is no meaning
in creating a selection mask inside a group layer. But if we use parent()
calls, then a selection mask, created inside a group layer works like a
global selection for child nodes. I think this is very good and useful from
both sides user and developer.
3) Completely the same as bullet 2). Just ask a parent. Colorspace of the
root group layer coicide with the colorspace of the image.

So what do you think of it?

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20110517/b8e5b083/attachment.htm 


More information about the kimageshop mailing list