     func text(_ text:String, _ p:NSPoint, rotationRadians:CGFloat?, font : NSFont = NSFont(name: "Monaco", size: 10)!, color color_ : ConvertibleToNSColor = NSColor.black) {
         
         let color = color_.color
-        
-        let attr = [
-            convertFromNSAttributedStringKey(NSAttributedString.Key.font):font,
-            convertFromNSAttributedStringKey(NSAttributedString.Key.foregroundColor):color
-        ]
         
         context.saveGraphicsState()
         

    }
    
    func save(_ path:String, open:Bool=false) {
        guard let data = bitmapImageRep.representation(using: .png, properties: convertToNSBitmapImageRepPropertyKeyDictionary([:])) else {
            print("\(#file) \(#function) cannot get PNG data from bitmap")
            return
        }

        let textRect : CGRect = text.boundingRect(
            with: maxSize,
            options: NSString.DrawingOptions.usesLineFragmentOrigin,
            attributes: [.font: font],
            context: nil)
        return textRect.size.width
    }
