Re: printing images
"Robert Roebling" <[email protected]> Wed, 03 Nov 2004 22:46:06 +0100
| Newsgroups | gmane.comp.gnome.print |
|---|---|
| Message-ID | <[email protected]> |
> > gnome_print_moveto( gpc, x,y );
> > gnome_print_rgbimage( gpc, (chunk of RGB data), 32, 32, 32*3 );
> >
> > but nothing shows up in the printout. (..) Maybe the
> > positioning is outside the visible bounds or the image
> > in shrunk to zero?
>
> It is not shrunk to zero, but gnome_print_rgbimage "Draws RGB color
> image into unit square (0,0 - 1,1) in current coordinate
> system." So it's shrunk to one ;)
>
> You have to adjust the current transformation matrix (ctm) to transform
> that square to the size you actually want.
>
> Look at libgnomeprint/tests/generate.c (my_draw_image) for example code.
> But ignore the pixbuf generation code ;).
Thanks! It works now. But as you are mentioning "pixbuf", we
are using GdkPixbuf for storing bitmaps with an alpha channel.
Is there a way to print these rather directly with the
gnome_print_rgbaimage() function?
Thanks again,
Robert