* Source/cairo/CairoContext.m (-beginPrologueBBox:...):

Add a hack to get landscape printing working. Comment in the source
reproduced here:
FIXME: This is confusing... When an 8.5x11 page is set to
landscape, NSPrintInfo also swaps the paperSize to be 11x8.5,
but gui also adds a 90 degree rotation as if it will
be drawing on a 8.5x11 page. So, swap 11x8.5 back to 8.5x11 here.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34356 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-12-24 18:44:53 +00:00
parent 4f613a2a66
commit b6588a43bd
2 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,13 @@
2011-12-24 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoContext.m (-beginPrologueBBox:...):
Add a hack to get landscape printing working. Comment in the source
reproduced here:
FIXME: This is confusing... When an 8.5x11 page is set to
landscape, NSPrintInfo also swaps the paperSize to be 11x8.5,
but gui also adds a 90 degree rotation as if it will
be drawing on a 8.5x11 page. So, swap 11x8.5 back to 8.5x11 here.
2011-12-23 Eric Wasylishen <ewasylishen@gmail.com>
* Source/cairo/CairoContext.m (-beginPrologueBBox:...): Use

View file

@ -233,6 +233,17 @@
if (printInfo != nil)
{
size = [printInfo paperSize];
// FIXME: This is confusing..
// When an 8.5x11 page is set to landscape,
// NSPrintInfo also swaps the paperSize to be 11x8.5,
// but gui also adds a 90 degree rotation as if it will
// be drawing on a 8.5x11 page. So, swap 11x8.5 back to
// 8.5x11 here.
if ([printInfo orientation] == NSLandscapeOrientation)
{
size = NSMakeSize(size.height, size.width);
}
}
else
{