Effect masks vs. selections and "embedded" transparency masks

Dmitry Kazakov dimula73 at gmail.com
Fri Sep 4 22:31:44 CEST 2009


Hi again, All!

There are some more troubles. This time they are with effect masks.

The problem is: we simply CAN'T add any selection with a selection
tool or paint something with a freehand tool on ANY MASK.

The reason is we use explicit conversion of the node to KisLayer* type
in these tools.

kis_tool_freehand.cc:282

 if (!m_paintIncremental) {

        KisIndirectPaintingSupport* layer;
        if ((layer =
dynamic_cast<KisIndirectPaintingSupport*>(currentNode().data()))) {
            // Hack for the painting of single-layered layers using indirect
painting,
            // because the group layer would not have a correctly synched
cache (
            // because of an optimization that would happen, having this
layer as
            // projection).
            KisLayerSP l = layer->layer();
...

kis_selection_tool_helper.h:33

class KRITAUI_EXPORT KisSelectionToolHelper
{
public:

...

private:
    KisCanvas2* m_canvas;
    KisImageSP m_image;
    KisLayerSP m_layer;
    QString m_name;
};


I don't see any clear solution for this. And more than that, I'm afraid some

other tools can use the same conversion inside themselves.

The only solution i see is to derieve filter masks from
KisIndirectPaintingSupport and make some workaround with layer()
method...
Don't know really...

Do you have any ideas?

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


More information about the kimageshop mailing list