[Gnome-print] gnome_print_pixbuf and rotate.



Hi,

I'm trying to write some code to display an image scaled and rotated degrees
with gnome-print.  gnome_print_rotate does not seem to actually do what
I expect it to do.  For example, consider the following code snippet:

{
	gnome_print_beginpage (context, "1");

	gnome_print_gsave (context);
	gnome_print_rotate (context, 45);
	gnome_print_scale (context, width, width);
	gnome_print_setrgbcolor (context, 0.9, 0.8, 0.6);
	gnome_print_moveto (context, 0, 0);
	gnome_print_lineto (context, 0, 1);
	gnome_print_lineto (context, 1, 1);
	gnome_print_lineto (context, 1, 0);
	gnome_print_fill (context);
	gnome_print_pixbuf (context, screenshot);
	gnome_print_grestore (context);
  
	gnome_print_showpage (context);
	gnome_print_context_close (context);
}

This will, as far as I can see draw a diamond and an image
superimposed (with the image fully blocking the box).  Instead, it seems
to be doing funny stuff with the rotation.  Is this because the pixbuf
isn't square?

Thanks,
-Jonathan




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