Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8100746

Add capability to render a node or scene into a Graphics2D context.

XMLWordPrintable

      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.

            kcr Kevin Rushforth
            dpausjfx Dr. Michael Paus (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: