Revision: 13507
http://sourceforge.net/p/skim-app/code/13507
Author: hofman
Date: 2023-06-25 14:25:09 +0000 (Sun, 25 Jun 2023)
Log Message:
-----------
only bother about graphics context when something to draw
Modified Paths:
--------------
trunk/NSBitmapImageRep_SKExtensions.m
Modified: trunk/NSBitmapImageRep_SKExtensions.m
===================================================================
--- trunk/NSBitmapImageRep_SKExtensions.m 2023-06-24 17:56:03 UTC (rev
13506)
+++ trunk/NSBitmapImageRep_SKExtensions.m 2023-06-25 14:25:09 UTC (rev
13507)
@@ -238,10 +238,12 @@
bytesPerRow:0 bitsPerPixel:0] autorelease];
bmpImageRep = [bmpImageRep
bitmapImageRepByRetaggingWithColorSpace:[NSColorSpace sRGBColorSpace]];
[bmpImageRep setSize:size];
- [NSGraphicsContext saveGraphicsState];
- [NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithBitmapImageRep:bmpImageRep]];
- if (drawingHandler) drawingHandler((NSRect){NSZeroPoint, size});
- [NSGraphicsContext restoreGraphicsState];
+ if (drawingHandler) {
+ [NSGraphicsContext saveGraphicsState];
+ [NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithBitmapImageRep:bmpImageRep]];
+ drawingHandler((NSRect){NSZeroPoint, size});
+ [NSGraphicsContext restoreGraphicsState];
+ }
return bmpImageRep;
}
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