After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740742 - Don't scale before translation
Don't scale before translation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-11-26 12:03 UTC by Marek Kašík
Modified: 2015-01-02 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix origin for scaled, rotated pages (patch by Leo Wolf) (1.61 KB, patch)
2014-11-26 12:07 UTC, Marek Kašík
needs-work Details | Review
patch with corrections (2.03 KB, patch)
2014-11-26 20:33 UTC, Leo Wolf
committed Details | Review

Description Marek Kašík 2014-11-26 12:03:59 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.
Comment 1 Marek Kašík 2014-11-26 12:07:12 UTC
Created attachment 291538 [details] [review]
Fix origin for scaled, rotated pages (patch by Leo Wolf)

Leo's patch fixes the mentioned problems for me.
Comment 2 Marek Kašík 2014-11-26 12:25:25 UTC
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.
Comment 3 Leo Wolf 2014-11-26 20:33:55 UTC
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 4 Marek Kašík 2014-11-27 11:24:17 UTC
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
Comment 5 Samuel Wolf 2014-12-30 14:11:09 UTC
@ Marek,

can you give me the link of the commit?
Comment 6 Marek Kašík 2015-01-02 09:23:39 UTC
(In reply to comment #5)
> @ Marek,
> 
> can you give me the link of the commit?

https://git.gnome.org/browse/gtk+/commit/?id=c85c3510e70ea8396dde56606ac0380825c3732f