0
我有一個圖表,它會覆蓋中的createComponents
以將每個頂點渲染爲JTable
。雖然我預計mxCellRenderer.create*Document
無法處理它,我希望保存到的圖像與將包含自定義頂點組件的JGraphX圖導出爲圖像
BufferedImage image = mxCellRenderer.createBufferedImage(graphComponent.getGraph(), null, 1.0, null, graphComponent.isAntiAlias(), null);
ImageIO.write(image, "PNG", new File("C:\\Temp\\graph.png"));
會(當然,現在我看它,它顯然不能:它只是變得mxGraph
作爲輸入,而不是mxGraphComponent
!)。有沒有辦法將圖形保存爲包含自定義渲染器的圖像?