Adrian on Painters and Qt4

Thomas Zander zander at kde.org
Sat Sep 2 12:16:29 CEST 2006


On Saturday 2 September 2006 10:30, Boudewijn Rempt wrote:
> We need three planes:
>
> * image (including flake layers)
> * visualisation (selections, masks, wetness, grids)
> * maniplation plane (icons, rubber bands, vectors, control nodes,
> annotations)
>
> If you want to add icons and bands and so, then maybe we should use
> QGraphicsView  for the manipulation plane. I'm also not sure at the
> moment what the rest of the KOffice apps will do -- they surely have
> the same requirements for the manupilation plane and the same
> limitation that we can only paint in the paintEvent.

The Qt4 painting engine takes a little getting used to, I can imagine. I 
never used anything else (since it matches Java and other toolkits 
closely) so sorry for stating things that may not be obvious at all. :)

The 'manipulation' plane in bouds list above is what flake supplies in the 
paint method of tools. Each tool can draw anything it likes on the canvas 
thats specific for its goals. Still all being done in the paint event.

All the requirements I read from Cyrille are quite easy to implement using 
that technique and IMOHO pretty well structured as well.

Basically; flake allows a couple of ways to do what you want.
1) at the bottom we have the real content. Layers + shapes etc.
2) Drawn on top of that are annotations for shapes. Non 
printable 'things'.
3) Drawn on top of that are whatever the current tool wants to paint.

1 is probaby obvious.
2 are things like a text shape painting a '+' at bottom right stating 
there is text not visible. It can be an image annotation showing 
helperlines. Basically anything on screen that is painted at all times, 
except when being printed.
3 is everything else. You want to have extra handles on a grid? The 
grid-manipulation tool draws that.  Same with selection and all the rest 
of the things you want to draw.

Hope that clears up some things.
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060902/bb7671d1/attachment.pgp 


More information about the kimageshop mailing list