On Fri, 2003-04-04 at 09:01, Steve McClure wrote:

I don't know what happened with that reply, my sent box has the full
text of my reply.  Here it is again.

(script deleted)

Yes, that works fine, producing dark slate gray ovals.

I added print statements around the gc creation and setup and get the
same sort of results 

      # this is DarkSlateGray on a (255,255,255) color scale.  I
      # multiply by 255 to scale to the units of alloc, which are
      # 0-65535 for each (R,G,B) value
      color = cmap.alloc(49*255,79*255,79*255)
      print 'color: ', color

      gc = widget.get_parent_window().new_gc()
      print 'before:', gc.foreground
      gc.foreground = color
      print 'after:', gc.foreground

produces:
color:  <GdkColor (12495, 20145, 20145)>
before: <GdkColor (22680, 16385, 24376)>
after: <GdkColor (15488, 16409, 1)>
color:  <GdkColor (12495, 20145, 20145)>
before: <GdkColor (15488, 16409, 1)>
after: <GdkColor (15488, 16409, 1)>

So I guess that debugging method cannot be relied upon and that your
thought that I must not be using the right gc is correct.  Unfortunately
I have no idea how the color came to be blue.

Thanks for the help.

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