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

List:       kde-kimageshop
Subject:    Re: Krita UI and tool interaction
From:       Patrick Julien <freak () codepimps ! org>
Date:       2003-10-13 13:47:50
[Download RAW message or body]

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.

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