Problem with the gc I use to draw



Hello ppl:
Problem with the gc I use to draw, it leaks to other widgets.
I have a Widget I use as a drawing area and 5 buttons I use to change
between drawing functions.
I am using these functions to draw on the Widget

gdk_gc_set_line_attributes(widget->style->white_gc, lineWidth,
GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND);
 gdk_draw_line(pixmap1, widget->style->white_gc, x, y, x, y);
and the respective one for rects.

and this function to refresh the drawing area:
gtk_widget_draw(widget, &update_rect);

The drawing goes fine but after I draw if I go to the buttons these get
painted(as if the color leaked) in the color of the white_gc or black_gc
I am using to draw. Why is this?
Any help is thanked for in advance.




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