Tuesday 15 April 2014

Eclipse Zest- Collapsed graph node of graphViewer when exporting as image -



Eclipse Zest- Collapsed graph node of graphViewer when exporting as image -

i have zest(1.5.0) graphviewer quite big result scrollbar appears in composite. when trying export graph png getting visible portion of graph.region beyond scrollbars not available in image.

image image = new image(platformui.getworkbench().getdisplay(), composite.getbounds().width, composite.getbounds().height); imageloader loader = new imageloader();

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);

if utilize graphviewer object gives nodes collapsed on top left corner

gc gc = new gc(viewer.getgraphcontrol()); rectangle bounds = viewer.getgraphcontrol().getbounds(); image image = new image(viewer.getgraphcontrol().getdisplay(), bounds); **<rest same above code>**

i need single image finish graph in it.is there way accomplish this. think animation causing clustering of nodes in sec approach.is there way turn off (i tried setting nodestyle zeststyle.no_animation_layout did not help cause).

printing/drawing image no different printing/drawing on display. need draw everything, should displayed. had similar requirement printing ghantt chart. can download source code , check how printing supported there.

the thought need command drawable area , draw objects 1 1 there , start drawing next page. i'd not easiest task, requires lots of calculations back upwards different printing settings.

in case don't know if have command on source code back upwards such functionality, may possible emulate programmatically scrolling graph , drawing @ same time, using composite.print(gc). however, might introduce bad user experience.

there frameworks, paperclips create printing little bit easier. there swing libraries, integrated eclipse rcp. also, please see this question more details.

hope give ideas.

eclipse eclipse-plugin eclipse-rcp zest

No comments:

Post a Comment