 
 import Foundation
 
+#if os(iOS)
+    public typealias BezierPath = UIBezierPath
+#elseif os(OSX)
+    public typealias BezierPath = NSBezierPath
+#endif
+
 // MARK: Initialization
 
-public extension UIBezierPath {
+public extension BezierPath {
     
     /// Initialize a new bezier path using a closure.
-    convenience init(_ closure: (UIBezierPath) -> Void) {
+    convenience init(_ closure: (BezierPath) -> Void) {
         self.init()
         closure(self)
     }
     
     /// Create a new bezier path using a copy of an existing one and a closure.
-    static func make(_ path: UIBezierPath, _ closure: (UIBezierPath) -> Void) -> UIBezierPath {
-        let copy = path.copy() as! UIBezierPath
+    static func make(_ path: BezierPath, _ closure: (BezierPath) -> Void) -> BezierPath {
+        let copy = path.copy() as! BezierPath
         closure(copy)
         return copy
     }


// MARK: - Scale

public extension UIBezierPath {
    
    /// Scales the path horizontally by `sx` and vertically by `sy`.
    public func scale(sx: CGFloat, sy: CGFloat) {
        apply(CGAffineTransform(scaleX: sx, y: sy))
    }
    
    /// Scales the path along the specified `axis` by `ratio`.


// MARK: - Enums

public extension BezierPath {
    
    /// Specifies a path operation in a given direction.
    enum Direction {
