File: programming/cocoa/UKDockableView.zip/UKDockableWindow/NSBezierPathRoundRects.m


//
//  NSBezierPathRoundRects.m
//  UKDockableWindow
//
//  Created by Uli Kusterer on Wed Feb 04 2004.
//  Based on code by John C. Randolph.
//  Copyright (c) 2004 M. Uli Kusterer. All rights reserved.
//
 
#import "NSBezierPathRoundRects.h"
// -----------------------------------------------------------------------------
//	bezierPathWithRoundRectInRect:radius:
//		This method adds the traditional Macintosh rounded-rectangle to
//		NSBezierPath's repertoire.
//
//	REVISIONS:
//		2004-02-04	witness	Created.
// -----------------------------------------------------------------------------
// Make sure radius doesn't exceed a maximum size to avoid artifacts:
// Make sure silly values simply lead to un-rounded corners:
// Now draw our rectangle:
// Make rect with corners being centers of the corner circles.
// Bottom left (origin):
// Bottom edge.
 
	// Bottom right:
// Right edge.
 
	// Top right:
// Top edge.
 
	// Top left:
// Implicitly causes left edge.
 

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.