Revision: 6815
http://skim-app.svn.sourceforge.net/skim-app/?rev=6815&view=rev
Author: hofman
Date: 2010-09-17 23:29:31 +0000 (Fri, 17 Sep 2010)
Log Message:
-----------
support interiorColor for line notes
Modified Paths:
--------------
trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2010-09-17 22:59:16 UTC
(rev 6814)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2010-09-17 23:29:31 UTC
(rev 6815)
@@ -302,10 +302,12 @@
- (id)initSkimNoteWithProperties:(NSDictionary *)dict{
if (self = [super initSkimNoteWithProperties:dict]) {
Class stringClass = [NSString class];
+ Class colorClass = [NSColor class];
NSString *startPoint = [dict
objectForKey:SKNPDFAnnotationStartPointKey];
NSString *endPoint = [dict objectForKey:SKNPDFAnnotationEndPointKey];
NSNumber *startLineStyle = [dict
objectForKey:SKNPDFAnnotationStartLineStyleKey];
NSNumber *endLineStyle = [dict
objectForKey:SKNPDFAnnotationEndLineStyleKey];
+ NSColor *interiorColor = [dict
objectForKey:SKNPDFAnnotationInteriorColorKey];
if ([startPoint isKindOfClass:stringClass])
[self setStartPoint:NSPointFromString(startPoint)];
if ([endPoint isKindOfClass:stringClass])
@@ -314,6 +316,8 @@
[self setStartLineStyle:[startLineStyle intValue]];
if ([endLineStyle respondsToSelector:@selector(intValue)])
[self setEndLineStyle:[endLineStyle intValue]];
+ if ([interiorColor isKindOfClass:colorClass] && [self
respondsToSelector:@selector(setInteriorColor:)])
+ [self setInteriorColor:interiorColor];
}
return self;
}
@@ -324,6 +328,8 @@
[dict setValue:[NSNumber numberWithInt:[self endLineStyle]]
forKey:SKNPDFAnnotationEndLineStyleKey];
[dict setValue:NSStringFromPoint([self startPoint])
forKey:SKNPDFAnnotationStartPointKey];
[dict setValue:NSStringFromPoint([self endPoint])
forKey:SKNPDFAnnotationEndPointKey];
+ if ([self respondsToSelector:@selector(interiorColor)])
+ [dict setValue:[self interiorColor]
forKey:SKNPDFAnnotationInteriorColorKey];
return dict;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit