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

List:       kde-kimageshop
Subject:    Re: Effect masks vs. selections and "embedded" transparency masks
From:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2009-09-05 2:55:36
Message-ID: 478b087a0909041955w118ef5b1n2fb12f0fbcecc66d () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Fri, Sep 4, 2009 at 10:31 PM, Dmitry Kazakov <dimula73@gmail.com> wrote:

> 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.
>

Can you explain what you expect? When I select something on a transparency
mask e.g with retangular selection I can paint inside the selection with the
normal brush.
I don't see the problem.


> 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
>
> _______________________________________________
> kimageshop mailing list
> kimageshop@kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
>

[Attachment #5 (text/html)]

<div class="gmail_quote">On Fri, Sep 4, 2009 at 10:31 PM, Dmitry Kazakov <span \
dir="ltr">&lt;<a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> 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> </blockquote><div><br>Can you explain what you expect? \
When I select something on a transparency mask e.g with retangular selection I can \
paint inside the selection with the normal brush.<br>I don&#39;t see the problem.<br> \
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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> <font color="#888888">
Dmitry Kazakov<br>
</font><br>_______________________________________________<br>
kimageshop mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop" \
target="_blank">https://mail.kde.org/mailman/listinfo/kimageshop</a><br> \
<br></blockquote></div><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