Author: gcasa Date: Mon Jul 18 17:59:44 2016 New Revision: 40011 URL: http://svn.gna.org/viewcvs/gnustep?rev=40011&view=rev Log: Move changes to new branch.
Modified: libs/gui/trunk/ChangeLog libs/gui/trunk/Source/NSView.m Modified: libs/gui/trunk/ChangeLog URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=40011&r1=40010&r2=40011&view=diff ============================================================================== --- libs/gui/trunk/ChangeLog (original) +++ libs/gui/trunk/ChangeLog Mon Jul 18 17:59:44 2016 @@ -1,3 +1,7 @@ +2016-07-18 11:59-EDT Gregory John Casamento <greg.casame...@gmail.com> + + * Source/NSView.m: Move to new branch. + 2016-07-18 11:46-EDT Gregory John Casamento <greg.casame...@gmail.com> * Source/NSView.m: Revert previous changes. Moving to a branch. Modified: libs/gui/trunk/Source/NSView.m URL: http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSView.m?rev=40011&r1=40010&r2=40011&view=diff ============================================================================== --- libs/gui/trunk/Source/NSView.m (original) +++ libs/gui/trunk/Source/NSView.m Mon Jul 18 17:59:44 2016 @@ -4235,12 +4235,26 @@ fonts: (NSString*)fontNames { NSPrintOperation *printOp = [NSPrintOperation currentOperation]; + NSPrintInfo *info = [printOp printInfo]; NSGraphicsContext *ctxt = [printOp context]; + NSSize paperSize = [info paperSize]; + CGFloat scale = (double)([self frame].size.width/paperSize.width); + CGFloat xoff = 0.0; + CGFloat yoff = (paperSize.height - self.frame.size.height) / scale; [ctxt beginPage: ordinalNum label: aString bBox: pageRect fonts: fontNames]; + + // Need to align the view being printed based on the size of the page. + + // Add to scale the page down + DPSscale(ctxt, scale, scale); + + // Add translation + DPStranslate(ctxt, xoff, yoff); + } - (void) beginPageSetupRect: (NSRect)aRect placement: (NSPoint)location @@ -4270,6 +4284,7 @@ - (void) addToPageSetup { + // Override this method when you want to add something to the view specific to printing. } - (void) beginSetup _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs