Re: [gnome-print] how to print pixmap



Hello!

There is some information at
http://www.gnome.org/projects/gnome-print/index.php3?section=documentation&page=faq

but not about your specific case. I think:

1) You have to copy pixmap (server-side object) into pixbuf (client
   side object)

gdk_pixbuf_get_from_drawable (pixbuf, pixmap, colormap,
  0, 0, 0, 0, width, height)

I am not sure, but colormap can probably be obtained from
  cmap = gdk_rgb_get_colormap ()

2) Printing itself is:

gnome_print_gsave (pc)
gnome_print_translate (pc, image_left_x, image_bottom_y)
gnome_print_scale (pc, image_width, image_height)
gnome_print_pixbuf (pc, pixbuf)
gnome_print_grestore (pc)


best wishes,
Lauris Kaplinski

On Mon, 2002-03-18 at 11:42, Harsha Kodnad wrote:
>  I have a GdkPixmap how to print it on the
> GnomePrintContext ? 
> 
> thanks in advance
> 
> 
> regards
> 
> =====
> Harsha Kodnad
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
> 
> _______________________________________________
> Gnome-print maillist  -  Gnome-print@ximian.com
> http://lists.ximian.com/mailman/listinfo/gnome-print






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