Revision: 16239
http://sourceforge.net/p/skim-app/code/16239
Author: hofman
Date: 2026-05-07 16:53:28 +0000 (Thu, 07 May 2026)
Log Message:
-----------
take rotation into account for selection destination
Modified Paths:
--------------
trunk/PDFSelection_SKExtensions.m
Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m 2026-05-07 16:44:08 UTC (rev 16238)
+++ trunk/PDFSelection_SKExtensions.m 2026-05-07 16:53:28 UTC (rev 16239)
@@ -196,7 +196,25 @@
PDFPage *page = [self safeFirstPage];
if (page) {
NSRect bounds = [self boundsForPage:page];
- destination = [[PDFDestination alloc] initWithPage:page
atPoint:NSMakePoint(NSMinX(bounds), NSMaxY(bounds))];
+ NSPoint point;
+ switch ([page rotation]) {
+ case 0:
+ point = NSMakePoint(NSMinX(bounds), NSMaxY(bounds));
+ break;
+ case 90:
+ point = NSMakePoint(NSMinX(bounds), NSMinY(bounds));
+ break;
+ case 180:
+ point = NSMakePoint(NSMaxX(bounds), NSMinY(bounds));
+ break;
+ case 270:
+ point = NSMakePoint(NSMaxX(bounds), NSMaxY(bounds));
+ break;
+ default:
+ point = NSMakePoint(NSMinX(bounds), NSMaxY(bounds));
+ break;
+ }
+ destination = [[PDFDestination alloc] initWithPage:page atPoint:point];
}
return destination;
}
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