Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 23 lines (19 sloc) 1.014 kB
d6a2787 @Cocoanetics Added new files
authored
1 //
2 // CGUtils.h
3 // CoreTextExtensions
4 //
5 // Created by Oliver Drobnik on 1/16/11.
6 // Copyright 2011 Drobnik.com. All rights reserved.
7 //
8
cfd362b @joepasq Added documentation for CGUtils.h, NSString+CSS.h, UIDevice+DTVersion.h.
joepasq authored
9 //see implementation file for note on deprecation
1bf64de @Cocoanetics replaced own rounded rect with UIBezierPath
authored
10 //CGPathRef newPathForRoundedRect(CGRect rect, CGFloat cornerRadius, BOOL roundTopCorners, BOOL roundBottomCorners);
cfd362b @joepasq Added documentation for CGUtils.h, NSString+CSS.h, UIDevice+DTVersion.h.
joepasq authored
11
baedb79 @Cocoanetics updated comments
authored
12 /**
13 Determines the new zoom only computing if the sizeToFit is smaller than the originalSize. The zoom scale is computed by whichever resizing scale along the X or Y is smaller preserving the aspect ratio by respecting the axis with more room. The new size is then computed by multipliying the originalSize by that zoom scale.
14 @returns New size that fits the sizeToFit while still preserving the aspect ratio of the originalSize.
15 */
c54be85 @Cocoanetics Modifications to avoid conflict with DTFoundation
authored
16 CGSize sizeThatFitsKeepingAspectRatio2(CGSize originalSize, CGSize sizeToFit);
cfd362b @joepasq Added documentation for CGUtils.h, NSString+CSS.h, UIDevice+DTVersion.h.
joepasq authored
17
baedb79 @Cocoanetics updated comments
authored
18 /**
19 Convenience method to find the center of a CGRect. Uses CGRectGetMidX and CGRectGetMidY.
20 @returns The point which is the center of rect.
21 */
3021ccc @Cocoanetics faster way to find glyph next to point
authored
22 CGPoint CGRectCenter(CGRect rect);
Something went wrong with that request. Please try again.