Update IconMaker.

This commit is contained in:
Lukhnos Liu 2012-09-12 09:34:42 -07:00
parent 404bde168d
commit 181b9894e6
2 changed files with 16 additions and 17 deletions

View File

@ -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"];

View File

@ -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);
}