Revision: 14344
          http://sourceforge.net/p/skim-app/code/14344
Author:   hofman
Date:     2024-06-25 22:32:18 +0000 (Tue, 25 Jun 2024)
Log Message:
-----------
Ignore annotations for foreground box of page

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m
    trunk/SKPDFPage.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2024-06-25 17:04:04 UTC (rev 14343)
+++ trunk/PDFPage_SKExtensions.m        2024-06-25 22:32:18 UTC (rev 14344)
@@ -119,7 +119,10 @@
 
 // this will be cached in our custom subclass
 - (NSRect)foregroundRect {
+    BOOL displaysAnnotations = [self displaysAnnotations];
+    [self setDisplaysAnnotations:NO];
     NSBitmapImageRep *imageRep = [self 
newBitmapImageRepForBox:kPDFDisplayBoxMediaBox];
+    [self setDisplaysAnnotations:displaysAnnotations];
     NSRect bounds = [self boundsForBox:kPDFDisplayBoxMediaBox];
     NSRect foregroundRect = [imageRep foregroundRect];
     if (imageRep == nil) {

Modified: trunk/SKPDFPage.m
===================================================================
--- trunk/SKPDFPage.m   2024-06-25 17:04:04 UTC (rev 14343)
+++ trunk/SKPDFPage.m   2024-06-25 22:32:18 UTC (rev 14344)
@@ -94,18 +94,6 @@
     return annotations;
 }
 
-- (void)addAnnotation:(PDFAnnotation *)annotation {
-    if (NSContainsRect(foregroundRect, [annotation bounds]) == NO)
-        foregroundRect = NSZeroRect;
-    [super addAnnotation:annotation];
-}
-
-- (void)removeAnnotation:(PDFAnnotation *)annotation {
-    if (NSContainsRect(foregroundRect, [annotation bounds]) == NO)
-        foregroundRect = NSZeroRect;
-    [super removeAnnotation:annotation];
-}
-
 - (NSInteger)intrinsicRotation {
     if (intrinsicRotation == 0) {
         intrinsicRotation = [super intrinsicRotation] + 360;

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

Reply via email to