Revision: 14581
http://sourceforge.net/p/skim-app/code/14581
Author: hofman
Date: 2024-10-25 16:49:59 +0000 (Fri, 25 Oct 2024)
Log Message:
-----------
Override drawWithBox: when supporting older OS versions
Modified Paths:
--------------
trunk/SkimNotes/SKNPDFAnnotationNote.m
Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-24 17:47:11 UTC (rev
14580)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-25 16:49:59 UTC (rev
14581)
@@ -175,6 +175,7 @@
[super drawWithBox:box inContext:context];
}
}
+
#else
- (void)setText:(NSAttributedString *)text {
@@ -269,8 +270,23 @@
#endif
}
+#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MIN_REQUIRED <
MAC_OS_X_VERSION_10_12
+
+- (void)drawWithBox:(PDFDisplayBox)box {
+ if ([self drawsImage] && [self hasAppearanceStream] == NO && [self image]
!= nil) {
+ [NSGraphicsContext saveGraphicsState];
+ [[self page] transformContextForBox:box];
+ [[self image] drawInRect:[self bounds]];
+ [NSGraphicsContext restoreGraphicsState];
+ } else {
+ [super drawWithBox:box];
+ }
+}
+
#endif
+#endif
+
@end
#if !defined(PDFKIT_PLATFORM_IOS) && (!defined(MAC_OS_X_VERSION_10_15) ||
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15)
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