[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Effect masks vs. selections and "embedded" transparency masks
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2009-09-04 20:31:44
Message-ID: ae32c1ef0909041331l74ae7271wdbcc5c1cac384bd1 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Hi again, All!<br><br>There are some more troubles. This time they are with effect \
masks.<br><br>The problem is: we simply CAN&#39;T add any selection with a \
selection<br>tool or paint something with a freehand tool on ANY MASK.<br> <br>The \
reason is we use explicit conversion of the node to KisLayer* type<br>in these \
tools.<br><br>kis_tool_freehand.cc:282<br><br>  if (!m_paintIncremental) {<br><br>    \
KisIndirectPaintingSupport* layer;<br>               if ((layer = \
dynamic_cast&lt;KisIndirectPaintingSupport*&gt;(currentNode().data()))) {<br>  // \
Hack for the painting of single-layered layers using indirect painting,<br>           \
// because the group layer would not have a correctly synched cache (<br>             \
// because of an optimization that would happen, having this layer as<br>  // \
projection).<br>                       KisLayerSP l = \
layer-&gt;layer();<br>...<br><br>kis_selection_tool_helper.h:33<br><br>class \
KRITAUI_EXPORT KisSelectionToolHelper<br>{<br>public:<br><br>...<br><br>private:<br>  \
KisCanvas2* m_canvas;<br>  KisImageSP m_image;<br>       KisLayerSP m_layer;<br>      \
QString m_name;<br>};<br><br><br>I don&#39;t see any clear solution for this. And \
more than that, I&#39;m afraid some <br>other tools can use the same conversion \
inside themselves.<br> <br>The only solution i see is to derieve filter masks \
from<br>KisIndirectPaintingSupport and make some workaround with \
layer()<br>method...<br>Don&#39;t know really...<br><br>Do you have any ideas?<br \
clear="all"><br>-- <br> Dmitry Kazakov<br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic