+// YPDrawSignatureView is open source
 //
-//  YPDrawSignatureView.swift
-//  Draw a signature into an UIView
+// Copyright (c) 2014 - 2016 Yuppielabel and the project contributors
+// Available under the MIT license
 //
-//  Created by Geert-Jan Nilsen on 06/11/14.
-//  Copyright (c) 2014 Yuppielabel.com All rights reserved.
-//
+// See https://github.com/yuppielabel/YPDrawSignatureView/blob/master/LICENSE for license information
+// See https://github.com/yuppielabel/YPDrawSignatureView/blob/master/README.md for the list project contributors
 
 import UIKit
 

        }
    }
    
    // MARK: - Helpers
    
    // MARK: Clear the Signature View
    public func clearSignature() {
        self.path.removeAllPoints()
        self.setNeedsDisplay()
    }
    
    // MARK: Save the Signature as an UIImage
    public func getSignature() ->UIImage {
        UIGraphicsBeginImageContext(CGSizeMake(self.bounds.size.width, self.bounds.size.height))
        self.layer.renderInContext(UIGraphicsGetCurrentContext()!)
        let signature: UIImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return signature
    }
    
    // MARK: Save the Signature (cropped of outside white space) as a UIImage
    public func getSignatureCropped() ->UIImage {
        // Get the UIView full render
        let fullRender = getSignature()
        
        // Get a CGImage reference of the signature for just the bounds of the bezier path
        let imageRef: CGImageRef = CGImageCreateWithImageInRect(fullRender.CGImage, path.bounds)!
        
        // Create a UIImage with the cropped CGImage
        let signature = UIImage(CGImage: imageRef)

        }
    }
    
    @IBInspectable public var strokeColor = UIColor.blackColor() {
        didSet {
            self.strokeColor.setStroke()
        }
    }
    
    public var signatureBackgroundColor = UIColor.whiteColor() {
        didSet {
            self.backgroundColor = signatureBackgroundColor
        }
