manolo gouy wrote:
> Now we have our new Fl_Device class, I propose to add the new class
> Fl_Clipboard_Writer that would direct graphics requests to the
> clipboard (or pasteboard in Mac OS parlance). This would allow
> to copy to the clipboard any widget or any series of FLTK graphics
> requests. I have that already in my app for Mac and MSWindows,
> so it could be done rapidly.
> 
> The big question mark is what to do for the X11 platform?
> Our PostScript backend allows the generation of encapsulated
> PostScript. Is putting eps in the clipboard a pertinent idea ?
> 
> Comments appreciated.

I have the same questions as Ian (e.g. WRT clipboard format), and
I don't want to duplicate them here, but I can also see that we
currently don't have support for putting graphics onto the clipboard.
The only method that I know of is

   Fl::copy(const char *stuff, int len, int clipboard=0)

to copy text.

Having a method for graphics (probably bitmaps for all platforms)
would be useful.

Instead of adding a clipboard device [1], I'd rather like to convert
fl_offscreen to a real Fl_Offscreen device class. The current
implementation is suboptimal(TM) anyway, because it is implemented
as macros that save the context in local variables. This conversion
would be logical and consistent, IMHO.

Once we have this, wouldn't it be easy to use Fl_Offscreen for
rendering and then copy the offscreen image (or parts of it) to the
clipboard ?

We also have fl_read_image() and fl_copy_offscreen(). That's probably
almost all we need to make a useful copy_graphics_to_clipboard()
function, isn't it?

Just my 0.02€

Albrecht

[1] unless there are reasons that I don't see yet
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to