Re: [Gnome-print] gnome_print_pixbuf and rotate.
- From: Lauris Kaplinski <lauris ximian com>
- To: jrb redhat com
- Cc: gnome-print ximian com
- Subject: Re: [Gnome-print] gnome_print_pixbuf and rotate.
- Date: 29 May 2001 03:38:39 +0200
Hello!
Your test code is all right. I hope it prints OK, using PostScript
context ;)
I did a quick check, and seems that there is GnomeCanvasImage bug,
affecting some convenience positioning methods. I did a quick
workaround for print preview in gnome-print-1-4 branch, that should
reach to 0.29 version.
Thank you for finding a bug!
Best wishes,
Lauris Kaplinski
On 25 May 2001 19:46:21 -0400, jrb@redhat.com wrote:
> 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
>
> _______________________________________________
> Gnome-print maillist - Gnome-print@helixcode.com
> http://lists.helixcode.com/mailman/listinfo/gnome-print
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]