kis_canvas and widgets

Boudewijn Rempt boud at valdyas.org
Thu Mar 24 22:00:17 CET 2005


On Thursday 24 March 2005 21:48, Michael Thaler wrote:
> On Thursday 24 March 2005 20:03, Boudewijn Rempt wrote:
> > This sounds a bit like what Casper was writing about the other day for
> > the transform tool; it would be nice to coordinate. Maybe you two can
> > share some code.
>
> Unfortunately there is no code to share. I have no clue how to actually do
> this. In principle one can certainly paint the handles with qpainter and
> just redraw the whole thing if the user presses the left mouse button and
> moves the mouse, in the same way the line drawing tool draws its lines. But
> this sounds really ugly to me.
>
> A qwidget would have the advantage that it does all the mouse handling and
> repainting stuff on its own. In kolourpaint you can resize selected regions
> with handles. I tried to find the relevant code in colorpaint, but I
> couldn't so far.

Try kpview.cpp, around line 1289, where it says

    //
    // Draw selection border
    //


-- 
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: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20050324/c4a5d2f6/attachment.pgp


More information about the kimageshop mailing list