Revision: 3621 http://skim-app.svn.sourceforge.net/skim-app/?rev=3621&view=rev Author: hofman Date: 2008-04-04 11:35:30 -0700 (Fri, 04 Apr 2008)
Log Message: ----------- Create array to hold line rects. Modified Paths: -------------- trunk/SKPDFAnnotationMarkup.m Modified: trunk/SKPDFAnnotationMarkup.m =================================================================== --- trunk/SKPDFAnnotationMarkup.m 2008-04-04 18:06:17 UTC (rev 3620) +++ trunk/SKPDFAnnotationMarkup.m 2008-04-04 18:35:30 UTC (rev 3621) @@ -232,6 +232,8 @@ } else { // start of a new line if (NSIsEmptyRect(lineRect) == NO) { + if (lineRects == NULL) + lineRects = CFArrayCreateMutable(NULL, 0, &SKNSRectArrayCallbacks); CFArrayAppendValue(lineRects, &lineRect); newBounds = NSUnionRect(lineRect, newBounds); } @@ -241,6 +243,8 @@ } } if (NSIsEmptyRect(lineRect) == NO) { + if (lineRects == NULL) + lineRects = CFArrayCreateMutable(NULL, 0, &SKNSRectArrayCallbacks); CFArrayAppendValue(lineRects, &lineRect); newBounds = NSUnionRect(lineRect, newBounds); } @@ -299,6 +303,11 @@ unsigned j, jMax = [quadPoints count] / 4; + if (lineRects == NULL) + lineRects = CFArrayCreateMutable(NULL, 0, &SKNSRectArrayCallbacks); + else + CFArrayRemoveAllValues(lineRects); + for (j = 0; j < jMax; j += 1) { NSRange range = NSMakeRange(4 * j, 4); 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