         drawButton.state = drawingView.isHidden == false ? .on : .off
     }
     
-    func copyText() {
+    func copyContent() {
         if drawingView.isHidden == false {
             
-            if let texture = skview?.texture(from: drawingScene!) {
-                let img2 = texture.cgImage()
-                let image = NSImage(cgImage: img2, size: drawingScene!.size)
+            if let image = imageFromScene() {
                 NSPasteboard.general.clearContents()
                 NSPasteboard.general.writeObjects([image])
             }

        let pasteboard = NSPasteboard.general
        pasteboard.declareTypes([NSPasteboard.PasteboardType.string], owner: nil)
        pasteboard.setString(textView.string, forType: NSPasteboard.PasteboardType.string)
    }
    
    @objc fileprivate func setupTextView() {

    }
    
    @IBAction func shareAction(_ sender: NSButton) {
        var sharedItems = [Any]()
        
        if drawingView.isHidden == false {
            if let image = imageFromScene() {
                sharedItems = [image]
            }
        }
        else {
            sharedItems = [textView.string];
        }
        
        let servicePicker = NSSharingServicePicker(items: sharedItems)
        servicePicker.delegate = self
