Several people, me included, have asked for printing and rendering into images support. Looking closer at the issue I think it might be worthwile to generalize this and add support to render a node or scene into a Graphics2D context. If I understand the JavaFX architecture correctly there is a fallback to Java2D if Prism does not work. If this is true, the implementation of the above request should be easy. The background to this request is the following:
I have implemented an Applet to create QR code labels based on Swing and Java2D. The nice thing about this is that I can reuse the rendering code for three different purposes. I can use it for the movable and zoomable preview on the screen, for directly printing and for rendering into a PDF-file via the Graphics2D context of the iText library. With presidio it is not possible to implement this functionality at all and if there is only support for rendering into images in the future, this will not be such an elegant solution as it is now. This is espacially true if you consider that a vector graphic looks much better when scaled than a bitmap.
I have implemented an Applet to create QR code labels based on Swing and Java2D. The nice thing about this is that I can reuse the rendering code for three different purposes. I can use it for the movable and zoomable preview on the screen, for directly printing and for rendering into a PDF-file via the Graphics2D context of the iText library. With presidio it is not possible to implement this functionality at all and if there is only support for rendering into images in the future, this will not be such an elegant solution as it is now. This is espacially true if you consider that a vector graphic looks much better when scaled than a bitmap.
- duplicates
-
JDK-8101040 Render to image (snapshot) support
- Closed
-
JDK-8101141 Image Ops
- Closed
- relates to
-
JDK-8100584 Need public API for rendering to an image and converting to BufferedImage
- Closed