how to change the color of a GdkGC



I try to draw things on the screen, so I need to using GDK drawing
function, such as gdk_draw_line(...).
So that, I need to setup some specific GdkGC.

I tried the following codes, but it doesn't work, which means it doesn't
draw a rectangle with the specific color, instead, it draws with black
color.

I don't know why?

GdkGC *gc;
GdkColor color1={0,0xff00,0x0909,0x,0909};

gc=gdk_gc_new(drawable);
gdk_gc_set_foreground(gc,color1);
gdk_draw_rectangle(drawable,gc,.....);






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