2

I have implemented the model visualisation using Eclipse Zest Toolkit. Now I want to save the visual model into JPEG image. How can I achieve this goal?

EDITED: I have tried implementing the code mentioned here. But the captured image is cropped because there is vertical scrollbar there in my view (see the picture): enter image description here

Community
  • 1
  • 1
Agung Pratama
  • 3,666
  • 7
  • 36
  • 77
  • 1
    I think the answer might be here: http://stackoverflow.com/questions/9718446/zest-export-diagram-to-an-image-pdf –  Jun 09 '12 at 07:37
  • Try removing the `bounds` argument from the call to the `Image` constructor. Is this allowed? –  Jun 09 '12 at 09:37
  • @Hassan: I dont think that's the solution. Actually, what I want is to capture the diagram (figures) inside the view (graphViewer) and not to include the scrollbar and other part of graphViewer. – Agung Pratama Jun 13 '12 at 07:02
  • Oh, sorry. I don't know any other way. –  Jun 13 '12 at 07:32

1 Answers1

1

I used the following code (originating from the Plug-in dependency visualization example in PDE) for this reason:

http://code.google.com/a/eclipselabs.org/p/debugvisualisation/source/browse/hu.cubussapiens.debugvisualisation/src/hu/cubussapiens/debugvisualisation/internal/widgets/VisualisationGraphViewer.java

If I remember correctly, this handles the scrolling issue (but am not sure about that).

Zoltán Ujhelyi
  • 13,788
  • 2
  • 32
  • 37