Drawing area color weirdness help?
- From: "Andrew P. Lentvorski" <andrewl deliverator io com>
- To: gtk-list redhat com
- Subject: Drawing area color weirdness help?
- Date: Sun, 10 Jan 1999 00:33:33 -0600
Okay, I created a set of widgets and packed everything together.
One of the widgets is a GtlDrawingArea. Fine. I attach the expose
event to the callback function at the bottom of this message.
Everything comes up fine. It even creates a nice red rectangle.
Then I resize the window ... urp ... the color in the GtlDrawingArea
changes to a random color every time I resize it. Yellow .. Green ...
Blue ... you name it. No particular rhyme or reason.
I'm assuming that I'm doing something wrong, but I have no idea what.
Also, how do you create a GdkColor from an RGB value?
Expose callback function starts here:
wave_expose_event(GtkWidget *widget, GdkEventExpose *event)
fprintf(stderr,"Failed to parse color\n");
if (!(mygc = gdk_gc_new(widget->window)))
fprintf(stderr,"Failed to allocate GC\n");
] [Thread Prev