forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
4261efda2b
commit
7c3e8130c4
@ -177,11 +177,11 @@ _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context)
|
|||||||
case GTK_PAGE_ORIENTATION_PORTRAIT:
|
case GTK_PAGE_ORIENTATION_PORTRAIT:
|
||||||
break;
|
break;
|
||||||
case GTK_PAGE_ORIENTATION_LANDSCAPE:
|
case GTK_PAGE_ORIENTATION_LANDSCAPE:
|
||||||
cairo_translate (cr, width, 0);
|
cairo_translate (cr, 0, height);
|
||||||
cairo_matrix_init (&matrix,
|
cairo_matrix_init (&matrix,
|
||||||
0, 1,
|
0, -1,
|
||||||
-1, 0,
|
1, 0,
|
||||||
0, 0);
|
0, 0);
|
||||||
cairo_transform (cr, &matrix);
|
cairo_transform (cr, &matrix);
|
||||||
break;
|
break;
|
||||||
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
|
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
|
||||||
@ -193,11 +193,11 @@ _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context)
|
|||||||
cairo_transform (cr, &matrix);
|
cairo_transform (cr, &matrix);
|
||||||
break;
|
break;
|
||||||
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
|
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
|
||||||
cairo_translate (cr, 0, height);
|
cairo_translate (cr, width, 0);
|
||||||
cairo_matrix_init (&matrix,
|
cairo_matrix_init (&matrix,
|
||||||
0, -1,
|
0, 1,
|
||||||
1, 0,
|
-1, 0,
|
||||||
0, 0);
|
0, 0);
|
||||||
cairo_transform (cr, &matrix);
|
cairo_transform (cr, &matrix);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user