diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2009-09-30 12:47:55 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-09-30 12:47:55 -0400 |
commit | 7c3e8130c471c617d8a686735da0c08a99c7d618 (patch) | |
tree | 126a2a42621560a0be1ba7eb1dbcd936e3538343 /gtk/gtkprintcontext.c | |
parent | 4261efda2bdcc458f9e0898f3d9c9861c124c6d0 (diff) | |
download | gtk+-7c3e8130c471c617d8a686735da0c08a99c7d618.tar.gz |
Correct the orientation of landscape pages
The convention for landscape pages, and required by PostScript
Language Reference Manual, is for landscape printing to rotate user
space 90 degrees counterclockwise. Part of bug 596423
Diffstat (limited to 'gtk/gtkprintcontext.c')
-rw-r--r-- | gtk/gtkprintcontext.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkprintcontext.c b/gtk/gtkprintcontext.c index c280881f80..80eac79fa7 100644 --- a/gtk/gtkprintcontext.c +++ b/gtk/gtkprintcontext.c @@ -177,11 +177,11 @@ _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context) case GTK_PAGE_ORIENTATION_PORTRAIT: break; case GTK_PAGE_ORIENTATION_LANDSCAPE: - cairo_translate (cr, width, 0); + cairo_translate (cr, 0, height); cairo_matrix_init (&matrix, - 0, 1, - -1, 0, - 0, 0); + 0, -1, + 1, 0, + 0, 0); cairo_transform (cr, &matrix); break; case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: @@ -193,11 +193,11 @@ _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context) cairo_transform (cr, &matrix); break; case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: - cairo_translate (cr, 0, height); + cairo_translate (cr, width, 0); cairo_matrix_init (&matrix, - 0, -1, - 1, 0, - 0, 0); + 0, 1, + -1, 0, + 0, 0); cairo_transform (cr, &matrix); break; } |