fix(brand): 放大状态与标题图标并更新应用图标标识
This commit is contained in:
@@ -91,6 +91,17 @@ func render(size: Int, template: Bool) throws -> NSBitmapImageRep {
|
||||
context.scaleBy(x: Double(pixels) / 1024, y: Double(pixels) / 1024)
|
||||
context.translateBy(x: 0, y: 1024)
|
||||
context.scaleBy(x: 1, y: -1)
|
||||
if template {
|
||||
// App artwork includes tile margins. A status glyph instead fills 17 of
|
||||
// its 18 points, with half a point for antialiasing on each edge.
|
||||
let bounds = orbit.path.copy(strokingWithWidth: 84, lineCap: .round, lineJoin: .round, miterLimit: 10).boundingBoxOfPath
|
||||
.union(wave.path.copy(strokingWithWidth: 46, lineCap: .round, lineJoin: .round, miterLimit: 10).boundingBoxOfPath)
|
||||
.union(dot)
|
||||
let fit = (1024 * 17.0 / 18.0) / max(bounds.width, bounds.height)
|
||||
context.translateBy(x: 512, y: 512)
|
||||
context.scaleBy(x: fit, y: fit)
|
||||
context.translateBy(x: -bounds.midX, y: -bounds.midY)
|
||||
}
|
||||
if !template {
|
||||
gradient(context, [0xffffff, 0xeeeae4], from: .zero, to: CGPoint(x: 307, y: 1024))
|
||||
}
|
||||
@@ -136,7 +147,7 @@ for scale in 1...3 {
|
||||
for size in [16, 32, 128, 256, 512] {
|
||||
for scale in 1...2 {
|
||||
try render(size: size * scale, template: false).representation(using: .png, properties: [:])!
|
||||
.write(to: assets.appendingPathComponent("AppIcon.appiconset/AppIcon-\(size)@\(scale)x.png"))
|
||||
.write(to: assets.appendingPathComponent("AppIconB1.appiconset/AppIcon-\(size)@\(scale)x.png"))
|
||||
}
|
||||
}
|
||||
print("Generated B1 SVG masters, 3 template scales and 10 AppIcon slots.")
|
||||
|
||||
Reference in New Issue
Block a user