use built-in rounded corner rect on Leopard

This commit is contained in:
Mitchell Livingston 2007-10-29 11:49:53 +00:00
parent 1d636ec095
commit 7e8cbad592
1 changed files with 4 additions and 0 deletions

View File

@ -23,11 +23,15 @@
*****************************************************************************/
#import "NSBezierPathAdditions.h"
#import "NSApplicationAdditions.h"
@implementation NSBezierPath (NSBezierPathAdditions)
+ (NSBezierPath *) bezierPathWithRoundedRect: (NSRect) rect radius: (float) radius
{
if ([NSApp isOnLeopardOrBetter])
return [self bezierPathWithRoundedRect: rect xRadius: radius yRadius: radius];
float minX = NSMinX(rect),
minY = NSMinY(rect),
maxX = NSMaxX(rect),