Revision: 14363
http://sourceforge.net/p/skim-app/code/14363
Author: hofman
Date: 2024-07-04 14:22:12 +0000 (Thu, 04 Jul 2024)
Log Message:
-----------
make sure new ancored note is inside page bounds
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2024-07-03 16:32:19 UTC (rev 14362)
+++ trunk/SKPDFView.m 2024-07-04 14:22:12 UTC (rev 14363)
@@ -2732,6 +2732,8 @@
break;
}
bounds.size = SKNPDFAnnotationNoteSize;
+ // Make sure it fits in the page
+ bounds = SKConstrainRect(bounds, pageBounds);
}
bounds = NSIntegralRect(bounds);
@@ -4427,10 +4429,10 @@
BOOL wantsBreak = isOption;
NSBezierPath *bezierPath = nil;
CGMutablePathRef cgPath = NULL;
- CGFloat scale = [self scaleFactor];
+ CGFloat scale = 1.0;//[self scaleFactor];
CAShapeLayer *layer = nil;
NSRect boxBounds = NSIntersectionRect([page boundsForBox:[self
displayBox]], [self convertRect:[self visibleContentRect] toPage:page]);
- CGAffineTransform t = CGAffineTransformMakeRotation(-M_PI_2 * [page
rotation] / 90.0);
+ CGAffineTransform t =
CGAffineTransformScale(CGAffineTransformMakeRotation(-M_PI_2 * [page rotation]
/ 90.0), self.scaleFactor, self.scaleFactor);
NSColor *tmpColor = pdfvFlags.presentationMode ? [[NSUserDefaults
standardUserDefaults] colorForKey:SKPresentationInkNoteColorKey] : nil;
layer = [CAShapeLayer layer];
// transform and place so that the path is in scaled page coordinates
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit