Tool overlay and cursor shapes

LukasT.dev@gmail.com lukast.dev at gmail.com
Fri Sep 18 00:19:53 CEST 2009


On Wednesday 16 September 2009 19:07:07 enki wrote:
> > This patch is already in trunk for week or so. Any response?
> > I prefer XOR and B&W solution. Maybe also black outline and current color
> > inside, but this will require to change paintop's settings object so that
> > every change of the color is known to settings object.
> 
> 1.XOR is the one I like the most, it looks good and is precise in any case.
> 2.Color outline looks much better than I though, but there are still
> cases where it cause problems.When outline is the only cursor type:
> - you can lose your cursor on big surfaces of the same color (it's not
> good to be an adept of Fauvism these days :p).
> - it's harder to extend that big surface (for example, adding an
> irregular 3 pixels border around it).
> 3.B&W is the one I like the less. It doesn't look like it is an overlay,
> probably because the outside line is not transparent enough.
> 

We discussed the XOR solution wins as temporary solution for 2.1.
XOR has hidden problem but it is solved when XORing rgb channel with 0x80 . 
This is the solution that GIMP uses. 

Anyway I had mission to add setupQPainter method to the KisTool but I changed 
it.

setupQPainter is not enough if we want to change the outline in the future.
I wrote method paintToolOutline which takes painter, path and mode as 
argument.

So this method can paint twice -- I added also mode B&W and this mode
needs to paint also. Just setup the painter is not enough I think.

Known issues with patch:
Composition mode is RasterOp_SourceXorDestination which disables anti-
aliasing. So the path is not anti-aliased.

I added also BW_MODE. It has different problem. It uses 3px wide line so the 
update rect for canvas has different size then just 1px wide line and is not 
updated correctly for now.

I did the previous b&w patch wrong, I painted two 3px wide lines in the same 
place. Now I do it correctly and it looks nicer. 

Check it out. Just change line paintToolOutline(&gc,path); to 
paintToolOutline(&gc,path,BW_MODE);

So can I start to patch the svn?

[1] http://lukast.mediablog.sk/patches/0001-Tool-outline-with-
RasterOp_XOR.patch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090918/fc42e37d/attachment.htm 


More information about the kimageshop mailing list