Re: [gtk-list] how to change the color of a GdkGC



Jiang XU wrote:
> 
> I don't know why?
> 
> GdkGC *gc;
> GdkColor color1={0,0xff00,0x0909,0x,0909};
> 
> gc=gdk_gc_new(drawable);

  I don't have a lot of experience with GTK but maybe adding this will
help:

gdk_color_alloc(gtk_widget_get_colormap(widget), &color1);

> gdk_gc_set_foreground(gc,color1);
> gdk_draw_rectangle(drawable,gc,.....);

Leonardo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]