Footprint algorithms: in the stamp, or in the paintop?
cberger at cberger.net
Tue Mar 25 10:37:49 CET 2008
OK I think I understand what you want, and might have an idea that will make
all of us happy, with sharing code, and still keeping flexibility.
Low-level classes (KisStamp / KisBristles), manipulated using their physical
parameters (size, angle, bristles spacing, deformation etc...).
A Higher-level classe (KisStampManipulator (once again a proof of my suckiness
with names since KisStampManipulator can work with KisBristles too) ) that
takes sensors input ( pressure / current stroke lenght / ... ) and manipulate
the KisStamp / KisBristles to output a mask for the paintop.
That way all sort of KisStamp / KisBristles can be manipulated with
KisStampManipulator, and use will all sort of paintop, while paintop that
want to access the low level still can do it.
In fact, this is very similar to the design of the dynamic paint op
(KisStampManipulator is called KisDynamicShape).
But I also remember when I started the dynamic paint op, that Boudewijn
explicitely wanted to keep the more simple paint op, while providing the more
advanced dynamic option in a separated paintop, is it still true ? Or shall
we build dynamic option in KisStampManipulator ?
A possibility is to make KisStampManipulator an abstract interface, and
provides various implementation, one would be the default one, that
correspond to what we have in the "simple" paint op (where pressure affects
size / opacity). And an other one could be the fully dynamic one, where the
user selects what sensors affects what parameter (like in the dynamic
In the other threads, I have seen talk about what I call color source (either
plain color, generators, filtered content or clone). Well a concept of the
dynamic brush (again, sorry, but I have allways considered it to be a
laboratory rather than a final solution) is coloring sources, that follow the
same design as for stamps, and in the end, the color source and the stamp is
mixed together on the canvas.
The only things I don't see fiting in this is :
* natural media
* I also remembered that Boudewijn wanted to have bristles painting
On the other hand, what I spoke above doesn't make impossible for painting ops
to work to a lower level.
More information about the kimageshop