 
 private let RadiusMinimalThreshold: CGFloat = 20.0
 
+extension ItemAddingMapFilterView {
+    enum DrawingMode {
+        case inside
+        case outside
+    }
+}
+
 class ItemAddingMapFilterView: UIView {
-    fileprivate var _circleView: UIView
     fileprivate var _handlerView: UIView
     public var widthOfHandler: CGFloat = 20.0 {
         didSet {

        
        let size = CGSize(width: radius*2.0, height: radius*2.0)
        let origin = CGPoint(x: bounds.width * 0.5 - size.width * 0.5, y: bounds.height * 0.5 - size.height * 0.5)
        _circleView.frame = CGRect(origin: origin, size: size)
        _circleView.layer.cornerRadius = radius
        _circleView.layer.masksToBounds = true
        
        _handlerView.frame = CGRect(origin: .zero, size: CGSize(width: widthOfHandler, height: widthOfHandler))
        _handlerView.center = CGPoint(x: _circleView.center.x + _circleView.bounds.width * 0.5 - _circleView.layer.borderWidth * 0.5, y: _circleView.center.y)
        
        setNeedsDisplay()
    }

        // Drawing code
        super.draw(rect)
        guard let context = UIGraphicsGetCurrentContext() else { return }
        let _center = CGPoint(x: bounds.width * 0.5, y: bounds.height * 0.5)
        
        context.setFillColor(UIColor.application.blue.withAlphaComponent(0.15).cgColor)
        
        if drawingMode == .outside {
            let outterPath = CGPath(rect: bounds, transform: nil)
            context.addPath(outterPath)
            context.fillPath()
        }
        
        context.addArc(center: _center, radius: radius - 2.5, startAngle: 0.0, endAngle: CGFloat.pi * 2.0, clockwise: true)
        
        if drawingMode == .outside {
            context.setBlendMode(.clear)
        }
        context.fillPath()
        
        if drawingMode == .outside {
            context.setBlendMode(.normal)
        }
        
        context.beginPath()
        context.setLineWidth(5.0)
        context.setStrokeColor(UIColor.application.blue.cgColor)
        context.addArc(center: _center, radius: radius - 2.5, startAngle: 0.0, endAngle: CGFloat.pi * 2.0, clockwise: true)
        context.strokePath()
        
        context.beginPath()
        context.setLineWidth(1.0)
        context.setStrokeColor(UIColor.black.cgColor)
        context.setLineDash(phase: 2.0, lengths: [4.0, 2.0])
        context.setStrokeColor(UIColor.black.cgColor)
        context.move(to: _center)
        context.addLine(to: _handlerView.center)
        context.strokePath()
    }
