Help in saving screenshot

23 views
Skip to first unread message

Biplab Dhakal

unread,
Jun 30, 2021, 3:16:50 PM6/30/21
to fltkg...@googlegroups.com
Hello all,
I am making an Oscilloscope app and now i am trying to save the graphs. I read some of post and articles but could get all of it. I tried using fl_offscreen and stuffs but i couldn't do it. Does have any idea on this? 
It looks like this, I have to save screenshot of black box with signals.
Hope you can help me out.
Thanks 
Screenshot_20210630-192941_Write on PDF.jpg

Greg Ercolano

unread,
Jun 30, 2021, 3:36:13 PM6/30/21
to fltkg...@googlegroups.com
    Have you looked at the test/device.cxx program?

    It shows how to screen capture in various ways, including for printer output
    as well as .svg, .eps, and in raw data suitable for display with Fl_Image_Surface..

Ian MacArthur

unread,
Jun 30, 2021, 5:34:42 PM6/30/21
to Fltk General
In addition, beyond what Greg suggests, there have over the years been several examples posted here of capturing window or offscreen surfaces to PNG files, so if you have a search though the archives you may well find what you need.

(Assuming that capturing your window to a PNG would be what you need!)

That said, I had a very cursory look just now and didn’t see anything, though I know there are some... indeed I'm pretty sure I have posted such examples in the past myself!


Biplab Dhakal

unread,
Jun 30, 2021, 5:34:59 PM6/30/21
to fltk.general

Where is it ? couldn't find exactly 

Ian MacArthur

unread,
Jun 30, 2021, 5:36:30 PM6/30/21
to Fltk General
On 30 Jun 2021, at 21:44, Biplab Dhakal wrote:
>
>
> Where is it ? couldn't find exactly


In the “test” folder of the fltk tree...


PS: please don't top-post here and trim the citations as appropriate. Thanks.
https://en.wikipedia.org/wiki/Posting_style#Top-posting


Biplab Dhakal

unread,
Jun 30, 2021, 6:08:43 PM6/30/21
to fltkg...@googlegroups.com
Sorry i am new in fltk. I don't many thinks. I tired programming um fltk now watching tutorials and other programming ideas. 

Can u explain further? Or provide specific link were can find it 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/554250BB-6C80-4EA1-BC92-E1DB17483DCC%40gmail.com.

Greg Ercolano

unread,
Jun 30, 2021, 6:14:27 PM6/30/21
to fltkg...@googlegroups.com

On Wednesday, June 30, 2021 at 9:36:13 PM UTC+2 er...@seriss.com wrote:

    Have you looked at the test/device.cxx program?
    It shows how to screen capture in various ways, [..]

    as well as .svg, .eps, and in raw data suitable for display with Fl_Image_Surface..
Where is it ? couldn't find exactly

    It's part of the source code distribution of FLTK.
    On the main fltk.org page click "Download" and try the current fltk release (fltk 1.3.6)
    or if you prefer using git, you can clone the fltk repository using:
	git clone https://github.com/fltk/fltk.git
    Either way, once you extract the code, look in the ./test subdirectory for 'device.cxx'.
    There are also example programs in the ./examples subdirectory.
Reply all
Reply to author
Forward
0 new messages