Re: Rubber-band selection effect



Hi, 

You just have to copy the pixmap on mouse click signal and each time
"motion-notify-event" is called, you redraw the original pixmap and then
the rectangle (gdk_draw_rectangle()). Take care of hint flag for
motion-notify-event (have a look in gtk+ online doc)...

Sincerly,
FB

Joe Piskor a écrit :

Hi all -
        I would like to identify a rectangular area on a GTkPixmap that I am
displaying in a viewport. I'd like to drag a rectangle over the pixmap and
retrieve the coordinates (offsets) of the box corners. I can get them with
single mouse clicks within the viewport area (defining top-left and
bottom-right) but I'd really prefer the visual feedback. Soething like the
Gimp's marching ants would be exceptional, but for now a simple rubber-band
rectangle would be sufficient.
        I'd appreciate any pointers to shove me in the right direction; I've pored
over my FM's to no avail. Any help is appreciated.

Thanks...

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]