GNOME Bugzilla – Bug 740742
Don't scale before translation
Last modified: 2015-01-02 09:23:39 UTC
(Originally reported here: https://bugzilla.gnome.org/show_bug.cgi?id=739723) Scaling in common_render_page() in gtk/gtkprintoperation.c happens before rotation and translation of context to right place. The scaling should actually happen after translation and rotation. The bug can be reproduced by printing landscape at scale < 100% to a printer. The output is aligned to the right but it should be aligned to the left. Other problem caused by this is scaling of margins which should not happen.
Created attachment 291538 [details] [review] Fix origin for scaled, rotated pages (patch by Leo Wolf) Leo's patch fixes the mentioned problems for me.
Review of attachment 291538 [details] [review]: Hi, thank you for the patch. See comments below please. Change the "gtk/gtkprintoperation.c:" to just "printing:" in the subject and add link to this bug to the end of the comment. ::: gtk/gtkprintoperation.c @@ +2683,3 @@ + priv->manual_scale, + priv->manual_scale); + } Move this to the if() part of the condition by switching the condition to "if (priv->manual_number_up <= 1)". I would prefer to have the code closer to the previous transforms.
Created attachment 291590 [details] [review] patch with corrections Oh, yeah, that makes sense. I also expanded the commit message a bit and left some whitespace alone.
Comment on attachment 291590 [details] [review] patch with corrections (In reply to comment #3) > Created an attachment (id=291590) [details] [review] > patch with corrections > > Oh, yeah, that makes sense. I also expanded the commit message a bit and left > some whitespace alone. Thank you for those modifications. I've pushed the patch to master and gtk-3-14 branches. Regards Marek
@ Marek, can you give me the link of the commit?
(In reply to comment #5) > @ Marek, > > can you give me the link of the commit? https://git.gnome.org/browse/gtk+/commit/?id=c85c3510e70ea8396dde56606ac0380825c3732f