Some progress....


  John> I am having trouble setting the color, and cannot figure out how to
  John> get a GdkGC.  description.py says "GdkGC's are created with the
  John> GdkWindow.new_gc method" but I do not know what to make of this since when
  John> I do dir(gtk.GtkWindow) I do not see anything about new_gc.


I find that I can draw in color if I do, for example,

      gw = widget.get_parent_window()
      cmap = widget.get_colormap()
      color = cmap.alloc("#FF9999")
      gc = gw.new_gc()
      gc.foreground = color
      widget.draw_arc(gc,
                      fill, x, y,
                      r1, r2,
                      0,360*64)
      time.sleep(.001)
      return TRUE

But I am not having trouble with an RGB

  color = cmap.alloc(0.1,0.2,0.4)

or 

  color = cmap.alloc(100,300,1000)

both result in back arcs.  So if someone could advise me further, I
would be much obliged.

Thanks!
JDH

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to