From 7063d76a007fbf636250d7199d6f24ec487163b1 Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Tue, 12 Aug 2008 17:21:32 +0000 Subject: - Added GTMNSMakeUncollectable for forcing objects to survive in a GC world. - Added GTMCFAutorelease to make the [GTMNSMakeCollectable(cfFoo) autorelease] simpler and clearer, it's now just GTMCFAutorelease(cfFoo), and works in both GC and non-GC world. - Added GTMIsGarbageCollectionEnabled to GTMGarbageCollection.h. See the note there for it's usage. - Disabled the unittests for things on top of NSAppleScript in a GC world since Apple has bugs and it can crash. See the unittest for a note about it. - GTMStackTrace now can figure out ObjC symbols. Downside it is now ObjC only. - GTMFourCharCode can now be used with NSAppleEventDescriptors easily. typeType, typeKeyword, typeApplSignature, and typeEnumerated all get turned into GTMFourCharCodes. - Fixed up crash in GTMLoggerRingBufferWriter when used with GC on. - Significant updates to GTMNSAppleScript+Handler allowing you to list all handlers and properties (including inherited) and cleans up several errors in how scripting was being handled. --- AppKit/GTMNSBezierPath+RoundRectTest.m | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'AppKit/GTMNSBezierPath+RoundRectTest.m') diff --git a/AppKit/GTMNSBezierPath+RoundRectTest.m b/AppKit/GTMNSBezierPath+RoundRectTest.m index ad64fd4..5bdf3a3 100644 --- a/AppKit/GTMNSBezierPath+RoundRectTest.m +++ b/AppKit/GTMNSBezierPath+RoundRectTest.m @@ -1,5 +1,5 @@ // -// NSBezierPath+RoundRectTest.m +// GTMNSBezierPath+RoundRectTest.m // // Copyright 2006-2008 Google Inc. // @@ -28,7 +28,7 @@ @implementation GTMNSBezierPath_RoundRectTest - (void)testRoundRects { - GTMAssertDrawingEqualToImageNamed(self, NSMakeSize(330, 430), + GTMAssertDrawingEqualToImageNamed(self, NSMakeSize(490, 430), @"GTMNSBezierPath+RoundRectTest", nil, nil); } @@ -39,7 +39,8 @@ NSMakeRect(50.0, 10.0, 30.0, 30.0), //Square Test NSMakeRect(100.0, 10.0, 1.0, 2.0), //Small Test NSMakeRect(120.0, 10.0, 15.0, 20.0), //Medium Test - NSMakeRect(140.0, 10.0, 150.0, 30.0) //Large Test + NSMakeRect(140.0, 10.0, 150.0, 30.0), //Large Test + NSMakeRect(300.0, 10.0, 150.0, 30.0) //Large Test 2 (for different radius) }; const NSUInteger theRectCount = sizeof(theRects) / sizeof(NSRect); @@ -50,8 +51,9 @@ for (i = 0; i < theLineWidthCount; ++i) { for (j = 0; j < theRectCount; ++j) { + CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 20.0 : 0.0 ); NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:20.0]; + cornerRadius:cornerRadius]; [roundRect setLineWidth: theLineWidths[i]]; [roundRect stroke]; CGFloat newWidth = 35.0; @@ -71,8 +73,9 @@ for (i = 0; i < theColorCount; ++i) { for (j = 0; j < theRectCount; ++j) { + CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 10.0 : 0.0 ); NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:10.0]; + cornerRadius:cornerRadius]; [theColors[i] setFill]; [roundRect fill]; theRects[j].origin.y += 35.0; @@ -85,8 +88,9 @@ for (i = 0; i < theFlatnessCount; i++) { for (j = 0; j < theRectCount; ++j) { + CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 6.0 : 0.0 ); NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:6.0]; + cornerRadius:cornerRadius]; [roundRect setFlatness:theFlatness[i]]; [roundRect stroke]; theRects[j].origin.y += 35.0; -- cgit v1.2.3