Revision: 7240
http://skim-app.svn.sourceforge.net/skim-app/?rev=7240&view=rev
Author: hofman
Date: 2011-05-16 11:12:20 +0000 (Mon, 16 May 2011)
Log Message:
-----------
draw sync point over selection
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2011-05-16 09:37:50 UTC (rev 7239)
+++ trunk/SKPDFView.m 2011-05-16 11:12:20 UTC (rev 7240)
@@ -435,8 +435,22 @@
SKDrawGrabHandles(selectionRect, radius, 0);
}
+ [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
+ [NSGraphicsContext restoreGraphicsState];
+}
+
+- (void)drawPagePost:(PDFPage *)pdfPage {
+ [super drawPagePost:pdfPage];
+
if (syncPageIndex == [pdfPage pageIndex]) {
[NSGraphicsContext saveGraphicsState];
+
+ NSRect rect = [self convertRect:[self convertRect:[pdfPage
boundsForBox:kPDFDisplayBoxMediaBox] fromPage:pdfPage] toView:[self
documentView]];
+ NSAffineTransform *transform = [NSAffineTransform transform];
+ [transform translateXBy:NSMinX(rect) yBy:NSMinY(rect)];
+ [transform concat];
+ [pdfPage transformContextForBox:[self displayBox]];
+
CGFloat s = 6.0;
if (syncPhase < 1.0) {
s += 8.0 * sin(syncPhase * M_PI);
@@ -447,13 +461,13 @@
} else {
CGContextSetBlendMode([[NSGraphicsContext currentContext]
graphicsPort], kCGBlendModeMultiply);
}
- [[NSColor colorWithCalibratedRed:1.0 green:0.0 blue:0.0 alpha:1.0]
setFill];
- [[NSBezierPath
bezierPathWithOvalInRect:SKRectFromCenterAndSize(syncPoint, NSMakeSize(s, s))]
fill];
+
+ [[NSColor redColor] setFill];
+ [[NSBezierPath
bezierPathWithOvalInRect:SKRectFromCenterAndSize(syncPoint,
SKMakeSquareSize(s))] fill];
+
[NSGraphicsContext restoreGraphicsState];
}
- [[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
- [NSGraphicsContext restoreGraphicsState];
}
- (void)setNeedsDisplayInRect:(NSRect)rect ofPage:(PDFPage *)page {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit