New feature for review

LukasT.dev@gmail.com lukast.dev at gmail.com
Sun Nov 1 23:33:03 CET 2009


On Tuesday 27 October 2009 23:06:33 you wrote:
> Hello,
> 
> I added new feature to freehand and paintops. Scroll mouse button change
>  the size of the paintop.
> 
> Here is the patch for review:
> http://lukast.mediablog.sk/patches/0001-Feature-Scroll-wheel-changes-the-si
> ze- of-the-spray.patch
> 
> I'm sorry for Sven, it is git format :/
> 
> What I'm doing:
> I reimplement the event from KoTool in KisTool and then in Freehand tool.
> In freehand tool I pass the event to the setting object of the paintop if
>  no key modifiers are present (if CTRL is down, Zoom tool is in action)
>  Paintop setting object changes the GUI object.
> 
> The freehand code also handle the update of the brush outline.
> There has to be some check code added but I was lazy, coz you can discard
>  this patch and I don't want to waste my time :)
> 
> You can't recognize the size change without the brush outline as user. You
> would have to check the GUI, now the paintop settings GUI is not detachable
>  :( so it is quite cumbersome.
> 
> I would like t support mypaint way of changing the brush size. That means F
> and G if I remember correctly. In the nicest case it should be
>  configurable, but I need guidance on this (Oslo?).
> 
> Also for future:
> Paintop settings GUI can be used for the action. E.g. you can select in GUI
> what will be changed by your scroll event and how much.
> E.g. you can map the wheel event to scale of the spray or to changing the
> diameter. Or particle count.
> 
> Maybe some other modifier can be used for two modes (e.g. Shift is free
>  now, Alt is for panning ).
> 
> Review please!
> 
> Lukas
> 
> http://lukast.mediablog.sk/patches/0001-Feature-Scroll-wheel-changes-the-si
> ze- of-the-spray.patch
> 

Basically I want to be able to change the size of the brush quickly. So I 
implemented the wishlist [2] a bit and now we have two possibilities. The old 
patch is not applicable at the trunk anymore :/ I hoped you to review little 
faster ;( . 

Here is the new patch [1] and now when you press Shift and drag with mouse 
left/right the spray brush changes it's size. Change the cursor mode to _brush 
outline_ to see changes.

If you would move up/down, different behaviour can be coded, like the wish list 
is saying e.g. setting the softness in default paintop. Better brush outline 
preview should be available but that is long-time aim. 

The patch has bug -- it moves with the mouse position. You probably want to 
change the size and not move with the mouse on the canvas. 

Please review! I want to commit and develop in trunk if possible.

[1] http://lukast.mediablog.sk/patches/wishlist-change-brush-size-with-shift-
left-click.patch
[2] https://bugs.kde.org/show_bug.cgi?id=145777


More information about the kimageshop mailing list