I'd like to build an application that uses pygtk to display
graphs. However, I'm having some problems using xoring to display
lines. It doesn't seem to display anything at all (whereas a regular
gc does).  As you can imagine, it's very difficult to build an
application where you can't toggle dislpays without xor :)

  To draw a line with xor, I use the following code:

# self is an object derived from gtk.GtkDrawingArea
self.colormap = self.get_colormap ()
win = self.get_window ()
self.xor_gc = win.new_gc (foreground=self.colormap.alloc ('black'), function=GDK.XOR, 
line_width=3)

self.draw_line (self.xor_gc, x, y, x + self.xaxis, y)

  ...but I can't seem to get anything. I also can't find any examples
that do any XOR plotting. I did find a program called Plotter but it
doesn't run under 0.6.8 and I don't feel like solving that problem
first just to see if I can solve the second.

  Also, is it safe to rely on pygtk drawing primitives? Since they
aren't documented, perhaps they're not very stable/reliable?

            Regards,

                 -- Mike

-- 
Michael Gilfix
[EMAIL PROTECTED]

Attachment: msg03603/pgp00000.pgp
Description: PGP signature

Reply via email to