Revision: 14582
http://sourceforge.net/p/skim-app/code/14582
Author: hofman
Date: 2024-10-25 17:37:01 +0000 (Fri, 25 Oct 2024)
Log Message:
-----------
Set subtype of anchored note that draws its image to Stamp, Text does not draw
properly and changes the bounds to a small square when writing PDF data
Modified Paths:
--------------
trunk/SkimNotes/SKNPDFAnnotationNote.m
Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-25 16:49:59 UTC (rev
14581)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m 2024-10-25 17:37:01 UTC (rev
14582)
@@ -64,6 +64,7 @@
#if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_12
@interface PDFAnnotation (SKNSierraDeclarations)
- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context;
+- (void)setValue:(id)value forAnnotationKey:(NSString *)key;
@end
@interface PDFPage (SKNSierraDeclarations)
- (void)transformContext:(CGContextRef)context forBox:(PDFDisplayBox)box;
@@ -145,6 +146,15 @@
return SKNNoteString;
}
+- (void)setDrawsImage:(BOOL)drawsImage {
+ if (drawsImage != _drawsImage) {
+ _drawsImage = drawsImage;
+ if ([self respondsToSelector:@selector(setValue:forAnnotationKey:)]) {
+ [self setValue:_drawsImage ? @"/Stamp" : @"/Text"
forAnnotationKey:@"/Subtype"];
+ }
+ }
+}
+
- (void)setString:(NSString *)string {
if (_string != string) {
_string = [string copy];
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