comparison 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
comparison
equal deleted inserted replaced
1339:c6d6788e207f 1340:890890c31ba6
9996 /* Cycle through each page */ 9996 /* Cycle through each page */
9997 for(x=start; x<end && p->drawfunc; x++) 9997 for(x=start; x<end && p->drawfunc; x++)
9998 { 9998 {
9999 /* Call the application's draw function */ 9999 /* Call the application's draw function */
10000 p->drawfunc(print, pixmap, x, p->drawdata); 10000 p->drawfunc(print, pixmap, x, p->drawdata);
10001 /* Internal representation is flipped... so flip again so we can print */ 10001 if(p->drawfunc)
10002 _flip_image(image, rep2, size); 10002 {
10003 #ifdef DEBUG_PRINT 10003 /* Internal representation is flipped... so flip again so we can print */
10004 /* Save it to file to see what we have */ 10004 _flip_image(image, rep2, size);
10005 NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil]; 10005 #ifdef DEBUG_PRINT
10006 [data writeToFile: @"print.png" atomically: NO]; 10006 /* Save it to file to see what we have */
10007 #endif 10007 NSData *data = [rep2 representationUsingType: NSPNGFileType properties: nil];
10008 /* Print the image view */ 10008 [data writeToFile: @"print.png" atomically: NO];
10009 [po runOperation]; 10009 #endif
10010 /* Fill the pixmap with white in case we are printing more pages */ 10010 /* Print the image view */
10011 dw_color_foreground_set(DW_CLR_WHITE); 10011 [po runOperation];
10012 dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height); 10012 /* Fill the pixmap with white in case we are printing more pages */
10013 dw_color_foreground_set(DW_CLR_WHITE);
10014 dw_draw_rect(0, pixmap, TRUE, 0, 0, (int)size.width, (int)size.height);
10015 }
10013 } 10016 }
10014 if(p->drawfunc) 10017 if(p->drawfunc)
10015 result = DW_ERROR_NONE; 10018 result = DW_ERROR_NONE;
10016 /* Free memory */ 10019 /* Free memory */
10017 [image release]; 10020 [image release];