 		
 		UIGraphicsBeginImageContextWithOptions(self.bounds.size, false, 0.0)
 		if preRenderImage != nil {
-			preRenderImage.drawInRect(self.bounds)
+			preRenderImage.draw(in: self.bounds)
 		}
 		
 		bezierPath.lineWidth = lineWidth

	
	override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
		let touch: AnyObject? = touches.first
		lastPoint = touch!.locationInView(self)
		pointCounter = 0
	}
	
	override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) {
		let touch: AnyObject? = touches.first
		let newPoint = touch!.locationInView(self)
		
		bezierPath.moveToPoint(lastPoint)
		bezierPath.addLineToPoint(newPoint)
		lastPoint = newPoint
		
		pointCounter += 1

	
	// MARK: - Render
	
	override func draw(_ rect: CGRect) {
		super.draw(rect)
		
		if preRenderImage != nil {
			preRenderImage.draw(in: self.bounds)
		}
		
		bezierPath.lineWidth = lineWidth
