Revision: 13326
http://sourceforge.net/p/skim-app/code/13326
Author: hofman
Date: 2023-03-01 17:58:54 +0000 (Wed, 01 Mar 2023)
Log Message:
-----------
PDFAnnotation class factory methods to create new Skim notes. Avoids calling
subclasses directly, and creating intermediate PDFAnnotation instances.
Replaces some custom initializers. Also make use of new initializer with type
string.
Modified Paths:
--------------
trunk/PDFAnnotationInk_SKExtensions.h
trunk/PDFAnnotationInk_SKExtensions.m
trunk/PDFAnnotationMarkup_SKExtensions.h
trunk/PDFAnnotationMarkup_SKExtensions.m
trunk/PDFAnnotation_SKExtensions.h
trunk/PDFAnnotation_SKExtensions.m
trunk/PDFPage_SKExtensions.m
trunk/SKMainDocument.m
trunk/SKMainWindowController.m
trunk/SKNotesDocument.m
trunk/SKPDFView.m
Modified: trunk/PDFAnnotationInk_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.h 2023-03-01 16:50:31 UTC (rev
13325)
+++ trunk/PDFAnnotationInk_SKExtensions.h 2023-03-01 17:58:54 UTC (rev
13326)
@@ -44,8 +44,6 @@
@interface PDFAnnotationInk (SKExtensions)
-- (id)initSkimNoteWithPaths:(NSArray *)paths;
-
- (CGFloat)pathInset;
- (NSArray *)bezierPaths;
Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m 2023-03-01 16:50:31 UTC (rev
13325)
+++ trunk/PDFAnnotationInk_SKExtensions.m 2023-03-01 17:58:54 UTC (rev
13326)
@@ -117,24 +117,6 @@
return self;
}
-- (id)initSkimNoteWithPaths:(NSArray *)paths {
- NSRect bounds = NSZeroRect;
- NSAffineTransform *transform = [NSAffineTransform transform];
- NSBezierPath *path;
-
- for (path in paths)
- bounds = NSUnionRect(bounds, [path nonEmptyBounds]);
- bounds = NSInsetRect(NSIntegralRect(bounds), -8.0, -8.0);
- [transform translateXBy:-NSMinX(bounds) yBy:-NSMinY(bounds)];
-
- self = [self initSkimNoteWithBounds:bounds];
- if (self) {
- for (path in paths)
- [self addBezierPath:[transform transformBezierPath:path]];
- }
- return self;
-}
-
- (CGFloat)pathInset {
NSRect bounds = NSZeroRect;
NSSize size = [self bounds].size;
Modified: trunk/PDFAnnotationMarkup_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.h 2023-03-01 16:50:31 UTC (rev
13325)
+++ trunk/PDFAnnotationMarkup_SKExtensions.h 2023-03-01 17:58:54 UTC (rev
13326)
@@ -45,8 +45,7 @@
@interface PDFAnnotationMarkup (SKExtensions)
-- (id)initSkimNoteWithSelection:(PDFSelection *)selection
markupType:(NSInteger)type;
-+ (NSArray *)SkimNotesAndPagesWithSelection:(PDFSelection *)selection
markupType:(NSInteger)type;
+- (id)initSkimNoteWithSelection:(PDFSelection *)selection forPage:(PDFPage
*)page forType:(NSString *)type;
- (PDFSelection *)selection;
Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m 2023-03-01 16:50:31 UTC (rev
13325)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m 2023-03-01 17:58:54 UTC (rev
13326)
@@ -151,24 +151,7 @@
return extraIvars;
}
-- (id)initSkimNoteWithBounds:(NSRect)bounds markupType:(NSInteger)type {
- self = [super initSkimNoteWithBounds:bounds];
- if (self) {
- [self setMarkupType:type];
-
- NSColor *color = [[self class] defaultSkimNoteColorForMarkupType:type];
- if (color)
- [self setColor:color];
- }
- return self;
-}
-
-- (id)initSkimNoteWithBounds:(NSRect)bounds {
- self = [self initSkimNoteWithBounds:bounds
markupType:kPDFMarkupTypeHighlight];
- return self;
-}
-
-- (id)initSkimNoteWithSelection:(PDFSelection *)selection forPage:(PDFPage
*)page markupType:(NSInteger)type {
+- (id)initSkimNoteWithSelection:(PDFSelection *)selection forPage:(PDFPage
*)page forType:(NSString *)type {
if (page == nil)
page = [selection safeFirstPage];
NSRect bounds = NSZeroRect;
@@ -188,7 +171,7 @@
[[self initWithBounds:NSZeroRect] release];
self = nil;
} else {
- self = [self initSkimNoteWithBounds:bounds markupType:type];
+ self = [self initSkimNoteWithBounds:bounds forType:type];
if (self) {
NSInteger lineAngle = [page lineDirectionAngle];
NSMutableArray *quadPoints = [[NSMutableArray alloc] init];
@@ -204,22 +187,6 @@
return self;
}
-- (id)initSkimNoteWithSelection:(PDFSelection *)selection
markupType:(NSInteger)type {
- return [self initSkimNoteWithSelection:selection forPage:nil
markupType:type];
-}
-
-+ (NSArray *)SkimNotesAndPagesWithSelection:(PDFSelection *)selection
markupType:(NSInteger)type {
- NSMutableArray *annotations = [NSMutableArray array];
- for (PDFPage *page in [selection pages]) {
- PDFAnnotation *annotation = [[self alloc]
initSkimNoteWithSelection:selection forPage:page markupType:type];
- if (annotation) {
- [annotations addObject:@[annotation, page]];
- [annotation release];
- }
- }
- return [annotations count] > 0 ? annotations : nil;
-}
-
- (NSString *)fdfString {
NSMutableString *fdfString = [[[super fdfString] mutableCopy] autorelease];
NSPoint point;
Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/PDFAnnotation_SKExtensions.h 2023-03-01 17:58:54 UTC (rev 13326)
@@ -56,6 +56,16 @@
@interface PDFAnnotation (SKExtensions) <NSPasteboardReading,
NSPasteboardWriting>
++ (PDFAnnotation *)newSkimNoteWithBounds:(NSRect)bounds forType:(NSString
*)type;
+
++ (PDFAnnotation *)newSkimNoteWithProperties:(NSDictionary *)dict;
+
++ (PDFAnnotation *)newSkimNoteWithPaths:(NSArray *)paths;
+
++ (PDFAnnotation *)newSkimNoteWithSelection:(PDFSelection *)selection
forType:(NSString *)type;
+
++ (NSArray *)SkimNotesAndPagesWithSelection:(PDFSelection *)selection
forType:(NSString *)type;
+
- (NSString *)fdfString;
- (NSUInteger)pageIndex;
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/PDFAnnotation_SKExtensions.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -149,6 +149,65 @@
return nil;
}
+static inline Class SKAnnotationClassForType(NSString *type) {
+ if ([type isEqualToString:SKNNoteString] || [type
isEqualToString:SKNTextString])
+ return [SKNPDFAnnotationNote class];
+ else if ([type isEqualToString:SKNFreeTextString])
+ return [PDFAnnotationFreeText class];
+ else if ([type isEqualToString:SKNCircleString])
+ return [PDFAnnotationCircle class];
+ else if ([type isEqualToString:SKNSquareString])
+ return [PDFAnnotationSquare class];
+ else if ([type isEqualToString:SKNHighlightString] || [type
isEqualToString:SKNMarkUpString] || [type isEqualToString:SKNUnderlineString]
|| [type isEqualToString:SKNStrikeOutString])
+ return [PDFAnnotationMarkup class];
+ else if ([type isEqualToString:SKNLineString])
+ return [PDFAnnotationLine class];
+ else if ([type isEqualToString:SKNInkString])
+ return [PDFAnnotationInk class];
+ else
+ return Nil;
+}
+
++ (PDFAnnotation *)newSkimNoteWithBounds:(NSRect)bounds forType:(NSString
*)type {
+ return [[SKAnnotationClassForType(type) alloc]
initSkimNoteWithBounds:bounds forType:type];
+}
+
++ (PDFAnnotation *)newSkimNoteWithProperties:(NSDictionary *)dict {
+ return [[SKAnnotationClassForType([dict
objectForKey:SKNPDFAnnotationTypeKey]) alloc] initSkimNoteWithProperties:dict];
+}
+
++ (PDFAnnotation *)newSkimNoteWithSelection:(PDFSelection *)selection
forType:(NSString *)type {
+ return [[PDFAnnotationMarkup alloc] initSkimNoteWithSelection:selection
forPage:nil forType:type];
+}
+
++ (NSArray *)SkimNotesAndPagesWithSelection:(PDFSelection *)selection
forType:(NSString *)type {
+ NSMutableArray *annotations = [NSMutableArray array];
+ for (PDFPage *page in [selection pages]) {
+ PDFAnnotation *annotation = [[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:selection forPage:page forType:type];
+ if (annotation) {
+ [annotations addObject:@[annotation, page]];
+ [annotation release];
+ }
+ }
+ return [annotations count] > 0 ? annotations : nil;
+}
+
++ (PDFAnnotation *)newSkimNoteWithPaths:(NSArray *)paths {
+ NSRect bounds = NSZeroRect;
+ NSAffineTransform *transform = [NSAffineTransform transform];
+ NSBezierPath *path;
+
+ for (path in paths)
+ bounds = NSUnionRect(bounds, [path nonEmptyBounds]);
+ bounds = NSInsetRect(NSIntegralRect(bounds), -8.0, -8.0);
+ [transform translateXBy:-NSMinX(bounds) yBy:-NSMinY(bounds)];
+
+ PDFAnnotation *annotation = [[PDFAnnotationInk alloc]
initSkimNoteWithBounds:bounds];
+ for (path in paths)
+ [(PDFAnnotationInk *)annotation addBezierPath:[transform
transformBezierPath:path]];
+ return annotation;
+}
+
- (NSString *)fdfString {
NSMutableString *fdfString = [NSMutableString string];
NSRect bounds = [self bounds];
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/PDFPage_SKExtensions.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -732,19 +732,12 @@
} else if ([type isEqualToString:SKNHighlightString] || [type
isEqualToString:SKNStrikeOutString] || [type isEqualToString:SKNUnderlineString
]) {
id selSpec = contentsValue ?: [[[[NSScriptCommand currentCommand]
arguments] objectForKey:@"KeyDictionary"]
objectForKey:SKPDFAnnotationSelectionSpecifierKey];
PDFSelection *selection = [selSpec isKindOfClass:[PDFSelection
class]] ? selSpec : selSpec ? [PDFSelection selectionWithSpecifier:selSpec] :
nil;
- NSInteger markupType = 0;
[props removeObjectForKey:SKPDFAnnotationSelectionSpecifierKey];
if (selSpec == nil) {
[[NSScriptCommand currentCommand]
setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
[[NSScriptCommand currentCommand] setScriptErrorString:@"New
markup notes need a selection."];
} else if (selection) {
- if ([type isEqualToString:SKNHighlightString])
- markupType = kPDFMarkupTypeHighlight;
- else if ([type isEqualToString:SKNUnderlineString])
- markupType = kPDFMarkupTypeUnderline;
- else if ([type isEqualToString:SKNStrikeOutString])
- markupType = kPDFMarkupTypeStrikeOut;
- annotation = [[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:selection markupType:markupType];
+ annotation = [PDFAnnotation newSkimNoteWithSelection:selection
forType:type];
if ([props
objectForKey:SKPDFAnnotationScriptingTextContentsKey] == nil)
[props setValue:[selection cleanedString]
forKey:SKPDFAnnotationScriptingTextContentsKey];
}
@@ -769,7 +762,7 @@
qdPoint.h = [[pt objectAtIndex:1] intValue];
point = SKNSPointFromQDPoint(qdPoint);
} else continue;
- [PDFAnnotationInk addPoint:point
toSkimNotesPath:path];
+ [PDFAnnotation addPoint:point
toSkimNotesPath:path];
}
if ([path elementCount] > 1)
[paths addObject:path];
@@ -776,7 +769,7 @@
[path release];
}
}
- annotation = [[PDFAnnotationInk alloc]
initSkimNoteWithPaths:paths];
+ annotation = [PDFAnnotation newSkimNoteWithPaths:paths];
[paths release];
}
} else {
@@ -787,16 +780,8 @@
bounds.size = SKNPDFAnnotationNoteSize;
bounds =
NSIntegralRect(SKRectFromCenterAndSize(SKIntegralPoint(SKCenterPoint([self
boundsForBox:kPDFDisplayBoxCropBox])), bounds.size));
- if ([type isEqualToString:SKNFreeTextString]) {
- annotation = [[PDFAnnotationFreeText alloc]
initSkimNoteWithBounds:bounds];
- } else if ([type isEqualToString:SKNNoteString]) {
- annotation = [[SKNPDFAnnotationNote alloc]
initSkimNoteWithBounds:bounds];
- } else if ([type isEqualToString:SKNCircleString]) {
- annotation = [[PDFAnnotationCircle alloc]
initSkimNoteWithBounds:bounds];
- } else if ([type isEqualToString:SKNSquareString]) {
- annotation = [[PDFAnnotationSquare alloc]
initSkimNoteWithBounds:bounds];
- } else if ([type isEqualToString:SKNLineString]) {
- annotation = [[PDFAnnotationLine alloc]
initSkimNoteWithBounds:bounds];
+ if ([[NSSet setWithObjects:SKNFreeTextString, SKNNoteString,
SKNCircleString, SKNSquareString, SKNLineString, nil] containsObject:type]) {
+ annotation = [PDFAnnotation newSkimNoteWithBounds:bounds
forType:type];
} else {
[[NSScriptCommand currentCommand]
setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
[[NSScriptCommand currentCommand] setScriptErrorString:@"New
notes need a type."];
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/SKMainDocument.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -1908,7 +1908,7 @@
NSMutableArray *copiedValue = [[NSMutableArray alloc] init];
for (PDFAnnotation *annotation in value) {
if ([annotation isMovable] && [[annotation page] document] ==
[self pdfDocument]) {
- PDFAnnotation *copiedAnnotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:[annotation SkimNoteProperties]];
+ PDFAnnotation *copiedAnnotation = [PDFAnnotation
newSkimNoteWithProperties:[annotation SkimNoteProperties]];
[copiedAnnotation registerUserName];
if ([copiedAnnotation respondsToSelector:@selector(setPage:)])
[copiedAnnotation performSelector:@selector(setPage:)
withObject:[annotation page]];
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/SKMainWindowController.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -1086,7 +1086,7 @@
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if ([[dict objectForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNWidgetString]) {
[widgetProperties addObject:dict];
- } else if ((annotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict])) {
+ } else if ((annotation = [PDFAnnotation
newSkimNoteWithProperties:dict])) {
// this is only to make sure markup annotations generate the
lineRects, for thread safety
[annotation boundsOrder];
NSUInteger pageIndex = [[dict
objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue];
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/SKNotesDocument.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -342,7 +342,7 @@
[pdfDocument setContainingDocument:self];
for (NSDictionary *dict in array) {
- PDFAnnotation *note = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict];
+ PDFAnnotation *note = [PDFAnnotation
newSkimNoteWithProperties:dict];
if (note == nil && [[dict objectForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNWidgetString]) {
switch ([[dict objectForKey:SKNPDFAnnotationWidgetTypeKey]
integerValue]) {
case kSKNPDFWidgetTypeText: note =
[PDFAnnotationTextWidget alloc]; break;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2023-03-01 16:50:31 UTC (rev 13325)
+++ trunk/SKPDFView.m 2023-03-01 17:58:54 UTC (rev 13326)
@@ -1432,7 +1432,7 @@
PDFAnnotation *newAnnotation = nil;
if (preferNote) {
- newAnnotation = [[[SKNPDFAnnotationNote alloc]
initSkimNoteWithBounds:bounds] autorelease];
+ newAnnotation = [[PDFAnnotation newSkimNoteWithBounds:bounds
forType:SKNNoteString] autorelease];
NSMutableAttributedString *attrString = nil;
if ([str isKindOfClass:[NSString class]])
attrString = [[[NSMutableAttributedString alloc]
initWithString:str] autorelease];
@@ -1445,7 +1445,7 @@
}
[(SKNPDFAnnotationNote *)newAnnotation setText:attrString];
} else {
- newAnnotation = [[[PDFAnnotationFreeText alloc]
initSkimNoteWithBounds:bounds] autorelease];
+ newAnnotation = [[PDFAnnotation newSkimNoteWithBounds:bounds
forType:SKNFreeTextString] autorelease];
[newAnnotation setString:str];
}
@@ -2587,30 +2587,35 @@
text = nil;
// Create annotation and add to page.
+ NSString *type = nil;
+ BOOL isMarkup = NO;
switch (annotationType) {
case SKFreeTextNote:
- newAnnotation = [[PDFAnnotationFreeText alloc]
initSkimNoteWithBounds:bounds];
+ type = SKNFreeTextString;
break;
case SKAnchoredNote:
- newAnnotation = [[SKNPDFAnnotationNote alloc]
initSkimNoteWithBounds:bounds];
+ type = SKNNoteString;
break;
case SKCircleNote:
- newAnnotation = [[PDFAnnotationCircle alloc]
initSkimNoteWithBounds:bounds];
+ type = SKNCircleString;
break;
case SKSquareNote:
- newAnnotation = [[PDFAnnotationSquare alloc]
initSkimNoteWithBounds:bounds];
+ type = SKNSquareString;
break;
case SKHighlightNote:
- newAnnotations = [PDFAnnotationMarkup
SkimNotesAndPagesWithSelection:selection markupType:kPDFMarkupTypeHighlight];
+ type = SKNHighlightString;
+ isMarkup = YES;
break;
case SKUnderlineNote:
- newAnnotations = [PDFAnnotationMarkup
SkimNotesAndPagesWithSelection:selection markupType:kPDFMarkupTypeUnderline];
+ type = SKNUnderlineString;
+ isMarkup = YES;
break;
case SKStrikeOutNote:
- newAnnotations = [PDFAnnotationMarkup
SkimNotesAndPagesWithSelection:selection markupType:kPDFMarkupTypeStrikeOut];
+ type = SKNStrikeOutString;
+ isMarkup = YES;
break;
case SKLineNote:
- newAnnotation = [[PDFAnnotationLine alloc]
initSkimNoteWithBounds:bounds];
+ type = SKNLineString;
break;
case SKInkNote:
// we need a drawn path to add an ink note
@@ -2617,10 +2622,15 @@
break;
}
- if ([newAnnotations count] == 1) {
- newAnnotation = [[[newAnnotations firstObject] firstObject] retain];
- page = [[newAnnotations firstObject] lastObject];
- newAnnotations = nil;
+ if (isMarkup) {
+ newAnnotations = [PDFAnnotation
SkimNotesAndPagesWithSelection:selection forType:type];
+ if ([newAnnotations count] == 1) {
+ newAnnotation = [[[newAnnotations firstObject] firstObject]
retain];
+ page = [[newAnnotations firstObject] lastObject];
+ newAnnotations = nil;
+ }
+ } else if (type) {
+ newAnnotation = [PDFAnnotation newSkimNoteWithBounds:bounds
forType:type];
}
if ([newAnnotations count] > 0) {
@@ -4327,7 +4337,7 @@
if ((modifiers & NSAlternateKeyMask) && [newCurrentAnnotation
isMovable] &&
[newCurrentAnnotation resizeHandleForPoint:point scaleFactor:[self
scaleFactor]] == 0) {
// select a new copy of the annotation
- PDFAnnotation *newAnnotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:[newCurrentAnnotation SkimNoteProperties]];
+ PDFAnnotation *newAnnotation = [PDFAnnotation
newSkimNoteWithProperties:[newCurrentAnnotation SkimNoteProperties]];
[newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Add Note",
@"Undo action name")];
@@ -4341,11 +4351,11 @@
} else if ((modifiers & NSShiftKeyMask) && currentAnnotation !=
newCurrentAnnotation && [[currentAnnotation page] isEqual:[newCurrentAnnotation
page]] && [[currentAnnotation type] isEqualToString:[newCurrentAnnotation
type]]) {
PDFAnnotation *newAnnotation = nil;
if ([currentAnnotation isMarkup]) {
- NSInteger markupType = [(PDFAnnotationMarkup
*)currentAnnotation markupType];
+ NSString *type = [currentAnnotation type];
PDFSelection *sel = [(PDFAnnotationMarkup *)currentAnnotation
selection];
[sel addSelection:[(PDFAnnotationMarkup *)newCurrentAnnotation
selection]];
- newAnnotation = [[[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:sel markupType:markupType] autorelease];
+ newAnnotation = [[PDFAnnotation newSkimNoteWithSelection:sel
forType:type] autorelease];
[newAnnotation setString:[sel cleanedString]];
} else if ([currentAnnotation isInk]) {
NSMutableArray *paths = [[(PDFAnnotationInk
*)currentAnnotation pagePaths] mutableCopy];
@@ -4353,7 +4363,7 @@
NSString *string1 = [currentAnnotation string];
NSString *string2 = [newCurrentAnnotation string];
- newAnnotation = [[[PDFAnnotationInk alloc]
initSkimNoteWithPaths:paths] autorelease];
+ newAnnotation = [[PDFAnnotation newSkimNoteWithPaths:paths]
autorelease];
[newAnnotation setString:[string2 length] == 0 ? string1 :
[string1 length] == 0 ? string2 : [NSString stringWithFormat:@"%@ %@", string1,
string2]];
[newAnnotation setBorder:[currentAnnotation border]];
@@ -4444,7 +4454,7 @@
bezierPath = [NSBezierPath bezierPath];
[bezierPath moveToPoint:point];
} else if (wantsBreak && NO == NSEqualPoints(point, [bezierPath
associatedPointForElementAtIndex:[bezierPath elementCount] - 2])) {
- [PDFAnnotationInk addPoint:point toSkimNotesPath:bezierPath];
+ [PDFAnnotation addPoint:point toSkimNotesPath:bezierPath];
}
point = [self convertPoint:[theEvent locationInView:self]
toPage:page];
@@ -4459,7 +4469,7 @@
}
[bezierPath setAssociatedPoints:points atIndex:eltCount - 1];
} else {
- [PDFAnnotationInk addPoint:point toSkimNotesPath:bezierPath];
+ [PDFAnnotation addPoint:point toSkimNotesPath:bezierPath];
}
wasOption = isOption;
@@ -4485,7 +4495,7 @@
[paths addObjectsFromArray:[(PDFAnnotationInk *)currentAnnotation
pagePaths]];
[paths addObject:bezierPath];
- PDFAnnotationInk *annotation = [[PDFAnnotationInk alloc]
initSkimNoteWithPaths:paths];
+ PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithPaths:paths];
if (currentAnnotation) {
[annotation setColor:[currentAnnotation color]];
[annotation setBorder:[currentAnnotation border]];
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