Adrian on Painters and Qt4

Boudewijn Rempt boud at valdyas.org
Tue Sep 19 11:11:27 CEST 2006


(I'm starting on this task now, so I'm picking up the thread again)

On Saturday 02 September 2006 12:16, Thomas Zander wrote:

> 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. :)

Yeah, Qt4 is Java with pointers in everything, especially design. I'm not wild 
about it, especially since it's not close enough for my Java 2D book to be 
useful.

> 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.

Yes, that's the way it's currently done in Krita, too, or next as makes no 
difference.

> 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.

Don't forget grids, guides and similar things that are neither annotations, 
nor tool things, nor document data. The problem is that sometimes you want to 
keep on showing something even when the tool that manipulates that is 
deactivated.

Maybe a solution is to make tool activation nestable, which we need anyway, 
but I'm not sure whether that's a good solution. I think I'd prefer to have a 
model where guides, grids and toggle things like that implement an interface,
implementations are collected in a list, and that's displayed in the paint 
event between the content and the annotations.

> 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.



-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060919/1dd793d5/attachment.pgp 


More information about the kimageshop mailing list