New Brush Tool!

Boudewijn Rempt boud at calcifer.valdyas.org
Fri Dec 12 16:17:29 CET 2003


On Fri, 12 Dec 2003, Michael Thaler wrote:

> Hello,
>
> I just compiled Koffice CVS and I am really impressed by Krita's new
> brush tool. It is very nice! I'm reading the krita mailing list but I
> did not imagine that it works so nicely. You can even select various
> brushes and set the color. And even undo works, great! I think this is
> really a big step forward for Krita and KDE! I imagine that it is not
> very hard now to write line, circle, ellipse tools etc. using the
> brush-code? I really look forward to a usable Krita!

Well, you'd need to add circle, ellipse and line algorithms -- but those
aren't too hard.

>
> Just some remarks:
>
> on my computer, a 650 MHz PIII Notebook with 128 MB RAM and KDE 3.1.4,
> the brush-tool feels really slow. I remember the old brush-tool, it
> felt quicker.

No doubt about it -- it is usable on my old 500 Mhz Powerbook, for
entertainment, but not for real work :-). My kids rather liked the
previous version, where if you painted over paint, the colour faded out,
that was even more fun. That used OVER compositing.

The reason this tool is so slow is that I tried to implement the technique
laid out in http://www.levien.com/gimp/brush-arch.html -- basically every
spot of colour is a layer that is pasted into the image.

I should do: caching of the brush shape, cleverer compositing, drawing
a line between spots if the delta is to great, sub-pixel positioning,
spacing, show a custom cursor the shape of the brush, hotspot
positioning and user-selectable compositing strategy. And, of course,
the reason I started working on Krita: tablet support.

But the start is there...


> The undo is also strange. Is it possible that all the brush strokes
> are removed at once? They way it works now is strange.

But fun to look at! It had my wife rolling in the aisles when she saw it.
Seriously, it's not as I would wish it to be. The problem is that I
composite each discrete 'dab' with the main image, and the undo adaptor
remembers all the little dabs and rewinds/replays them. I had hoped
that KisPainter would coalesce the commands upon an endTransaction,
or that rewind/replay would be fast enough to fake undo-at-once.

> But I realize that this code is bleeding edge and it is great it works
> at all!

Thanks -- I'm hope I can improve it enough to give a semblance of usefulness
over the next week. Currently I'm investigating a scheme whereby I have a
rather bigger temporary layer that only bitBlt when the mouse lifts.


More information about the kimageshop mailing list