* Source/NSView.m: Changes to beginPage:... and endPage to correct

issues with blank space at the top of the page when printing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26336 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-03-18 01:01:34 +00:00
parent dc5dbb416d
commit 4c268441c9
2 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2008-03-17 21:00-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSView.m: Changes to beginPage:... and endPage to correct
issues with blank space at the top of the page when printing.
2008-03-16 Riccardo Mottola <rmottola@users.sf.net>
* Source/NSApplication.m : changed terminate type to BOOL

View file

@ -4112,7 +4112,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
DPSPrintf(ctxt, "__GSpagesaveobject restore\n\n");
}
[self unlockFocus];
// [self unlockFocus];
}
- (void) endTrailer
@ -4218,10 +4218,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
NSGraphicsContext *ctxt = [printOp context];
NSDictionary *dict = [[printOp printInfo] dictionary];
// FIXME: Need to place this correctly. Maybe it isn't needed at all,
// as all drawing happens in displayRectIgnoringOpacity:
[self lockFocusIfCanDrawInContext: ctxt];
if ([dict objectForKey: @"NSPrintPaperBounds"])
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
else
@ -4251,14 +4247,21 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
yoff = (int)((nup-page-1) / (nup/2));
yoff *= NSHeight(bounds) * scale;
DPStranslate(ctxt, xoff, yoff);
DPSgsave(ctxt);
DPSscale(ctxt, scale, scale);
}
DPSgsave(ctxt);
else
{
DPSgsave(ctxt);
}
/* Translate to placement */
if (location.x != 0 || location.y != 0)
DPStranslate(ctxt, location.x, location.y);
// FIXME: Need to place this correctly. Maybe it isn't needed at all,
// as all drawing happens in displayRectIgnoringOpacity:
// [self lockFocusIfCanDrawInContext: ctxt];
}
- (void) _endSheet