beer wrote: > I try to draw something by use Pixmap and Drawing area but I get some > problem. > What is cause of problem? > How can I fix it? > Please tell me, thank you very much. > > > > Poblem is > > > > 1) Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): > assertion `gc != NULL' failed. > > > > error 1) occur when I call this function > > > > gdk_draw_rectangle (attr->proc_name, window1->yle->white_gc, TRUE, > 0, 0, > (area->proc_name)->allocation.width, > (area->proc_name)->allocation.height); > > > > 2) Gdk-CRITICAL **: file gdkgc.c: line 51 (gdk_gc_new_with_values): > assertion `window != NULL' failed. > > > > 3) Gdk-CRITICAL **: file gdkgc.c: line 456 (gdk_gc_set_foreground): > assertion `gc != NULL' failed. > > > > error 2) 3) occur when I call this functions > > > > gc = gdk_gc_new (window1->window); > gdk_gc_set_foreground (gc, c); > > > > 4) Gdk-ERROR **: BadMatch (invalid parameter attributes) > serial 194 error_code 8 request_code 62 minor_code 0 > > > > error 4) occur when I call this function > > > > gdk_draw_pixmap (area->proc_name->window, window1->style->black_gc, > attr->proc_name, 0, value_v, 0, 0, proc_w, proc_h); > > > Hello,
You have to be sure that your widget (GtkDrawingArea) was realized. If not - all gdk stuff inside it is not allocated. The simpliest way is to call gtk_widget_show(area) after area creation (before all your drawlings). Olexiy _______________________________________________ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
