colors change.



Hello,
I'm using gtk to make a design of lines, rectangles and other polygons.
My question is why when I draw the objects, for example, lines and after
that
I draw the rectangles, the first line I was drawed changes its color to
the
rectangle's color? And so on with the other objects.

See here  some code to how I draw any, for example the rectangle:

...
    gdk_colormap_alloc_color(a->gdkcolormap, &vr[i].rcolor, TRUE, TRUE);
    gdk_gc_set_foreground(a->gdkgc, &vr[i].rcolor);
    gdk_gc_set_line_attributes(a->gdkgc,
                        vr[i].rgrosor,
                        GDK_LINE_SOLID,
                        GDK_CAP_BUTT,
                        GDK_JOIN_MITER);
    gdk_draw_rectangle(a->drawingarea->window, a->gdkgc, TRUE,
    			vr[i].rx,
			vr[i].ry,
			vr[i].ranchura,
			vr[i].raltura);
...

thanks in advance,

ana.




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