0

Obviously, we can draw AWT graphics via Java AWT's Graphics2D directly to OpenPDF using PdfGraphics2D.

I wonder if there is also a possibility allowing to draw JavaFX graphics via JavaFX's GraphicsContext to OpenPDF?

Since I didn't found a direct way to do so I'd like to know if there is something like FxGraphics2D that bridges Graphics2D calls to GraphicsContext on best effort, but just the other way around?

Thank you very much for any hints.

user27772
  • 522
  • 1
  • 4
  • 18
  • I am not aware of anything like this but I also think that this would be only of limited value. What I would find more interesting is a platform and graphics framework independent API specification that could be mapped to any existing framework like AWT canvas, JavaFX canvas, Android canvas ... – mipa Oct 04 '20 at 14:11
  • @mipa: Thank you for your feedback. Since many similar drawing methods exists in AWT and JavaFX that effectively do the same thing, it would be already helpful for us to have some kind of JavaFX-to-AWT converter for at least those methods. Perhaps I'll give it a try and start my own. Anyway, I also like your idea of an independent API, it could also be useful to create SVG content. – user27772 Oct 05 '20 at 10:01

0 Answers0