kis_canvas and widgets

Boudewijn Rempt boud at valdyas.org
Thu Mar 24 20:03:18 CET 2005


On Thursday 24 March 2005 19:50, Michael Thaler wrote:
> Hello,
>
> I was thinking about improving the crop tool a little bit. Actually it
> would be very nice to add handles like in gimp to resize the area to crop.
> The easiest way would probably be to paint a widget on the kis_canvas. Now
> I have to questions;
>
> - is there a function to get a pointer to the kis_canvas that can be used
> as a parent widget for my widget?
>
> - is it at all possible to paint regions of a widget transparent? I thought
> about drawing lines and handles, but the background of the widget must of
> course be transparent, so that you see the actual image.
>
> Some hints how to do this would be really nice,

Well... The reason I didn't do this was because I didn't have a clue, 
either :-). Anyway, with Qt as it stands you cannot have semi-transparent 
widgets, and besides, I guess that trying to superimpose widgets on the 
canvas widget would be the wrong way to go. 

I guess -- but I haven't looked at other applications, that those applications
have a list of handles and their locations; that they check whether mouse 
events occur in the location of a handle and act accordingly, and that they 
draw the handles and lines on the canvas pane same as the crop tool does at 
the moment. That's the way QCanvas works, I think.

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.

As for me, I'm really curious to see what it'll be in the end, because I want 
to learn how these things are done :-).

-- 
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/ca879a6c/attachment.pgp


More information about the kimageshop mailing list