Krita UI and tool interaction

Patrick Julien freak at codepimps.org
Mon Oct 13 10:47:50 CEST 2003


On October 12, 2003 03:43 pm, Boudewijn Rempt wrote:
> On Sunday 12 October 2003 17:49, Patrick Julien wrote:
> > Why?  The same code appeared over and over again in plugins, not only,
> > but the idea of centralizing in KisPainter doesn't actually prevent you
> > from actually what you are talking about...
>
> Well, a paint tool takes a mask, subsamples it and then asks the painter to
> composite the result with the existing layer data. A smear brush takes the
> existing data and applies an algorithm to it. And so on; advanced tools use
> the existing data and their specific algorithms to achieve a certain
> result, which is then composited with the existing data.

Yes, again, KisPainter should hold primitives, not the actually complex 
operations that would require a KisPainter operation to call other members of 
itself over and over again.

>
> > > -- but who should get the brush shape,
> > > the pattern, the colour? The tool, or the painter.
> >
> > I'm sorry, I'm not sure what you're asking me here.
>
> Well, I've got what's technically called a pen tool -- non-subsampled, hard
> pixel painting. This can be done in various thicknesses, with various
> colour, with various brush masks, even. Did you intend for the KisPainter
> to get that data from KisView, or for the tool to be notified of changes in
> those aspects, and to call KisPainter with brush shape, colour, gradient
> etc.?

Hmm, isn't this all done using KisToolInterface?  I believe that KisView uses 
it's current tool to reset those values when they change.

>
> > > Finally -- where do the tools get their icons from? For the life of me,
> > > I cannot figure that out...
> >
> > It's in there, it's when creating a KAction.
>
> I still cannot find that code -- but I'll look again. No doubt I'll find
> it...

Grepping for KAction should help you here, also don't forget about the XML GUI 
stuff.



More information about the kimageshop mailing list