Revision: 7205
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7205&view=rev
Author:   hofman
Date:     2011-04-07 11:48:38 +0000 (Thu, 07 Apr 2011)

Log Message:
-----------
hidden default for image interpolation

Modified Paths:
--------------
    trunk/SKPDFView.m
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.m
    trunk/SKStringConstants.h
    trunk/SKStringConstants.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2011-04-07 10:20:48 UTC (rev 7204)
+++ trunk/SKPDFView.m   2011-04-07 11:48:38 UTC (rev 7205)
@@ -331,8 +331,11 @@
 - (void)drawPage:(PDFPage *)pdfPage {
     [NSGraphicsContext saveGraphicsState];
     
+    NSImageInterpolation interpolation = [[NSUserDefaults 
standardUserDefaults] integerForKey:SKImageInterpolation];
     // smooth graphics when anti-aliasing
-    [[NSGraphicsContext currentContext] setImageInterpolation:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey] ? 
NSImageInterpolationHigh : NSImageInterpolationDefault];
+    if (interpolation == NSImageInterpolationDefault && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey])
+        interpolation = NSImageInterpolationHigh;
+    [[NSGraphicsContext currentContext] setImageInterpolation:interpolation];
     
     // Let PDFView do most of the hard work.
     [super drawPage: pdfPage];

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2011-04-07 10:20:48 UTC (rev 7204)
+++ trunk/SKSecondaryPDFView.m  2011-04-07 11:48:38 UTC (rev 7205)
@@ -156,8 +156,11 @@
 }
 
 - (void)drawPage:(PDFPage *)pdfPage {
+    NSImageInterpolation interpolation = [[NSUserDefaults 
standardUserDefaults] integerForKey:SKImageInterpolation];
     // smooth graphics when anti-aliasing
-    [[NSGraphicsContext currentContext] setImageInterpolation:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey] ? 
NSImageInterpolationHigh : NSImageInterpolationDefault];
+    if (interpolation == NSImageInterpolationDefault && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey])
+        interpolation = NSImageInterpolationHigh;
+    [[NSGraphicsContext currentContext] setImageInterpolation:interpolation];
     [super drawPage:pdfPage];
     [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationDefault];
 }

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2011-04-07 10:20:48 UTC (rev 7204)
+++ trunk/SKSnapshotPDFView.m   2011-04-07 11:48:38 UTC (rev 7205)
@@ -62,8 +62,11 @@
 #define SKScaleMenuFontSize ((CGFloat)11.0)
 
 - (void)drawPage:(PDFPage *)pdfPage {
+    NSImageInterpolation interpolation = [[NSUserDefaults 
standardUserDefaults] integerForKey:SKImageInterpolation];
     // smooth graphics when anti-aliasing
-    [[NSGraphicsContext currentContext] setImageInterpolation:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey] ? 
NSImageInterpolationHigh : NSImageInterpolationDefault];
+    if (interpolation == NSImageInterpolationDefault && [[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey])
+        interpolation = NSImageInterpolationHigh;
+    [[NSGraphicsContext currentContext] setImageInterpolation:interpolation];
     [super drawPage:pdfPage];
     [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationDefault];
 }

Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h   2011-04-07 10:20:48 UTC (rev 7204)
+++ trunk/SKStringConstants.h   2011-04-07 11:48:38 UTC (rev 7205)
@@ -60,6 +60,7 @@
 extern NSString *SKLastToolModeKey;
 extern NSString *SKLastAnnotationModeKey;
 extern NSString *SKShouldAntiAliasKey;
+extern NSString *SKImageInterpolation;
 extern NSString *SKGreekingThresholdKey;
 extern NSString *SKReadingBarColorKey;
 extern NSString *SKReadingBarInvertKey;

Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m   2011-04-07 10:20:48 UTC (rev 7204)
+++ trunk/SKStringConstants.m   2011-04-07 11:48:38 UTC (rev 7205)
@@ -61,6 +61,7 @@
 NSString *SKLastToolModeKey = @"SKLastToolMode";
 NSString *SKLastAnnotationModeKey = @"SKLastAnnotationMode";
 NSString *SKShouldAntiAliasKey = @"SKShouldAntiAlias";
+NSString *SKImageInterpolation = @"SKImageInterpolation";
 NSString *SKGreekingThresholdKey = @"SKGreekingThreshold";
 NSString *SKReadingBarColorKey = @"SKReadingBarColor";
 NSString *SKReadingBarInvertKey = @"SKReadingBarInvert";


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

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to