forked from danielkleinert/EFLaceView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Utils.h
17 lines (15 loc) · 752 Bytes
/
Utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import <Cocoa/Cocoa.h>
@interface NSBezierPath(RoundedRectangle)
/*
* Returns a closed bezier path describing a rectangle with curved corners
* The corner radius will be trimmed to not exceed half of the lesser rectangle dimension.
* <http://www.cocoadev.com/index.pl?RoundedRectangles>
*/
+ (NSBezierPath *)bezierPathWithRoundedRect:(NSRect) aRect radius:(float) radius;
+ (NSBezierPath*)bezierPathWithTopRoundedRect:(NSRect)aRect radius:(float)radius;
+ (NSBezierPath*)bezierPathWithBottomRoundedRect:(NSRect)aRect radius:(float)radius;
/* Fill a path with a gradient color - lighter at top, darker at bottom
* <http://www.wilshipley.com/blog/2005/07/pimp-my-code-part-3-gradient.html>
*/
- (void)gradientFillWithColor:(NSColor*)color;
@end