9.0
pict-copy: Copy Picts to the Clipboard
| (require pict-copy) | package: pict-copy |
This library provides a function for copying picts to the system clipboard.
Copies p to the system clipboard as a bitmap image.
Linux behavior: On Linux, the GUI clipboard requires an event loop to be running to respond to clipboard requests from other applications. This means using the GUI clipboard only works in environments like DrRacket.
By default on Linux, pict-copy uses external tools that work
reliably without an event loop:
On Wayland: wl-copy from the wl-clipboard package
On X11: xclip
If the required tool is not installed, an error is raised with installation instructions.
Set gui? to #t to force using the GUI clipboard (useful in DrRacket where an event loop is running).
Mac and Windows: The GUI clipboard is always used, and the gui? argument is ignored.
Example: