Revision: 6983
http://skim-app.svn.sourceforge.net/skim-app/?rev=6983&view=rev
Author: hofman
Date: 2010-12-17 11:18:53 +0000 (Fri, 17 Dec 2010)
Log Message:
-----------
restore image interpolation after we changed it, because this won't be restored
by restoreGraphicsState
Modified Paths:
--------------
trunk/NSImage_SKExtensions.m
trunk/NSMenu_SKExtensions.m
trunk/PDFPage_SKExtensions.m
trunk/SKPDFPage.m
trunk/SKPDFView.m
trunk/SKSnapshotWindowController.m
trunk/SKTextWithIconCell.m
Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/NSImage_SKExtensions.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -1684,6 +1684,7 @@
[path lineToPoint:NSMakePoint(7.0, 12.0)];
[path closePath];
[path fill];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[resizeLeftDownCursorImage unlockFocus];
[resizeLeftDownCursorImage setName:SKImageNameResizeLeftDownCursor];
@@ -1747,6 +1748,7 @@
[path lineToPoint:NSMakePoint(9.0, 12.0)];
[path closePath];
[path fill];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[resizeRightDownCursorImage unlockFocus];
[resizeRightDownCursorImage setName:SKImageNameResizeRightDownCursor];
@@ -1810,6 +1812,7 @@
[path lineToPoint:NSMakePoint(7.0, 4.0)];
[path closePath];
[path fill];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[resizeLeftUpCursorImage unlockFocus];
[resizeLeftUpCursorImage setName:SKImageNameResizeLeftUpCursor];
@@ -1873,6 +1876,7 @@
[path lineToPoint:NSMakePoint(9.0, 4.0)];
[path closePath];
[path fill];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[resizeRightUpCursorImage unlockFocus];
[resizeRightUpCursorImage setName:SKImageNameResizeRightUpCursor];
@@ -1943,8 +1947,8 @@
cameraCursorImage = [[NSImage alloc] initWithSize:size];
[cameraCursorImage lockFocus];
+ [NSGraphicsContext saveGraphicsState];
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationNone];
- [NSGraphicsContext saveGraphicsState];
[[NSColor clearColor] setFill];
NSRectFill(rect);
[[NSColor whiteColor] set];
@@ -1963,6 +1967,7 @@
[path appendBezierPathWithArcWithCenter:NSMakePoint(8.0, 8.0) radius:1.8
startAngle:45.0 endAngle:225.0];
[path closePath];
[path fill];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[cameraCursorImage unlockFocus];
[cameraCursorImage setName:SKImageNameCameraCursor];
Modified: trunk/NSMenu_SKExtensions.m
===================================================================
--- trunk/NSMenu_SKExtensions.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/NSMenu_SKExtensions.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -144,6 +144,7 @@
[newImage lockFocus];
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
[image drawInRect:NSMakeRect(0, 0, dstSize.width, dstSize.height)
fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[newImage unlockFocus];
[self setImage:newImage];
[newImage release];
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/PDFPage_SKExtensions.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -121,9 +121,9 @@
image = [[NSImage alloc] initWithSize:thumbnailSize];
[image lockFocus];
- [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
[NSGraphicsContext saveGraphicsState];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
[[NSColor whiteColor] set];
if (hasShadow) {
NSShadow *aShadow = [[NSShadow alloc] init];
@@ -138,6 +138,7 @@
pageRect.origin.x -= shadowOffset.width;
pageRect.origin.y -= shadowOffset.height;
NSRectFill(pageRect);
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
if (isScaled || hasShadow) {
Modified: trunk/SKPDFPage.m
===================================================================
--- trunk/SKPDFPage.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/SKPDFPage.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -81,6 +81,7 @@
[[self annotations]
makeObjectsPerformSelector:@selector(hideIfTemporary)];
[self drawWithBox:box];
[[self annotations]
makeObjectsPerformSelector:@selector(displayIfTemporary)];
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
}
return imageRep;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/SKPDFView.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -421,6 +421,7 @@
SKDrawGrabHandles(selectionRect, radius, 0);
}
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
}
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/SKSnapshotWindowController.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -414,6 +414,7 @@
}
bounds.origin = NSZeroPoint;
NSRectFill(bounds);
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[NSGraphicsContext restoreGraphicsState];
[imageRep drawInRect:bounds];
[image unlockFocus];
Modified: trunk/SKTextWithIconCell.m
===================================================================
--- trunk/SKTextWithIconCell.m 2010-12-16 12:29:08 UTC (rev 6982)
+++ trunk/SKTextWithIconCell.m 2010-12-17 11:18:53 UTC (rev 6983)
@@ -126,6 +126,7 @@
}
[img drawInRect:drawFrame fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0];
+ [ctxt setImageInterpolation:NSImageInterpolationDefault];
[ctxt restoreGraphicsState];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit