         
         var source = source.cropped(to: bound)
         
-        if let clip = self.clip {
+        if let clip = current.clip {
             source = source.applyingFilter("CIBlendWithMask", parameters: ["inputBackgroundImage": CIImage.empty(), "inputMaskImage": clip])
             source = source.cropped(to: bound)
         }
         
         if let shadow = create_shadow(source) {
-            self._blend(shadow)
-        }
-        
-        self._blend(source)
+            current._blend(shadow)
+        }
+        
+        current._blend(source)
     }
     
     private func _blend(_ source: CIImage) {

extension DCIContext {
    
    @available(OSX 10.14, iOS 12.0, tvOS 12.0, *)
    public func insertingIntermediate(cache: Bool) {
        self.image = self.image.insertingIntermediate(cache: cache)
    }
    
    private var isShadow: Bool {

    }
    
    public func setClip(image: CIImage, transform: SDTransform) {
        current.clip = image.transformed(by: CGAffineTransform(transform * self.transform)).composited(over: CIImage(color: .black)).cropped(to: bound)
    }
}

