There’ve been some requests from people to use the SVG to FXML converter outside my e(fx)clipse project. I’m happy to announce that the latest nightly builds provide a standalone version of the converter.
Useage is quite simple:
java -jar svg2fxml-0.1.0-SNAPSHOT.jar http://croczilla.com/bits_and_pieces/svg/samples/tiger/tiger.svg tiger.fxml
will produce an FXML which can be loaded into SceneBuilder:
Need to teach myself now how I can provide this as a netbeans module 😉 Any volunteers to provide an implementation and contribute it to e(fx)clipse.org?
Pingback: JavaFX links of the week, August 27 // JavaFX News, Demos and Insight // FX Experience
Is there a way to use this jar api for generating a javafx.scene.Node without the fxml step ?
no and the algorithms used are not optimized for live processing and creation of Scene-Graph on the fly. What is your use case, do you want to use it transform SVGs on the fly?
Yes i would to load a svg file in javafx.scene.Node on the fly.
What part of the svg specification if supported ? For example this complex svg (http://www.dehats.com/resources/vector-retina/Plant_cell_structure_svg.svg) is very well converted but this much more simple one(http://upload.wikimedia.org/wikipedia/en/6/6d/European_flag.svg) is not.
fairly all SVG-Elements beside Text and Filters are supported. Text can be implemented now with the JFX8 TextFlow element but most filters can not be implemented without new API in JavaFX itself, if you file a trac-ticket (http://efxclipse.org/trac) I can take a look what’s going wrong with the flag sample – most likely a bug. SVG is a really complex beast with all the Transforms, … going on so there’s not general guarantee that the converter works 😦
I create this ticket http://efxclipse.org/trac/ticket/307 . Thanks for your help.
Good, just saw it coming in. BTW the best way to ask and discuss stuff is our forum at https://groups.google.com/forum/?fromgroups=#!forum/efxclipse
Hello, have you improve this great utility ?
it is part of our repo but we have not implemented many new features in the last few months – if you have concrete problems and a sample SVG to test – file a bugzilla but we are currently head down in other areas of e(fx)clipse so we won’t fix it anytime soon unless you provide a patch
Has anyone used this lately? I cannot access the repo or find this anywhere else on the web.
Hi Tom, what happens with this project? this is so useful we cannot let it die.
The source is still in out github repo but it would need some TLC