我有一個zest(1.5.0)graphViewer,它非常大,因爲結果滾動條出現在組合中。 現在,當我試圖將此圖導出爲png時,我只能看到圖的可見部分。超出滾動條的區域在圖像中不可用。 (),()。getDisplay(),composite.getBounds()。width,composite.getBounds()。height);}} ImageLoader loader = new ImageLoader();Eclipse Zest-當以圖像形式導出時,graphViewer的摺疊圖形節點
GC gc = new GC(image);
composite.print(gc);
gc.dispose();
loader.data = new ImageData[]{image.getImageData()};
loader.save("c:/raja/graph.png", SWT.IMAGE_PNG);
如果我使用graphViewer反對它給節點倒在左上角
GC gc = new GC(viewer.getGraphControl());
Rectangle bounds = viewer.getGraphControl().getBounds();
Image image = new Image(viewer.getGraphControl().getDisplay(), bounds);
**<Rest same as above code>**
我需要得到具有完全圖的單個圖像中it.Is有沒有辦法來實現這一目標。 我認爲動畫可能會導致第二種方法中的節點集羣。是否有方法將其關閉(我嘗試將nodeStyle設置爲ZestStyle.No_Animation_Layout,但它沒有幫助原因)。
我的要求是將複合材料的內容主要是它的圖形如何在屏幕上顯示爲pdf。打印目前在我的範圍之外。 – Raja 2014-11-10 11:21:30
@Raja,你輸出你的內容的地方並不重要,無論如何你需要畫出那些東西。爲了導出到PDF中,我用來從可繪製區域創建圖像,然後用這些圖像創建PDF文檔。但是實施可以是不同的。 – 2014-11-10 11:46:32
在Ghantt Chart源文件中引用哪個文件... – Raja 2014-11-10 16:08:43