Closed Bug 223625 Opened 21 years ago Closed 21 years ago

[ps] Printing landscape doesn't work following bug 80190

Categories

(Core :: Printing: Output, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kherron+mozilla, Assigned: kherron+mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

The patch for bug 80190 contains incorrect code for setting up the postscript
coordinate system for landscape mode printing. It contains two problems:

1) The coordinate system is rotated in the wrong direction, resulting in
everything being drawn off the edge of the paper.

2) The coordinate system origin is moved by the width of the printable page at
one point, where it should be moved by the total width of the page including
margins. Ignoring the coordinate rotation error, this results in everything
being half an inch too high on the paper.
The existing code attempts to translate the coordinate origin to the lower
right corner of the page, then rotate the page to make this the lower left
corner. However, it only translates by the printable height, not including
margins, then it rotates in the wrong direction. Note that "height" in this
context is what would normally be the paper width, since we're in landscape
mode.

This patch corrects the translation error by adding in the top & bottom
margins. It also corrects the rotate operation.
Attachment #134097 - Flags: review?(tor)
I rooted around a bit and found the code that was supposed to be in the bug
80190 patch. It must have gotten lost somehow.

Anyway, this is a small improvement. The previous patch ended up doing a
translate, a rotate, and another translate when setting up landscape mode. This
just does a rotate and a translate.

When the origin is in the bottom left corner, rotating the page naturally moves
the origin to the top left corner where it's supposed to be. The translate
simply moves the origin from the corner of the paper to the corner of the
printable area.
Attachment #134097 - Attachment is obsolete: true
Attachment #134097 - Flags: review?(tor)
Attachment #134107 - Flags: review?(tor)
Attachment #134107 - Flags: review?(tor) → review+
Flags: blocking1.6a+
Attachment #134107 - Flags: superreview?(bzbarsky)
Comment on attachment 134107 [details] [diff] [review]
Coordinate system setup for landscape v2

sr=bzbarsky.  Could we get this regression fix into 1.6a too?
Attachment #134107 - Flags: superreview?(bzbarsky)
Attachment #134107 - Flags: superreview+
Attachment #134107 - Flags: approval1.6a?
Comment on attachment 134107 [details] [diff] [review]
Coordinate system setup for landscape v2

a=asa (on behalf of drivers) for checkin to 1.6alpha
Attachment #134107 - Flags: approval1.6a? → approval1.6a+
Checked in to the trunk for 1.6a.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: