-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the rounding on °F/°C (who wants kelvin?) Weather cartridge should look a tad better
- Loading branch information
Showing
6 changed files
with
153 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Aerial/Source/Views/Layers/Weather/WindDirectionLayer.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// WindDirectionLayer.swift | ||
// Aerial | ||
// | ||
// Created by Guillaume Louel on 05/03/2021. | ||
// Copyright © 2021 Guillaume Louel. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import AVKit | ||
|
||
class WindDirectionLayer: CALayer { | ||
init(direction: CGFloat) { | ||
super.init() | ||
let imagePath = Bundle(for: PanelWindowController.self).path( | ||
forResource: "location.north", | ||
ofType: "pdf") | ||
|
||
let img = NSImage(contentsOfFile: imagePath!) | ||
frame.size.height = img!.size.height / 8 | ||
frame.size.width = img!.size.width / 8 | ||
contents = img | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} |
Binary file not shown.