Closed kvanapal closed 4 years ago
I am using the Java version of the code to create an Image from the mxGraph XML
String strXML = mxUtils.readFile("Component.xml"); mxGraph graph = new mxGraph(); Document xmlGraphDoc = mxXmlUtils.parseXml(strXML); mxCodec codec = new mxCodec(xmlGraphDoc); Object o; o = codec.decode(xmlGraphDoc.getDocumentElement()); graph.setModel((mxGraphModel)o); mxGraphModel model = (mxGraphModel)graph.getModel(); BufferedImage image = mxCellRenderer.createBufferedImage(graph, null, 1, Color.WHITE, true, null); ImageIO.write(image, "PNG", new File("Component.png"));`
My XML is here Generated image is here
Why is the generated Image so poorly rendered? Am i missing anything?
I am using the Java version of the code to create an Image from the mxGraph XML
My XML is here Generated image is here
Why is the generated Image so poorly rendered? Am i missing anything?