# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1315709138 0 # Node ID 5878dbfafbe2ba236caeffb890dede3932d11599 # Parent b1b23de965d7cb7f6505a3fbf3626d97478aa17c Need to size the NSImageView to print it apparently on Mac. Also release the NSImageView and NSImage so we don't leak. diff -r b1b23de965d7 -r 5878dbfafbe2 mac/dw.m --- a/mac/dw.m Sat Sep 10 18:34:25 2011 +0000 +++ b/mac/dw.m Sun Sep 11 02:45:38 2011 +0000 @@ -9357,6 +9357,9 @@ image = [[NSImage alloc] initWithSize:[rep size]]; [image addRepresentation:rep]; [iv setImage:image]; + [iv setImageScaling:NSScaleProportionally]; + [iv setFrameOrigin:NSMakePoint(0,0)]; + [iv setFrameSize:size]; /* Create the print operation using the image view and * print info obtained from the panel in the last call. @@ -9389,8 +9392,10 @@ if(p->drawfunc) result = DW_ERROR_NONE; /* Free memory */ + [image release]; dw_pixmap_destroy(pixmap); free(p); + [iv release]; return result; }