Revision: 16618
          http://sourceforge.net/p/skim-app/code/16618
Author:   hofman
Date:     2026-10-06 17:17:45 +0000 (Tue, 06 Oct 2026)
Log Message:
-----------
replace convenience method with inline code

Modified Paths:
--------------
    trunk/NSBezierPath_SKExtensions.h
    trunk/NSBezierPath_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.m

Modified: trunk/NSBezierPath_SKExtensions.h
===================================================================
--- trunk/NSBezierPath_SKExtensions.h   2026-10-06 17:10:51 UTC (rev 16617)
+++ trunk/NSBezierPath_SKExtensions.h   2026-10-06 17:17:45 UTC (rev 16618)
@@ -45,8 +45,6 @@
 
 @property (nonatomic, readonly) NSRect nonEmptyBounds;
 
-- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex;
-
 - (void)addToCGPath:(CGMutablePathRef)path transform:(const CGAffineTransform 
* __nullable)m;
 
 - (void)halfEllipseFromPoint:(NSPoint)halfwayPoint toPoint:(NSPoint)endPoint;

Modified: trunk/NSBezierPath_SKExtensions.m
===================================================================
--- trunk/NSBezierPath_SKExtensions.m   2026-10-06 17:10:51 UTC (rev 16617)
+++ trunk/NSBezierPath_SKExtensions.m   2026-10-06 17:17:45 UTC (rev 16618)
@@ -63,14 +63,6 @@
     [self setLineDash:pattern count:count phase:0];
 }
 
-- (NSPoint)associatedPointForElementAtIndex:(NSUInteger)anIndex {
-    NSPoint points[3];
-    if (NSCurveToBezierPathElement == [self elementAtIndex:anIndex 
associatedPoints:points])
-        return points[2];
-    else
-        return points[0];
-}
-
 - (NSRect)nonEmptyBounds {
     NSRect bounds = [self bounds];
     if (NSIsEmptyRect(bounds) && [self elementCount]) {
@@ -77,7 +69,8 @@
         NSPoint point, minPoint = NSZeroPoint, maxPoint = NSZeroPoint;
         NSUInteger i, count = [self elementCount];
         for (i = 0; i < count; i++) {
-            point = [self associatedPointForElementAtIndex:i];
+            NSPoint p[3];
+            point = NSCurveToBezierPathElement == [self elementAtIndex:i 
associatedPoints:p] ? p[2] : p[0];
             if (i == 0) {
                 minPoint = maxPoint = point;
             } else {

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2026-10-06 17:10:51 UTC (rev 16617)
+++ trunk/PDFAnnotation_SKExtensions.m  2026-10-06 17:17:45 UTC (rev 16618)
@@ -511,7 +511,8 @@
             iMax = [path elementCount];
             [fdfString appendString:@"["];
             for (i = 0; i < iMax; i++) {
-                point = [path associatedPointForElementAtIndex:i];
+                NSPoint p[3];
+                point = NSCurveToBezierPathElement == [path elementAtIndex:i 
associatedPoints:p] ? p[2] : p[0];
                 [fdfString appendFormat:@"%g %g ", point.x + NSMinX(bounds), 
point.y + NSMinY(bounds)];
             }
             [fdfString appendString:@"]"];
@@ -1643,7 +1644,8 @@
             iMax = [path elementCount];
             pointValues = [[NSMutableArray alloc] initWithCapacity:iMax];
             for (i = 0; i < iMax; i++) {
-                point = [path associatedPointForElementAtIndex:i];
+                NSPoint p[3];
+                point = NSCurveToBezierPathElement == [path elementAtIndex:i 
associatedPoints:p] ? p[2] : p[0];
                 [pointValues addObject:[NSData 
dataWithPointAsNSPoint:SKAddPoints(point, origin)]];
             }
             [pointLists addObject:pointValues];

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

Reply via email to