     public func clearClipBuffer(with value: Double = 1) {
         switch value {
         case 1: current_layer.state.clip = nil
-        case 0: current_layer.state.clip = GPContext.black.cropped(to: extent)
+        case 0: current_layer.state.clip = GPContext.black
         default:
             let color = CIColor(red: CGFloat(value), green: CGFloat(value), blue: CGFloat(value), alpha: 1)
-            current_layer.state.clip = CIImage(color: color).cropped(to: extent)
+            current_layer.state.clip = CIImage(color: color)
         }
     }
     

            let shadow_color = CIImage(color: shadowColor)
            let shadow = layer.applyingGaussianBlur(sigma: 0.5 * shadowBlur).transformed(by: .translate(x: shadowOffset.width, y: shadowOffset.height))
            
            let image = shadow_color.cropped(to: extent).applyingFilter("CIBlendWithAlphaMask", parameters: [kCIInputBackgroundImageKey: GPContext.clear.cropped(to: extent), kCIInputMaskImageKey: shadow])
            
            self.blend_layer(image)
        }

    public init(width: Int, height: Int) {
        self.width = width
        self.height = height
        self._image = GPContext.clear
    }
    
    private init(width: Int, height: Int, image: CIImage) {
        self.width = width
        self.height = height
        self._image = image
    }
}

