Revision: 2804
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2804&view=rev
Author:   hofman
Date:     2007-09-01 13:48:36 -0700 (Sat, 01 Sep 2007)

Log Message:
-----------
Remove some unnecessary saving of graphics states.

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m
    trunk/SKPDFHoverWindow.m
    trunk/SKPDFView.m
    trunk/SKSnapshotWindowController.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2007-09-01 20:27:26 UTC (rev 2803)
+++ trunk/PDFPage_SKExtensions.m        2007-09-01 20:48:36 UTC (rev 2804)
@@ -105,7 +105,6 @@
     NSImage *image = [[NSImage alloc] initWithSize:bounds.size];
     
     [image lockFocus];
-    [NSGraphicsContext saveGraphicsState];
     [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationHigh];
     if ([self rotation]) {
         NSAffineTransform *transform = [NSAffineTransform transform];
@@ -127,7 +126,6 @@
     bounds.origin = NSZeroPoint;
     NSRectFill(bounds);
     [self drawWithBox:box]; 
-    [NSGraphicsContext restoreGraphicsState];
     [image unlockFocus];
     
     return [image autorelease];
@@ -169,7 +167,6 @@
     
     image = [[NSImage alloc] initWithSize:thumbnailSize];
     [image lockFocus];
-    [NSGraphicsContext saveGraphicsState];
     [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationHigh];
     [NSGraphicsContext saveGraphicsState];
     [[NSColor whiteColor] set];
@@ -209,7 +206,6 @@
             [NSBezierPath fillRect:readingBarRect];
         }
     }
-    [NSGraphicsContext restoreGraphicsState];
     [image unlockFocus];
     
     return [image autorelease];

Modified: trunk/SKPDFHoverWindow.m
===================================================================
--- trunk/SKPDFHoverWindow.m    2007-09-01 20:27:26 UTC (rev 2803)
+++ trunk/SKPDFHoverWindow.m    2007-09-01 20:48:36 UTC (rev 2804)
@@ -230,12 +230,10 @@
             image = [[NSImage alloc] initWithSize:targetRect.size];
             
             [image lockFocus];
-            [NSGraphicsContext saveGraphicsState];
             [pageImage drawInRect:targetRect fromRect:sourceRect 
operation:NSCompositeCopy fraction:1.0];
             [labelColor setFill];
             [NSBezierPath fillHorizontalOvalAroundRect:labelRect];
             [labelString drawWithRect:labelRect 
options:NSStringDrawingUsesLineFragmentOrigin];
-            [NSGraphicsContext restoreGraphicsState];
             [image unlockFocus];
             
             [attrs release];

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2007-09-01 20:27:26 UTC (rev 2803)
+++ trunk/SKPDFView.m   2007-09-01 20:48:36 UTC (rev 2804)
@@ -3327,10 +3327,8 @@
         [[self window] cacheImageInRect:NSInsetRect([[self documentView] 
convertRect:selRect toView:nil], -2.0, -2.0)];
         
         [self lockFocus];
-        [NSGraphicsContext saveGraphicsState];
         [[NSColor blackColor] set];
         [NSBezierPath strokeRect:NSInsetRect(NSIntegralRect([self 
convertRect:selRect fromView:[self documentView]]), 0.5, 0.5)];
-        [NSGraphicsContext restoreGraphicsState];
         [self unlockFocus];
         [[self window] enableFlushWindow];
         [[self window] flushWindow];

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2007-09-01 20:27:26 UTC (rev 2803)
+++ trunk/SKSnapshotWindowController.m  2007-09-01 20:48:36 UTC (rev 2804)
@@ -326,7 +326,6 @@
     
     image = [[NSImage alloc] initWithSize:thumbnailSize];
     [image lockFocus];
-    [NSGraphicsContext saveGraphicsState];
     [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationHigh];
     if (isScaled || hasShadow) {
         NSAffineTransform *transform = [NSAffineTransform transform];
@@ -349,7 +348,6 @@
     NSRectFill(bounds);
     [NSGraphicsContext restoreGraphicsState];
     [imageRep drawInRect:bounds];
-    [NSGraphicsContext restoreGraphicsState];
     [image unlockFocus];
     
     return [image autorelease];


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to