diff options
author | Marek Kasik <mkasik@redhat.com> | 2009-10-27 16:53:43 +0100 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2009-10-27 16:53:43 +0100 |
commit | 50e784c40519288d688f2dab8a84a05569e0a2ad (patch) | |
tree | d12f00be65c0b1a65bea8145f6e45fb31d4c4841 /modules | |
parent | 9f2c5e3b3a1f1cf8f4c4cd15f1e4ca84cf998267 (diff) | |
download | gdk-pixbuf-50e784c40519288d688f2dab8a84a05569e0a2ad.tar.gz |
Rotate number-up layout according to orientation when printing
Number-up layout has to be rotated differently since rotation in
"landscape" and "reversed landscape" mode was changed.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 7fd39847f..10947b41b 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -4319,18 +4319,18 @@ cups_printer_prepare_for_print (GtkPrinter *printer, break; case GTK_PAGE_ORIENTATION_LANDSCAPE: if (layout < 4) - layout = layout + 5 - 2 * (layout % 2); + layout = layout + 2 + 4 * (1 - layout / 2); else - layout = layout - 6 + 4 * (1 - (layout - 4) / 2); + layout = layout - 3 - 2 * (layout % 2); break; case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: layout = (layout + 3 - 2 * (layout % 2)) % 4 + 4 * (layout / 4); break; case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: if (layout < 4) - layout = layout + 2 + 4 * (1 - layout / 2); + layout = layout + 5 - 2 * (layout % 2); else - layout = layout - 3 - 2 * (layout % 2); + layout = layout - 6 + 4 * (1 - (layout - 4) / 2); break; } |