how to capture graphics primitives from Graphics2D into SVG
问题 I need to capture the graphics primitives from calls to java.awt.Graphics2D. The calls are made through an Open Source toolkit (Apache's PDFBox) and normally rendered in a JPanel. I would like to intercept these calls and translate them to SVG so I can build a non-graphics data model (e.g. tables, graphs, etc.). I'll be happy for any type of hack at this stage, which might include: replacing the Graphics2D library with MyGraphics2D Finding a Graphics2D that supported SVG output and capturing