GdkColor quiestion.




Hi!
I have problems with GdkColor. The goal is to draw a red line. So, I
looked at the sources of Gdk/Gtk and conceived this piece:

	GdkGC *draw;
	GdkColor drawColor;

	draw = gdk_gc_new(widget->window);
	gdk_gc_copy(drawCross,widget->style->white_gc);
        drawCrossColor.red = 255;
        drawCrossColor.green = 0;
        drawCrossColor.blue = 0;
	gdk_gc_set_foreground(drawCross,&drawCrossColor);

	gdk_draw_line(widget->window,
	  	      draw,
		      x,10,
		      x,widget->allocation.height-10);

But. This thing still draws a white line. Can anyone explain what is wrong
here? There is another question: what's the meaning of the "pixel" field
in the GdkColor structure? The sources are very blurry on that.

Thanks much,
		Sergei
		
		



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