Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not really an issue, but... #1

Open
hervegirod opened this issue Apr 3, 2016 · 2 comments
Open

Not really an issue, but... #1

hervegirod opened this issue Apr 3, 2016 · 2 comments

Comments

@hervegirod
Copy link

Hello,

I wanted to tell you that your project gave me an idea, I created a jfxConverter project on sourceforge (https://sourceforge.net/projects/jfxconverter/) which allows to paint the content of a JavaFX tree in a Graphics2D context. Then by using Batik for example I'm able to convert to svg (or POI allows me to convert to PPT). The results I obtain are pretty good so far for my need.

I don't use the same approach as yours (I don't really convert to SVG, but use a Graphics2D context and use a library which allows me to convert to whatever format I want, providing it can work as a Graphics2D context).

Also I'm not sure if you used the CSS properties of the Nodes you converted (it seemed to me that it was not the case when looking at your code, by maybe I'm wrong). I discovered that by looking for these properties, and also going through the sub-Nodes (Skins), it seems that you don't need to support a lot of classes. For example, the text of a Labeled is in fact implemented by a Text Node.

Sorry for putting this comment here but I did not know how to contact you elsewhere.

Hervé

@stefaneidelloth
Copy link
Owner

Hello Hervé,

thank you for your comment. Since I got stuck on this converter project I stopped its development. Also see
http://stackoverflow.com/questions/12586571/how-can-i-export-a-javafx-node-to-an-svg-image/32486689

The JavaFx chart example that did not work for me:
https://github.com/stefaneidelloth/JavaFxNodeToSvg/blob/master/src/org/treez/results/javafxchart/svgconverter/JavaFxNodeToSvgConverterDemo.java

Maybe it does work with your new approach. If so, it would be nice if you put your strategy at the above stackoverflow question, too. Also see another related question
http://stackoverflow.com/questions/12436274/svg-image-in-javafx-2-2/12440367#12440367

If you are fine with the GPLv3 license terms (not compatible to EPL), you might also be interesting in this Graphics2D implementation for SVG:
http://www.jfree.org/jfreesvg/

I found another solution for the SVG needs of my main projekt: I created javafx-d3 to plot with SVG from within JavaFx, using the powerful JavaScript library d3.js:
https://github.com/stefaneidelloth/javafx-d3

Final note on Inkscape:
The text size default unit changed for Inkscape 0.91. If you use Inkscape to check your conversion results I would recommend to use the 0.91 development version.

Sunny regards,
Stefan

@hervegirod
Copy link
Author

Hello again!

Thanks for all these informations! I will check your javafx-d3 library, and also jfree. I knew this jfree library, but I was not aware that it had an SVG Graphics2D implementation. I checked with inskape, but I think it was not the 0.91. I will check with this one. Also I will check your JavaFx chart example with my approach, and answer to the stackoverflow question. Lots of things to do ;)

Hervé

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants