Hi,
I would like to take a screenshot of the workspace from within the code.
The idea is to programmatically change the graph (remove a node) and take a screenshot, then repeat the process until some condition occurs (network fragmentation).
I know how to remove a node, not a problem.
Is there an accessible API to take a screenshot and save it to file?
Thank you,
Warlax.
Taking Screenshots from code
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Taking Screenshots from code
Hi, there is no API for doing that yet, I suggest to add this to the Ideas list.
A workaround is to use the PDF output. From the PDF you can easily get a PNG screenshot by any resolution using PDF Renderer library.
A workaround is to use the PDF output. From the PDF you can easily get a PNG screenshot by any resolution using PDF Renderer library.
-
- Posts:18
- Joined:19 May 2010 20:45 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Taking Screenshots from code
Hi,
I can use the Robot class (http://download-llnw.oracle.com/javase/ ... Robot.html)
to take automatic screenshots - but I'd like to only take a screenshot of the workspace area. This is probably some NetBeans platform code - is there a way to get the x,y and width,height of that window area?
Thanks,
Warlax.
I can use the Robot class (http://download-llnw.oracle.com/javase/ ... Robot.html)
to take automatic screenshots - but I'd like to only take a screenshot of the workspace area. This is probably some NetBeans platform code - is there a way to get the x,y and width,height of that window area?
Thanks,
Warlax.