Add project logo and use it for the app icon
- assets/logo.png (transparent) and assets/logo-256.png for the site and README - tools/make_icon.m builds the full-bleed iOS icon from the logo
This commit is contained in:
1 parent
30b961c923
commit
f5b1cc1a79
6 files changed
+13
-8
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
// Builds the 1024x1024 iOS app icon from the game's own 128 px icon (read from the local install).
|
||||
// The gear is scaled with high-quality interpolation onto an opaque dark background
|
||||
// (iOS app icons must be opaque).
|
||||
// Builds the 1024x1024 iOS app icon from the project logo (assets/logo.png, transparent).
|
||||
// The emblem is drawn with high-quality interpolation onto an opaque, full-bleed dark background:
|
||||
// iOS app icons must be opaque and square (the system applies the rounded mask).
|
||||
// Usage: make_icon SOURCE_PNG OUTPUT_PNG
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
|
||||
CGContextDrawRadialGradient(ctx, gradient, CGPointMake(size / 2.0, size * 0.55), 0,
|
||||
CGPointMake(size / 2.0, size / 2.0), size * 0.75, kCGGradientDrawsAfterEndLocation);
|
||||
CGContextSetInterpolationQuality(ctx, kCGInterpolationHigh);
|
||||
CGFloat inset = size * 0.12;
|
||||
CGFloat inset = size * 0.14; // keep the emblem clear of the mask's corners
|
||||
CGContextDrawImage(ctx, CGRectMake(inset, inset, size - 2 * inset, size - 2 * inset), gear);
|
||||
CGImageRef icon = CGBitmapContextCreateImage(ctx);
|
||||
CGImageDestinationRef dst = CGImageDestinationCreateWithURL((__bridge CFURLRef)[NSURL fileURLWithPath:@(argv[2])],
|
||||
|
||||
Reference in new issue
Block a user