I'm trying to use the drawing area with pygtk 0.6.8.  I want plot data
using different colors based on the initial color specified in an rc
file.
============
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: <GdkColor (0, 0, 60856)>
print newC: <GdkColor (0, 0, 61856)>
print newgc.foreground: <GdkColor (0, 0, 1)>

even if I specifically
newgc.foreground = newC
the print newgc.forground returns the same thing.

I can draw no problem but obviously only in the original color and blue.

Can someone point out what I'm doing wrong here?
Thanks,
-- 
Steve McClure <[EMAIL PROTECTED]>
Racemi, Inc.

Attachment: 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/

Reply via email to