diff options
Diffstat (limited to 'libs/FontLabel/FontLabelStringDrawing.h')
-rwxr-xr-x | libs/FontLabel/FontLabelStringDrawing.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libs/FontLabel/FontLabelStringDrawing.h b/libs/FontLabel/FontLabelStringDrawing.h new file mode 100755 index 0000000..821da22 --- /dev/null +++ b/libs/FontLabel/FontLabelStringDrawing.h | |||
@@ -0,0 +1,69 @@ | |||
1 | // | ||
2 | // FontLabelStringDrawing.h | ||
3 | // FontLabel | ||
4 | // | ||
5 | // Created by Kevin Ballard on 5/5/09. | ||
6 | // Copyright © 2009 Zynga Game Networks | ||
7 | // | ||
8 | // | ||
9 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
10 | // you may not use this file except in compliance with the License. | ||
11 | // You may obtain a copy of the License at | ||
12 | // | ||
13 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
14 | // | ||
15 | // Unless required by applicable law or agreed to in writing, software | ||
16 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
18 | // See the License for the specific language governing permissions and | ||
19 | // limitations under the License. | ||
20 | // | ||
21 | |||
22 | #import <UIKit/UIKit.h> | ||
23 | #import "ZAttributedString.h" | ||
24 | |||
25 | @class ZFont; | ||
26 | |||
27 | @interface NSString (FontLabelStringDrawing) | ||
28 | // CGFontRef-based methods | ||
29 | - (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; | ||
30 | - (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size __AVAILABILITY_INTERNAL_DEPRECATED; | ||
31 | - (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size | ||
32 | lineBreakMode:(UILineBreakMode)lineBreakMode __AVAILABILITY_INTERNAL_DEPRECATED; | ||
33 | - (CGSize)drawAtPoint:(CGPoint)point withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; | ||
34 | - (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; | ||
35 | - (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize | ||
36 | lineBreakMode:(UILineBreakMode)lineBreakMode __AVAILABILITY_INTERNAL_DEPRECATED; | ||
37 | - (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize | ||
38 | lineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment __AVAILABILITY_INTERNAL_DEPRECATED; | ||
39 | |||
40 | // ZFont-based methods | ||
41 | - (CGSize)sizeWithZFont:(ZFont *)font; | ||
42 | - (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size; | ||
43 | - (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode; | ||
44 | - (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode | ||
45 | numberOfLines:(NSUInteger)numberOfLines; | ||
46 | - (CGSize)drawAtPoint:(CGPoint)point withZFont:(ZFont *)font; | ||
47 | - (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode; | ||
48 | - (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font; | ||
49 | - (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode; | ||
50 | - (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode | ||
51 | alignment:(UITextAlignment)alignment; | ||
52 | - (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode | ||
53 | alignment:(UITextAlignment)alignment numberOfLines:(NSUInteger)numberOfLines; | ||
54 | @end | ||
55 | |||
56 | @interface ZAttributedString (ZAttributedStringDrawing) | ||
57 | - (CGSize)size; | ||
58 | - (CGSize)sizeConstrainedToSize:(CGSize)size; | ||
59 | - (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode; | ||
60 | - (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode | ||
61 | numberOfLines:(NSUInteger)numberOfLines; | ||
62 | - (CGSize)drawAtPoint:(CGPoint)point; | ||
63 | - (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width lineBreakMode:(UILineBreakMode)lineBreakMode; | ||
64 | - (CGSize)drawInRect:(CGRect)rect; | ||
65 | - (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode; | ||
66 | - (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment; | ||
67 | - (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment | ||
68 | numberOfLines:(NSUInteger)numberOfLines; | ||
69 | @end | ||