mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:30:48 +00:00
* 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:
parent
c3691d7f96
commit
712c6d629e
2 changed files with 15 additions and 7 deletions
|
@ -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>
|
2008-03-16 Riccardo Mottola <rmottola@users.sf.net>
|
||||||
|
|
||||||
* Source/NSApplication.m : changed terminate type to BOOL
|
* Source/NSApplication.m : changed terminate type to BOOL
|
||||||
|
|
|
@ -4112,7 +4112,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
DPSPrintf(ctxt, "__GSpagesaveobject restore\n\n");
|
DPSPrintf(ctxt, "__GSpagesaveobject restore\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
[self unlockFocus];
|
// [self unlockFocus];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) endTrailer
|
- (void) endTrailer
|
||||||
|
@ -4218,10 +4218,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
NSGraphicsContext *ctxt = [printOp context];
|
NSGraphicsContext *ctxt = [printOp context];
|
||||||
NSDictionary *dict = [[printOp printInfo] dictionary];
|
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"])
|
if ([dict objectForKey: @"NSPrintPaperBounds"])
|
||||||
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
||||||
else
|
else
|
||||||
|
@ -4251,14 +4247,21 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
yoff = (int)((nup-page-1) / (nup/2));
|
yoff = (int)((nup-page-1) / (nup/2));
|
||||||
yoff *= NSHeight(bounds) * scale;
|
yoff *= NSHeight(bounds) * scale;
|
||||||
DPStranslate(ctxt, xoff, yoff);
|
DPStranslate(ctxt, xoff, yoff);
|
||||||
|
DPSgsave(ctxt);
|
||||||
DPSscale(ctxt, scale, scale);
|
DPSscale(ctxt, scale, scale);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
DPSgsave(ctxt);
|
{
|
||||||
|
DPSgsave(ctxt);
|
||||||
|
}
|
||||||
|
|
||||||
/* Translate to placement */
|
/* Translate to placement */
|
||||||
if (location.x != 0 || location.y != 0)
|
if (location.x != 0 || location.y != 0)
|
||||||
DPStranslate(ctxt, location.x, location.y);
|
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
|
- (void) _endSheet
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue