Status on generator layers? (boud?)

Boudewijn Rempt boud at valdyas.org
Tue Apr 1 08:06:39 CEST 2008


On Tuesday 01 April 2008, Matthew Woehlke wrote:
>
> > * I couldn't decide whether to adapt the current infrastructure for
> > filter dialogs (with the treeview), or fix up a modified version of the
> > filters listwidget for use in the dialog.
>
> Ok, that I don't have a suggestion for ;-).

That must be pretty unique :-) But no worries, I'll do something really simple 
for now with a combobox and adapt the dialog once Cyrille has fixed the 
adjustment layer/filter mask dialog to use the same system of bookmarked 
configurations.

Actually, and this may be a little confusing: generators are so similar to 
filters that I am re-using the KisFilterConfiguration class and the 
KisProcessingInformation class.

> I sure wish the UI worked (a bit hard to test without it :-) other than
> "yes, the code compiles"). A reference implementation would be nice,
> also. In fact, the solid color implementation would be nice, especially
> as on further thought I think it's more valuable than a basic noise
> generator (though that means you'll need to point me at the random
> function).

I got quite far yesterday. I only have a couple of things left to do:

* implement the dialog to select a generator and determine its settings
* implement a paintop to paint using generators
* implement drop-down box for the brushes and stuff toolbar to select a 
generator for painting and filling
* check the various visitors whether they work with generators or need to be 
adapted.

What I did was finish the generator layer (no unittest yet, so it'll probably 
not work correctly at first, but implementing a unittest that uses your 
generator could be a good first move for you when you start imlementing your 
generator), implement fillRect to use generators and adapt our tools to set 
have access at the current generator. All in all a productive evening.

Making a solid color generator out of the noise generator is pretty easy: just 
do something like:

KisFillPaint gc(dev);
fc.fillRect(); // with the right params, of course
gc.end();

and bob's your uncle :-)

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi


More information about the kimageshop mailing list