Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/molokocacao/NSBezierPath+MCAdditions.m

Issue 107933006: Get rid of ui_cocoa_third_party_toolkits target from ui.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mark review Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // 1 //
2 // NSBezierPath+MCAdditions.m 2 // NSBezierPath+MCAdditions.m
3 // 3 //
4 // Created by Sean Patrick O'Brien on 4/1/08. 4 // Created by Sean Patrick O'Brien on 4/1/08.
5 // Copyright 2008 MolokoCacao. All rights reserved. 5 // Copyright 2008 MolokoCacao. All rights reserved.
6 // 6 //
7 7
8 #import "NSBezierPath+MCAdditions.h" 8 #import "NSBezierPath+MCAdditions.h"
9 9
10 #import "third_party/GTM/AppKit/GTMNSBezierPath+CGPath.h" 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+CGPath.h"
11 11
12 // remove/comment out this line of you don't want to use undocumented functions 12 // remove/comment out this line of you don't want to use undocumented functions
13 #define MCBEZIER_USE_PRIVATE_FUNCTION 13 #define MCBEZIER_USE_PRIVATE_FUNCTION
14 14
15 #ifdef MCBEZIER_USE_PRIVATE_FUNCTION 15 #ifdef MCBEZIER_USE_PRIVATE_FUNCTION
16 extern CGPathRef CGContextCopyPath(CGContextRef context); 16 extern CGPathRef CGContextCopyPath(CGContextRef context);
17 #endif 17 #endif
18 18
19 static void CGPathCallback(void *info, const CGPathElement *element) 19 static void CGPathCallback(void *info, const CGPathElement *element)
20 { 20 {
21 NSBezierPath *path = info; 21 NSBezierPath *path = info;
22 CGPoint *points = element->points; 22 CGPoint *points = element->points;
23 » 23
24 switch (element->type) { 24 switch (element->type) {
25 case kCGPathElementMoveToPoint: 25 case kCGPathElementMoveToPoint:
26 { 26 {
27 [path moveToPoint:NSMakePoint(points[0].x, points[0].y)] ; 27 [path moveToPoint:NSMakePoint(points[0].x, points[0].y)] ;
28 break; 28 break;
29 } 29 }
30 case kCGPathElementAddLineToPoint: 30 case kCGPathElementAddLineToPoint:
31 { 31 {
32 [path lineToPoint:NSMakePoint(points[0].x, points[0].y)] ; 32 [path lineToPoint:NSMakePoint(points[0].x, points[0].y)] ;
33 break; 33 break;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 /* Stroke the path. */ 182 /* Stroke the path. */
183 [self stroke]; 183 [self stroke];
184 184
185 /* Restore the previous graphics context. */ 185 /* Restore the previous graphics context. */
186 [thisContext restoreGraphicsState]; 186 [thisContext restoreGraphicsState];
187 [self setLineWidth:lineWidth]; 187 [self setLineWidth:lineWidth];
188 } 188 }
189 189
190 @end 190 @end
OLDNEW
« no previous file with comments | « third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp ('k') | third_party/molokocacao/molokocacao.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698