Revision: 4091
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4091&view=rev
Author:   hofman
Date:     2008-06-28 05:56:46 -0700 (Sat, 28 Jun 2008)

Log Message:
-----------
Implement initializing of line note setting default properties

Modified Paths:
--------------
    trunk/PDFAnnotationLine_SKExtensions.m

Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m      2008-06-28 12:42:48 UTC (rev 
4090)
+++ trunk/PDFAnnotationLine_SKExtensions.m      2008-06-28 12:56:46 UTC (rev 
4091)
@@ -80,6 +80,23 @@
 
 @implementation PDFAnnotationLine (SKExtensions)
 
+- (id)initSkimNoteWithBounds:(NSRect)bounds {   
+    if (self = [super initSkimNoteWithBounds:bounds]) {         
+        [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKLineNoteColorKey]];         
+        [self setStartLineStyle:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteStartLineStyleKey]];     
+        [self setEndLineStyle:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteEndLineStyleKey]];         
+        [self setStartPoint:NSMakePoint(0.0, 0.0)];     
+        [self setEndPoint:NSMakePoint(NSWidth(bounds), NSHeight(bounds))];     
 
+        PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];      
 
+        [border setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineWidthKey]];       
+        [border setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKLineNoteDashPatternKey]];   
+        [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineStyleKey]];   
+        [self setBorder:[border lineWidth] > 0.0 ? border : nil];       
+        [border release];       
+    }   
+    return self;        
+}       
+
 - (NSString *)fdfString {
     NSMutableString *fdfString = [[[super fdfString] mutableCopy] autorelease];
     [fdfString appendFDFName:SKFDFAnnotationLineStylesKey];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to