 
 extension PDFContext.Page {
     
-    fileprivate struct CurrentStyle {
-        
-        var color: String? = nil
-        var opacity: String? = nil
-    }
-    
     fileprivate var current_layer: PDFContext.Page {
         return next?.current_layer ?? self
     }

            context.commands += "/\(name) gs\n"
        }
        
        set_opacity(self.opacity)
        
        let shading = PDFShading(

        }
    }
    
    private func set_blendmode() {
        
        let context = current_page.current_layer
        
        let _mode: String
        
        switch self.blendMode {
        case .normal: _mode = "/Normal"
        case .multiply: _mode = "/Multiply"
        case .screen: _mode = "/Screen"
        case .overlay: _mode = "/Overlay"
        case .darken: _mode = "/Darken"
        case .lighten: _mode = "/Lighten"
        case .colorDodge: _mode = "/ColorDodge"
        case .colorBurn: _mode = "/ColorBurn"
        case .softLight: _mode = "/SoftLight"
        case .hardLight: _mode = "/HardLight"
        case .difference: _mode = "/Difference"
        case .exclusion: _mode = "/Exclusion"
        default: _mode = "/Normal"
        }
        
        let gstate = "/BM \(_mode)"
        if current_page.extGState[gstate] == nil {
            current_page.extGState[gstate] = "Gs\(current_page.extGState.count + 1)"
        }
        
        let _blend = current_page.extGState[gstate]!
        if context.currentStyle.blend != _blend {
            context.commands += "/\(_blend) gs\n"
            context.currentStyle.blend = _blend
        }
    }
    
    public func draw<C : ColorProtocol>(shape: Shape, winding: Shape.WindingRule, color: C) {
        
        let context = current_page.current_layer
        
        set_blendmode()
        set_opacity(color.opacity * self.opacity)
        
        let color = color.convert(to: current_page.colorSpace, intent: renderingIntent)
