Hi,
Is there any possibility to generate a screenshot from javaFX into an SVG picture format ?
May be using intermediate graphic conversions, or by using FX Canvas or by using FXGraphics2D.
Thanks in advance for any help.
Fred
JavaFX screenshot SVG
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: JavaFX screenshot SVG
Sadly the JavaFX scene graph can't be rendered to an arbitrary graphics target the way that a Swing UI can. Someone asked for the feature a long time ago, but it doesn't seem like it will be added:
https://bugs.openjdk.java.net/browse/JDK-8091853
You have to settle for rendering to an image, which is useful but definitely a backward step compared to what is possible in Swing:
http://code.makery.ch/blog/javafx-2-sna ... png-image/
JFreeSVG is based on the Java2D API. It will only help in JavaFX for elements that you render to a canvas using FXGraphics2D.
https://bugs.openjdk.java.net/browse/JDK-8091853
You have to settle for rendering to an image, which is useful but definitely a backward step compared to what is possible in Swing:
http://code.makery.ch/blog/javafx-2-sna ... png-image/
JFreeSVG is based on the Java2D API. It will only help in JavaFX for elements that you render to a canvas using FXGraphics2D.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
Re: JavaFX screenshot SVG
Thanks for your answer.
I think, I'm going to create a java swing view of my javafx component, before to create a svg picture.
Fred
I think, I'm going to create a java swing view of my javafx component, before to create a svg picture.
Fred