diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-03-16 14:30:25 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-03-16 14:30:25 +0000 |
commit | 1c1c70beb8fcba6bbcb3f6ca58215e646dca7888 (patch) | |
tree | e1c780c73efa2e6b439adb039da774d4730eb91b /AppKit/GTMNSBezierPath+RoundRect.h | |
parent | f14883b92b7df63f9b7c368d138a551c75c8c977 (diff) |
[Author: avi]
Add ability to create rounded rects with different radii for different corners.
R=dmaclach
Diffstat (limited to 'AppKit/GTMNSBezierPath+RoundRect.h')
-rw-r--r-- | AppKit/GTMNSBezierPath+RoundRect.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/AppKit/GTMNSBezierPath+RoundRect.h b/AppKit/GTMNSBezierPath+RoundRect.h index b0b48de..25f4605 100644 --- a/AppKit/GTMNSBezierPath+RoundRect.h +++ b/AppKit/GTMNSBezierPath+RoundRect.h @@ -37,6 +37,20 @@ + (NSBezierPath *)gtm_bezierPathWithRoundRect:(NSRect)rect cornerRadius:(CGFloat)radius; +/// Inscribe a round rectangle inside of rectangle |rect| with corner radii specified +// +// Args: +// rect: outer rectangle to inscribe into +// radius*: radii of the corners +// +// Returns: +// Auto released NSBezierPath ++ (NSBezierPath *)gtm_bezierPathWithRoundRect:(NSRect)rect + topLeftCornerRadius:(CGFloat)radiusTL + topRightCornerRadius:(CGFloat)radiusTR + bottomLeftCornerRadius:(CGFloat)radiusBL + bottomRightCornerRadius:(CGFloat)radiusBR; + /// Adds a path which is a round rectangle inscribed inside of rectangle |rect| with a corner radius of |radius| // // Args: @@ -45,4 +59,15 @@ // to be no larger than the smaller of half |rect|'s width or height - (void)gtm_appendBezierPathWithRoundRect:(NSRect)rect cornerRadius:(CGFloat)radius; + +/// Adds a path which is a round rectangle inscribed inside of rectangle |rect| with a corner radii specified +// +// Args: +// rect: outer rectangle to inscribe into +// radius*: radii of the corners +- (void)gtm_appendBezierPathWithRoundRect:(NSRect)rect + topLeftCornerRadius:(CGFloat)radiusTL + topRightCornerRadius:(CGFloat)radiusTR + bottomLeftCornerRadius:(CGFloat)radiusBL + bottomRightCornerRadius:(CGFloat)radiusBR; @end |