 
 // MARK: - Shape
 
-public extension UIBezierPath {
+public extension BezierPath {
     
     /// Add a shape at a location defined by `rect`.
     public func add(_ shape: Shape, at rect: CGRect) {
-        switch shape {
-        case .rect:
-            append(UIBezierPath(rect: rect))
-        case .oval:
-            append(UIBezierPath(ovalIn: rect))
-        case .roundedRect(let cornerRadius):
-            append(UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius))
-        }
+        #if os(iOS)
+            switch shape {
+            case .rect:
+                append(UIBezierPath(rect: rect))
+            case .oval:
+                append(UIBezierPath(ovalIn: rect))
+            case .roundedRect(let cornerRadius):
+                append(UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius))
+            }
+        #elseif os(OSX)
+            switch shape {
+            case .rect:
+                append(BezierPath(rect: rect))
+            case .oval:
+                append(BezierPath(ovalIn: rect))
+            case .roundedRect(let cornerRadius):
+                append(BezierPath(roundedRect: rect, xRadius: cornerRadius, yRadius: cornerRadius))
+            }
+        #endif
     }
     
     /// Add a rect with `origin` and `size`.


// 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 {
