Revision: 3283
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3283&view=rev
Author:   hofman
Date:     2007-11-30 02:36:13 -0800 (Fri, 30 Nov 2007)

Log Message:
-----------
Don't cache the path because it's a mutable object.

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

Modified: trunk/NSBezierPath_BDSKExtensions.m
===================================================================
--- trunk/NSBezierPath_BDSKExtensions.m 2007-11-29 18:38:20 UTC (rev 3282)
+++ trunk/NSBezierPath_BDSKExtensions.m 2007-11-30 10:36:13 UTC (rev 3283)
@@ -67,9 +67,7 @@
         return [self bezierPathWithRect:rect];
     
     NSRect innerRect = NSInsetRect(rect, radius, radius); // Make rect with 
corners being centers of the corner circles.
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
+    NSBezierPath *path = [self bezierPath];
     
     [path removeAllPoints];    
     
@@ -114,9 +112,7 @@
     
     NSRect ignored, innerRect;
     NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMinXEdge); // Make rect with corners being centers of the corner circles.
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
+    NSBezierPath *path = [self bezierPath];
     
     [path removeAllPoints];    
     
@@ -159,9 +155,7 @@
     
     NSRect ignored, innerRect;
     NSDivideRect(NSInsetRect(rect, 0.0, radius), &ignored, &innerRect, radius, 
NSMaxXEdge); // Make rect with corners being centers of the corner circles.
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
+    NSBezierPath *path = [self bezierPath];
     
     [path removeAllPoints];    
     
@@ -204,9 +198,7 @@
     
     NSRect ignored, innerRect;
     NSDivideRect(NSInsetRect(rect, radius, 0.0), &ignored, &innerRect, radius, 
NSMaxYEdge); // Make rect with corners being centers of the corner circles.
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
+    NSBezierPath *path = [self bezierPath];
     
     [path removeAllPoints];    
     
@@ -249,9 +241,7 @@
     
     NSRect ignored, innerRect;
     NSDivideRect(NSInsetRect(rect, radius, 0.0), &ignored, &innerRect, radius, 
NSMinYEdge); // Make rect with corners being centers of the corner circles.
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
+    NSBezierPath *path = [self bezierPath];
     
     [path removeAllPoints];    
     
@@ -296,11 +286,8 @@
 + (NSBezierPath *)bezierPathWithHorizontalOvalAroundRect:(NSRect)rect
 {
     float radius = 0.5f * rect.size.height;
+    NSBezierPath *path = [self bezierPath];
     
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
-    
     [path removeAllPoints];
     
     // Now draw our rectangle:
@@ -330,11 +317,8 @@
     float radiusX = 0.5 * NSWidth(rect);
     float radiusY = 0.5 * NSHeight(rect);
     int i = 0;
+    NSBezierPath *path = [self bezierPath];
     
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
-    
     [path removeAllPoints];
     
     [path moveToPoint: NSMakePoint(NSMidX(rect), NSMaxY(rect))];
@@ -351,11 +335,8 @@
     float radiusX = 0.5 * NSWidth(rect);
     float radiusY = 0.5 * NSHeight(rect);
     int i;
+    NSBezierPath *path = [self bezierPath];
     
-       static NSBezierPath *path = nil;
-    if(path == nil)
-        path = [[self bezierPath] retain];
-    
     [path removeAllPoints];
     
     [path moveToPoint:NSMakePoint(NSMidX(rect), NSMinY(rect))];


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

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to