paintops

Schleimer, Ben bensch128 at yahoo.com
Wed May 30 01:13:17 CEST 2007


Hey Cyrille,

> > What do you think?
> that the offset and other clone options are also out of place in 
> KisPaintInformation :)

Ok...

> 
> KisPaintInformation should be limited to dynamic information that changes for 
> each strokes. And offset/healing are "static" options (it can be changed 
> between each strokes, but then the KisPaintOp is recreated between two 
> strokes anyway), and one can imagine that the pressure could somehow affect 
> the offset (anyway, is it usefull ?) but the base offset remains constant 
> during the stroke.

You are correct that there are static options and dynamic options during the stroke operation.
I was hoping to give a more flexible viewpoint on the whole interaction between the tool and
paintop. Since krita is extendible for new tools AND new paintops, it seems reasonable to assume
that plugin developers will want to specify more KisPaintInfo options then is currently
implemented, both static and dynamic. I can imagine properties that the tool changes during the
stroke like color...

> 
> > PS. an alternative is to for the tool send an inherited class of
> > KisPaintInfo and have the paintOp use dynamic_cast<> to try to get the
> > correct type.
> >
> > PSPS. Another alternative is for the tool to populate the properties of the
> > paintOp directly instead of going through KisPainter. This means the tool
> > needs to do dynamic_cast on the paintOp.
> 
> The real alternative is to have offset/healing in a KisConfigurationPaintOp. 

What? confused here...

> And getting ride of the duplicate tool is really something which should do in 
> 2.0. The main problem was to be able to set the offset, as a KisPaintOp can't 
> receive user interaction before the user starts painting. And then the 
> healing and perspective option can be moved to the paintop's config widget 
> and they should have been send if I had understood better that part of Krita 
> at that time :)

I guess the correct behavior is to set static options in the paintOp during the press event.

After looking at KisToolBrush in krita 1.6, it seems more reasonable for the tool to upcast the
paintOp, set the static and dynamic paint options, set the paintOp inside the painter and then
call the painter's drawLine, paintAt, etc methods without passing any paint info through the
paint.
Then the painter is only resposible for calling the paintop at the correct position.








More information about the kimageshop mailing list