[cairo] warning while executing gtk_widget_draw
Lokesh Chakka
lvenkatakumarchakka at gmail.com
Tue Aug 12 00:54:27 PDT 2014
Hello,
I have written one program and I am seeing the following warning:
Gtk-CRITICAL **: gtk_widget_draw: assertion '!widget->priv->alloc_needed'
failed
program is as follows:
main()
{
GtkDrawingArea *statistics;
cairo_surface_t *surface;
cairo_t *cr;
GtkWindow *main_window;
gtk_init( NULL, NULL );
statistics = (GtkDrawingArea*)gtk_drawing_area_new();
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 120, 120);
cr = cairo_create ( surface );
gtk_widget_draw( (GtkWidget*)statistics, cr );
cairo_surface_write_to_png( surface, "one.png" );
main_window = (GtkWindow*)gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(main_window),"destroy",G_CALLBACK(gtk_main_quit),NULL);
gtk_container_add (GTK_CONTAINER (main_window),(GtkWidget*)statistics);
gtk_widget_show_all((GtkWidget*)main_window);
gtk_main();
}
can some one please tell me the problem in the above program ?
Thanks & Regards
--
Lokesh Chakka,
Mobile: 9731023458
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20140812/5f6603ef/attachment.html>
More information about the cairo
mailing list