diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-05-25 21:05:40 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-05-25 21:05:40 +0000 |
commit | 69491c3dd52dffcb3fdbaffeffb63483fbd15088 (patch) | |
tree | 1e252f0d2df87be252f789540e639183d65bbfe5 /iPhone/GTMRoundedRectPath.h | |
parent | 6a112e24ac1ea05a7efe6af26e734445546ac7b8 (diff) |
[Author: dmaclach]
Makes the rounded rect calls fit the CG calling conventions.
R=thomasvl
Diffstat (limited to 'iPhone/GTMRoundedRectPath.h')
-rw-r--r-- | iPhone/GTMRoundedRectPath.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/iPhone/GTMRoundedRectPath.h b/iPhone/GTMRoundedRectPath.h index 1bc8a08..2b20fec 100644 --- a/iPhone/GTMRoundedRectPath.h +++ b/iPhone/GTMRoundedRectPath.h @@ -18,5 +18,31 @@ #import <CoreGraphics/CoreGraphics.h> +// Inscribe a round rectangle inside of rectangle |rect| with a corner radius +// of |radius| +// +// Args: +// rect: outer rectangle to inscribe into +// radius: radius of the corners. |radius| is clamped internally +// to be no larger than the smaller of half |rect|'s width or height +void GTMCGContextAddRoundRect(CGContextRef context, + CGRect rect, + CGFloat radius); + +// Adds a path which is a round rectangle inscribed inside of rectangle |rect| +// with a corner radius of |radius| +// +// Args: +// path: path to add the rounded rectangle to +// m: matrix modifying the round rect +// rect: outer rectangle to inscribe into +// radius: radius of the corners. |radius| is clamped internally +// to be no larger than the smaller of half |rect|'s width or height +void GTMCGPathAddRoundRect(CGMutablePathRef path, + const CGAffineTransform *m, + CGRect rect, + CGFloat radius); + // Allocates a new rounded corner rectangle path. +// DEPRECATED. Please use one of the above. CGPathRef GTMCreateRoundedRectPath(CGRect rect, CGFloat radius); |