Revision: 14645
          http://sourceforge.net/p/skim-app/code/14645
Author:   hofman
Date:     2024-11-05 17:00:32 +0000 (Tue, 05 Nov 2024)
Log Message:
-----------
no need to draw page background in content image

Modified Paths:
--------------
    trunk/SKSnapshotWindowController.m

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2024-11-05 16:56:56 UTC (rev 14644)
+++ trunk/SKSnapshotWindowController.m  2024-11-05 17:00:32 UTC (rev 14645)
@@ -588,14 +588,13 @@
     CGContextSetInterpolationQuality(context, [pdfView interpolationQuality] + 
1);
     for (PDFPage *page in [pdfView visiblePages]) {
         NSRect pageRect = [pdfView convertRect:[page boundsForBox:box] 
fromPage:page];
-        if (NSIntersectsRect(pageRect, bounds) == NO) continue;
-        CGContextSetFillColorWithColor(context, 
CGColorGetConstantColor(kCGColorWhite));
-        CGContextFillRect(context, 
SKPixelAlignedRect(NSRectToCGRect(pageRect), context));
-        CGContextSaveGState(context);
-        CGContextTranslateCTM(context, NSMinX(pageRect), NSMinY(pageRect));
-        CGContextScaleCTM(context, scale, scale);
-        [page drawWithBox:box toContext:context];
-        CGContextRestoreGState(context);
+        if (NSIntersectsRect(pageRect, bounds)) {
+            CGContextSaveGState(context);
+            CGContextTranslateCTM(context, NSMinX(pageRect), NSMinY(pageRect));
+            CGContextScaleCTM(context, scale, scale);
+            [page drawWithBox:box toContext:context];
+            CGContextRestoreGState(context);
+        }
     }
     
     [NSGraphicsContext restoreGraphicsState];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to