Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/Classes/NSStringAdditions.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations) (download)
Sat Sep 3 06:22:57 2011 UTC (12 years, 8 months ago) by toshinagata1964
File size: 981 byte(s)
initial import
1 //
2 // NSStringAdditions.m
3 //
4 // Created by Toshi Nagata on Sat Mar 20 2004.
5 //
6 /*
7 Copyright (c) 2004-2011 Toshi Nagata. All rights reserved.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation version 2 of the License.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 */
18
19 #import "NSStringAdditions.h"
20
21
22 @implementation NSString (MyStringAddition)
23
24 - (void)drawAtPoint: (NSPoint)aPoint withAttributes: (NSDictionary *)attribute clippingRect: (NSRect)aRect
25 {
26 NSRect rect;
27 rect.origin = aPoint;
28 rect.size = [self sizeWithAttributes: attribute];
29 if (NSIntersectsRect(rect, aRect))
30 [self drawAtPoint: aPoint withAttributes: attribute];
31 }
32
33 @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26