Re: gdk_draw_pixbuf
- From: 3saul <saul_lethbridge hotmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: gdk_draw_pixbuf
- Date: Tue, 27 Jun 2006 17:28:08 -0700 (PDT)
Ok it's working for me...too a point..I'm segfaulting on the expose event.
Here's some code
GdkPixbuf **background_pixbuf = NULL;
GtkWidget **link_drawable;
int i = 0;
int total_s = 4;
gboolean
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer
data)
{
gdk_draw_pixbuf (link_drawable[i]->window, NULL, background_pixbuf[i], 0,
0, 0, 0, -1, -1, GDK_RGB_DITHER_NORMAL, 0, 0);
return TRUE;
}
main()
...
link_drawable = g_new(GtkWidget*, total_s);
background_pixbuf = g_new(GdkPixbuf*, total_s);
background_pixbuf[i] = gdk_pixbuf_new_from_file("myfile.png", NULL);
link_drawable[i] = gtk_drawing_area_new();
gtk_widget_show( link_drawable[i] );
gtk_container_add (GTK_CONTAINER (hbuttonbox4), link_drawable[i]);
gtk_widget_set_size_request (link_drawable[i], 48, 48);
g_signal_connect (G_OBJECT (link_drawable[i]), "expose_event",
G_CALLBACK (expose_event_callback), NULL);
i++;
...
--
View this message in context: http://www.nabble.com/gdk_draw_pixbuf-tf1853061.html#a5076614
Sent from the Gtk+ - Apps Dev forum at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]