views:

15

answers:

0

Hello,

In my gtk+ application i have list of images and i need to print it.

I have code for printing one image:

    static void draw_page (GtkPrintOperation * oper, GtkPrintContext * context, 
                          gint nr, gpointer user_data)
{
   MainWin* mw = (MainWin*)user_data;
   GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(image_list_get_current_file_path (mw->img_list),NULL);

   pixbuf =  gdk_pixbuf_scale_simple (pixbuf, 
                                      197, 210, 
                                      GDK_INTERP_HYPER); 


   cairo_t *cr = gtk_print_context_get_cairo_context (context);
   cairo_surface_t *image;

   gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
   cairo_paint (cr);
   cairo_surface_destroy (image);


 g_object_unref (pixbuf);   
}

How can i printin list of images?

Thank you