On Fri, 2003-04-04 at 07:12, John Hunter wrote: > >>>>> "Steve" == Steve McClure <[EMAIL PROTECTED]> writes: > > Steve> I can draw no problem but obviously only in the original > Steve> color and blue. > > I generally just set the foreground attribute, and draw away > > gc.foreground = newC > da.draw_lines(newgc, zip(xt,yt)) > > What is your drawing command? I assume you are passing the newgc into > the draw command. It might help to post a complete script which > replicates your problem.
That's probably not practical, but I am using the new gc in the draw_line and draw_point commands. Note the print output of the gc indicates the new color is blue and indeed it is. You can see from the print output that the gc creation isn't working as I expected even though the color allocation does. Or am I misreading the output from the print statements? >gc = graph.get_style().fg_gc[gtk.STATE_NORMAL] # the graph widget > #foreground is what is specified in the rc file > prevC = gc.foreground > #r = prevC.red + 1000 > #g = prevC.green + 1000 > b = prevC.blue + 1000 > newC = graph.get_colormap().alloc(r, g, b) > newgc = graph.get_window().new_gc(background = > gc.background, foreground = newC) > ============ > some debug prints show: > print prevC.foreground: <GdkColor (0, 0, 60856)> > print newC: <GdkColor (0, 0, 61856)> > print newgc.foreground: <GdkColor (0, 0, 1)> > > John Hunter > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Steve McClure <[EMAIL PROTECTED]> Racemi, Inc.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
