Re: gdk_draw_pixbuf()



Hello,
There's GtkImage widget for this:
http://developer.gnome.org/doc/API/gtk/GtkImage.html

#include <gtk/gtk.h>

int main (int argc, char *argv[])
{
    GtkWidget *window;

   GtkWidget *image;

    gtk_init (&argc, &argv);

    window = gtk_window_new( GTK_WINDOW_TOPLEVEL);

g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), 0);

   image = gtk_image_new_from_file ("linux.png");
   gtk_container_add (GTK_CONTAINER (window), image);

   gtk_widget_show_all (window);

    gtk_main ();

    return 0;
}






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