diff --git a/Source/IconMaker/AppIconRendererView.m b/Source/IconMaker/AppIconRendererView.m index 8e1b9598..5c07e9ca 100644 --- a/Source/IconMaker/AppIconRendererView.m +++ b/Source/IconMaker/AppIconRendererView.m @@ -49,16 +49,15 @@ // imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:frame.size.width pixelsHigh:frame.size.height bitsPerSample:8 samplesPerPixel:1 hasAlpha:NO isPlanar:NO colorSpaceName:NSDeviceWhiteColorSpace bytesPerRow:0 bitsPerPixel:0]; - NSRect bounds; - bounds.origin = NSZeroPoint; - bounds.size = frame.size; + NSRect bounds = [self bounds]; - - image = [[NSImage alloc] initWithSize:frame.size]; [image lockFocus]; - - + + [[NSColor blackColor] setFill]; + [NSBezierPath fillRect:bounds]; + + CIContext *imageContext = [[NSGraphicsContext currentContext] CIContext]; CIFilter *filter = [CIFilter filterWithName:@"CIRandomGenerator"]; diff --git a/Source/IconMaker/IconMakerAppDelegate.m b/Source/IconMaker/IconMakerAppDelegate.m index 83cce9fc..12daed47 100644 --- a/Source/IconMaker/IconMakerAppDelegate.m +++ b/Source/IconMaker/IconMakerAppDelegate.m @@ -95,16 +95,16 @@ [self makeIconForObject:iconRenderView size:NSMakeSize(16, 16) filename:@"/tmp/BopomofoTextMenu.tiff"]; [self makeIconForObject:iconRenderView size:NSMakeSize(32, 32) filename:@"/tmp/BopomofoTextMenu@2x.tiff"]; - [self makeIconForObject:iconRenderView size:NSMakeSize(16, 16) filename:@"/tmp/Bopomofo_16x16.tiff"]; - [self makeIconForObject:iconRenderView size:NSMakeSize(32, 32) filename:@"/tmp/Bopomofo_16x16@2x.tiff"]; - [self makeIconForObject:iconRenderView size:NSMakeSize(32, 32) filename:@"/tmp/Bopomofo_32x32.tiff"]; - [self makeIconForObject:iconRenderView size:NSMakeSize(64, 64) filename:@"/tmp/Bopomofo_32x32@2x.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(128, 128) filename:@"/tmp/Bopomofo_128x128.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(256, 256) filename:@"/tmp/Bopomofo_128x128@2x.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(256, 256) filename:@"/tmp/Bopomofo_256x256.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(512, 512) filename:@"/tmp/Bopomofo_256x256@2x.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(512, 512) filename:@"/tmp/Bopomofo_512x512.tiff"]; - [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(1024, 1024) filename:@"/tmp/Bopomofo_512x512@2x.tiff"]; + [self makeIconForObject:iconRenderView size:NSMakeSize(16, 16) filename:@"/tmp/icon_16x16.tiff"]; + [self makeIconForObject:iconRenderView size:NSMakeSize(32, 32) filename:@"/tmp/icon_16x16@2x.tiff"]; + [self makeIconForObject:iconRenderView size:NSMakeSize(32, 32) filename:@"/tmp/icon_32x32.tiff"]; + [self makeIconForObject:iconRenderView size:NSMakeSize(64, 64) filename:@"/tmp/icon_32x32@2x.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(128, 128) filename:@"/tmp/icon_128x128.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(256, 256) filename:@"/tmp/icon_128x128@2x.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(256, 256) filename:@"/tmp/icon_256x256.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(512, 512) filename:@"/tmp/icon_256x256@2x.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(512, 512) filename:@"/tmp/icon_512x512.tiff"]; + [self makeIconForObject:@"AppIconRendererView" size:NSMakeSize(1024, 1024) filename:@"/tmp/icon_512x512@2x.tiff"]; NSRunAlertPanel(@"Icons Generated", @"TIFF files are placed in /tmp", @"Dismiss", nil, nil); }