a68e461eb4
Now that the decision not to support colors on Linux has been made, we can replace the custom `Color` struct with simple typealiases for `NSColor` and `UIColor`. The same can’t be done for font, since we want to enable loading of a font from a path, for SPM packages.
20 lines
386 B
Swift
20 lines
386 B
Swift
/**
|
|
* Splash
|
|
* Copyright (c) John Sundell 2018
|
|
* MIT license - see LICENSE.md
|
|
*/
|
|
|
|
#if os(iOS)
|
|
import UIKit
|
|
public typealias Color = UIColor
|
|
#elseif os(macOS)
|
|
import Cocoa
|
|
public typealias Color = NSColor
|
|
#endif
|
|
|
|
internal extension Color {
|
|
convenience init(red: CGFloat, green: CGFloat, blue: CGFloat) {
|
|
self.init(red: red, green: green, blue: blue, alpha: 1)
|
|
}
|
|
}
|