[pygtk] color setting?
John Finlay
finlay at moeraki.com
Thu Jul 20 06:01:13 WST 2006
Tobias Bengtsson wrote:
> Hi, I'm trying to draw an arc with a gray color using this code:
> color = gtk.gdk.color_parse('gray')
you need to allocate the color something like:
color = win.get_colormap().alloc_color(color)
> graygc = win.new_gc(background=color, foreground=color)
> win.draw_arc(graygc, True, self.x+w-5, self.y, 10, h, -90*64, 180*64)
>
> I've printed out the color and checked for correct values, but the arc
> get black.. what am I doing wrong?
John
More information about the pygtk
mailing list