koffice/krita/image/recorder
LukasT.dev@gmail.com
lukast.dev at gmail.com
Tue Jan 26 08:22:47 CET 2010
On Tuesday 26 January 2010 00:39:21 Cyrille Berger wrote:
> Hello,
>
> I am a bit wondering why the node is set in the settings, especially since
> it leads some paintop to use the node that is on the settings, instead of
> the paint device define in KisPainter, which seems wrong to me. Also,
> keeping a pointer to the node in the settings lead to a danger that a node
> that is not used anymore keep staying in memory.
>
> I investigate a bit, and the only reason I found for having the node in
> KisPaintOpSettings was caused by the filter brush, that need to know the
> color space to create filter configurations. But I could not find a good
> reason for KisPaintOpSettings::node(), so I am tempted to suggest removing
> that one, and keeping setNode as a virtual function (or rename it
> nodeChanged). Unless someone has a good reason ?
Salut,
I use settings->node() for accessing paint device of the currently selected
layer. I remember that using painter()->device() used to do different things.
Sometimes it used to crash if I read and write from it .Especially if you were
using BUILD UP/WASH mode, weird things happened like you did have different
color in the accessor then you have seen on layer (probably because of the
BUILD UP/WASH mode)
I supposed that when we have node() in settings, I can access another layers.
E.g. I would like to add to the settings of the paintop layer selecting for
colour source.
Use case:
You want to use "sample input color" in spray in non-destructing way. You
select in the settings widget layer you want to use as source (or avoid this
and use layer below currently selected layer) to take colours from. And then
you spray around as mad man and ta daaa - masterpiece.
But you don't want to ruin your current layer. It can be workarounded by
copying the layer.
More information about the kimageshop
mailing list