a few issues with paintops : bristle and speed

Cyrille Berger cberger at cberger.net
Mon Mar 12 17:45:30 CET 2007


Hi,

I have made some progress with the dynamic paintop, it's far to be finish or 
in a near usuable state, but now I have two problems, and I want your opinion 
before I can finish the foundation of the dynamic paintop:

== "bristles paintop" ==
Currently our paintop are what I call "stamp based", we generate a paint 
device "offline" and then we "bit blt" it on the paint device. If you want to 
see what I mean by bristles, have a look to the presentation of the last 
version of painter, especially the video :
http://www.corel.com/servlet/ContentServer/us/en/Product/1166553941991 (for 
those who oppose the adobe flash player, you can install the gnash player). 

I can think of two ways to add "bristles" to krita:
- with a bristle tool, in fact each bristle can be associated with one 
paintop, the drawback is that you only have "bristles" for a freehand-like 
tool (no drawing circles or lines with it), on the other hand I don't think 
that it makes really senses to use them with something else, and the 
advantage is that you can use any paintop at your disposal (like duplicate or 
smudge)
- or it can be done like in the unfinished cpaint paintop, at each call to the 
paint op, the bristles draw from its previous location to the new one, I do 
find a little bit odd, and also the cpaint paintop doesn't take the composite 
op into account

== speed sensors ==
One of the component of dynamic paintop are sensors, it's just the name I gave 
to pressure, tilt, etc.. And one of the sensor I would like to add is the 
speed of the pointer, unfortunately it's not as easy as it seems (API wise). 
As, the paintop is called by functions in KisPainter, and it received a 
KisPaintInformation, so the mouse speed should be a field of 
KisPaintInformation, but I don't find it is a good idea to add the speed of 
the mouse as a parameter to KisPainter::drawLine. What do you think ? Any 
other idea ?


PS: It's not that much related, but I think the KisPainter API should use more 
QPointF than currently, all those functions with a dozen parameters looks 
really ugly.

-- 
Cyrille Berger


More information about the kimageshop mailing list