Revision: 3578 http://skim-app.svn.sourceforge.net/skim-app/?rev=3578&view=rev Author: hofman Date: 2008-03-30 06:03:59 -0700 (Sun, 30 Mar 2008)
Log Message: ----------- read and write startPoint/endPoint in FDF file. Modified Paths: -------------- trunk/SKFDFParser.m trunk/SKPDFAnnotationNote.m Modified: trunk/SKFDFParser.m =================================================================== --- trunk/SKFDFParser.m 2008-03-29 17:48:59 UTC (rev 3577) +++ trunk/SKFDFParser.m 2008-03-30 13:03:59 UTC (rev 3578) @@ -263,6 +263,14 @@ [dictionary setObject:[NSNumber numberWithInt:startStyle] forKey:@"startLineStyle"]; } + if (CGPDFDictionaryGetArray(annot, "L", &array)) { + NSPoint p1, p2; + if (CGPDFArrayGetCount(array) == 4 && CGPDFArrayGetNumber(array, 0, &p1.x) && CGPDFArrayGetNumber(array, 1, &p1.y) && CGPDFArrayGetNumber(array, 2, &p2.x) && CGPDFArrayGetNumber(array, 3, &p2.y)) { + [dictionary setObject:NSStringFromPoint(p1) forKey:@"startPoint"]; + [dictionary setObject:NSStringFromPoint(p2) forKey:@"endPoint"]; + } + } + if (CGPDFDictionaryGetArray(annot, "QuadPoints", &array)) { size_t i, count = CGPDFArrayGetCount(array); if (count % 8 == 0) { Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2008-03-29 17:48:59 UTC (rev 3577) +++ trunk/SKPDFAnnotationNote.m 2008-03-30 13:03:59 UTC (rev 3578) @@ -1637,6 +1637,9 @@ break; } [fdfString appendString:@"]"]; + NSPoint startPoint = SKAddPoints([self startPoint], [self bounds].origin); + NSPoint endPoint = SKAddPoints([self endPoint], [self bounds].origin); + [fdfString appendFormat:@"/L[%f %f %f %f]", startPoint.x, startPoint.y, endPoint.x, endPoint.y]; return fdfString; } 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit