 				UIRectFill(temp)
 			}
 		}
+		
+//		[UIBezierPath bezierPathWithRoundedRect:imageView.bounds
+//			cornerRadius:10.0] addClip];
+		
+		
 		
 		var image: UIImage = UIGraphicsGetImageFromCurrentImageContext()
 		UIGraphicsEndImageContext()

//		var temp = (direction == .Horizontal ? CGRectMake(tempXPlace, 0, 1.0, self.frame.size.height) : CGRectMake(0, tempYPlace, self.frame.size.width, 1.0))
//		UIRectFill(temp)
		
		if direction == .Horizontal {
			for var x: Int = 0; x < Int(self.frame.size.width); ++x {
				UIColor(hue: CGFloat(CGFloat(x) / self.frame.size.width), saturation: 1.0, brightness: 1.0, alpha: 1.0).set()
				let temp = CGRectMake(CGFloat(x), 0, 1, self.frame.size.height)
				UIRectFill(temp)
			}
		}
		else {
			for var y: Int = 0; y < Int(self.frame.size.height); ++y {
				UIColor(hue: CGFloat(CGFloat(y) / self.frame.size.height), saturation: 1.0, brightness: 1.0, alpha: 1.0).set()
				let temp = CGRectMake(0, CGFloat(y), self.frame.size.width, 1)
				UIRectFill(temp)
			}
		}
		
		
		let radius = (direction == .Horizontal ? self.frame.size.height : self.frame.size.width)
		let circleRect = (direction == .Horizontal ? CGRectMake(currentSelectionX - radius * 0.5, 0, radius, radius) : CGRectMake(0, currentSelectionY - radius * 0.5, radius, radius))

	private var color: UIColor!
	private var currentSelectionY: CGFloat = 0.0
	private var currentSelectionX: CGFloat = 0.0
	private var hueImage: UIImage!
	private var roundedRectPath: UIBezierPath!
	
	// Initialization
