Revision: 13164
          http://sourceforge.net/p/skim-app/code/13164
Author:   hofman
Date:     2022-11-11 09:55:29 +0000 (Fri, 11 Nov 2022)
Log Message:
-----------
no need to draw selected ink note shadow in integral rect on page

Modified Paths:
--------------
    trunk/PDFAnnotationInk_SKExtensions.m

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2022-11-10 22:58:37 UTC (rev 
13163)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2022-11-11 09:55:29 UTC (rev 
13164)
@@ -267,10 +267,10 @@
 - (void)drawSelectionHighlightForView:(PDFView *)pdfView 
inContext:(CGContextRef)context {
     [super drawSelectionHighlightForView:pdfView inContext:context];
     if (NSIsEmptyRect([self bounds]) == NO && [self isSkimNote]) {
-        CGFloat scale = ceil(1.0 / [pdfView unitWidthOnPage:[self page]]);
-        NSRect b = [self bounds];
-        NSRect bounds = NSIntegralRect(b);
-        NSRect rect = NSMakeRect(0.0, 0.0, scale * NSWidth(bounds), scale * 
NSHeight(bounds));
+        CGFloat scale = 1.0 / [pdfView unitWidthOnPage:[self page]];
+        NSRect bounds = [self bounds];
+        NSRect rect = NSMakeRect(0.0, 0.0, ceil(scale * NSWidth(bounds)), 
ceil(scale * NSHeight(bounds)));
+        bounds.size = NSMakeSize(NSWidth(rect) / scale, NSHeight(rect) / 
scale);
         NSSize offset = NSZeroSize;
         switch ([[self page] rotation]) {
             case 0:   offset.height = -2.0; break;
@@ -283,7 +283,6 @@
         [image lockFocus];
         NSAffineTransform *transform = [NSAffineTransform transform];
         [transform scaleBy:scale];
-        [transform translateXBy:NSMinX(b) - NSMinX(bounds) yBy:NSMinY(b) - 
NSMinY(bounds)];
         [transform concat];
         NSBezierPath *path = [NSBezierPath bezierPath];
         for (NSBezierPath *aPath in [self paths])

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to