         guard shape.boundary.isIntersect(extent) else { return }
         guard let mask = try? CGPathProcessorKernel.apply(withExtent: CGRect(shape.boundary.intersect(extent)), path: shape.cgPath, rule: rule) else { return }
         
-        let layer = CIImage(color: color).cropped(to: extent).applyingFilter("CIBlendWithMask", parameters: [kCIInputBackgroundImageKey: GPContext.clear.cropped(to: extent), kCIInputMaskImageKey: mask])
+        let layer = CIImage(color: color).applyingFilter("CIBlendWithMask", parameters: [kCIInputBackgroundImageKey: GPContext.clear, kCIInputMaskImageKey: mask])
         
         self.draw_layer(layer)
     }

    }
    
    public func clone() -> GPContext {
        let clone = GPContext(width: self.width, height: self.height, image: self.image)
        clone.state = self.state
        clone.styles = self.styles
        clone.graphicStateStack = self.graphicStateStack
        clone.next = self.next?.clone()
        return clone
    }
}

@available(macOS 10.13, iOS 11.0, tvOS 11.0, *)

    
    public let height: Int
    
    private var _image: CIImage
    
    fileprivate var state: GPContextState = GPContextState()
    
