diff mac/dw.m @ 1340:890890c31ba6

Another printing cancel fix for the Mac and updated the readme.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 13 Nov 2011 23:01:35 +0000
parents 44f8a846f3c1
children 611893219ba9
line wrap: on
line diff
--- a/mac/dw.m	Sun Nov 13 22:52:31 2011 +0000
+++ b/mac/dw.m	Sun Nov 13 23:01:35 2011 +0000
@@ -9998,18 +9998,21 @@
     {
         /* Call the application's draw function */
         p->drawfunc(print, pixmap, x, p->drawdata);
-        /* Internal representation is flipped... so flip again so we can print */
-        _flip_image(image, rep2, size);
-#ifdef DEBUG_PRINT
-        /* Save it to file to see what we have */
-        NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil];
-        [data writeToFile: @"print.png" atomically: NO];
-#endif
-        /* Print the image view */
-        [po runOperation];
-        /* Fill the pixmap with white in case we are printing more pages */
-        dw_color_foreground_set(DW_CLR_WHITE);
-        dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height);
+        if(p->drawfunc)
+        {
+           /* Internal representation is flipped... so flip again so we can print */
+           _flip_image(image, rep2, size);
+   #ifdef DEBUG_PRINT
+           /* Save it to file to see what we have */
+           NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil];
+           [data writeToFile: @"print.png" atomically: NO];
+   #endif
+           /* Print the image view */
+           [po runOperation];
+           /* Fill the pixmap with white in case we are printing more pages */
+           dw_color_foreground_set(DW_CLR_WHITE);
+           dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height);
+        }
     }
     if(p->drawfunc)
         result = DW_ERROR_NONE;