Re: "non-detructive" line drawing?



Look at Gdk drawing contexts. This is where you set the color, fonts, and
the drawing mode (GdkFunction) used by all Gdk drawing API calls. GDK_INVERT
is most likely the function you want.

Best Regards,
Norman Black
Stony Brook Software

----- Original Message -----
From: "Phil Cummins" <cummins jamstec go jp>
To: <gtk-app-devel-list gnome org>
Sent: Wednesday, November 01, 2000 11:18 PM
Subject: "non-detructive" line drawing?



Hello,

  I'm developing an application using GtkPerl in which I
load a pixmap into the DrawingArea widget, and then use the
pointer to draw a polyline on top of it. But it is important that
I be able to erase, if desired, segments of the polyline. I
know from past (non-gtk) experience that a simple way to do this
is to do the drawing via a boolean exlusive-or of the pixel
values. Then to erase the line, all you have to do is re-draw it.
Can any one please tell me if there is a way to change
the line-drawing mode for the DrawingArea widget so that
it uses such an exclusive-or operation? Or is there another
way to erase polyline segments? Note that I want to avoid
having to re-draw the pixmap everytime an erase operation
occurs, as this would be too time-consuming.

   Thanks.
--
--
---------------------------------------------------------------------
Phil R Cummins                                 cummins jamstec go jp
Frontier Research for Subduction Dynamics  tel(i/d):81/0-468-67-3393
JAMSTEC, 2-15 Natsushima-cho               fax(i/d):81/0-468-67-3409
Yokosuka 237-0061, Japan

_______________________________________________
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]