Skip to main content



      Home
Home » Eclipse Projects » GEF » save as image
save as image [message #216076] Fri, 12 May 2006 21:46 Go to next message
Eclipse UserFriend
Originally posted by: caxqueiroz.gmail.com

Anyone knows how to save a gef diagram as an image, like, jpeg, gif??

thx,

cax
Re: save as image [message #216084 is a reply to message #216076] Sun, 14 May 2006 05:04 Go to previous messageGo to next message
Eclipse UserFriend
This has been answered before. Search this forum for "ImageSaveUtil" and you will find a useful function to save an image.

The function requires two parameters.
Here is an example how to call this function:

//get the active editor
IEditorPart editor = (IEditorPart) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getActiveEditor( );

ImageSaveUtil.save(editor, ((YourEditor)editor).getviewer());
//call function with the active editor

I hope this helps you !

Good Luck !
Re: save as image [message #216093 is a reply to message #216084] Sun, 14 May 2006 17:19 Go to previous messageGo to next message
Eclipse UserFriend
I have written a plug in to help doing that for any diagram and it might
be useful for both programmers and users. Please have a look at

http://www.se.eecs.uni-kassel.de/~thm/Projects/ImageExport/i ndex.html

HTH, Thomas.


Marcel wrote:
> This has been answered before. Search this forum for "ImageSaveUtil" and you will find a useful function to save an image.
>
> The function requires two parameters.
> Here is an example how to call this function:
>
> //get the active editor
> IEditorPart editor = (IEditorPart) PlatformUI.getWorkbench()
> .getActiveWorkbenchWindow().getActivePage().getActiveEditor( );
>
> ImageSaveUtil.save(editor, ((YourEditor)editor).getviewer());
> //call function with the active editor
>
> I hope this helps you !
>
> Good Luck !
>
Re: save as image [message #216116 is a reply to message #216084] Mon, 15 May 2006 09:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caxqueiroz.gmail.com

Marcel wrote:
> This has been answered before. Search this forum for "ImageSaveUtil" and you will find a useful function to save an image.
>
> The function requires two parameters.
> Here is an example how to call this function:
>
> //get the active editor
> IEditorPart editor = (IEditorPart) PlatformUI.getWorkbench()
> .getActiveWorkbenchWindow().getActivePage().getActiveEditor( );
>
> ImageSaveUtil.save(editor, ((YourEditor)editor).getviewer());
> //call function with the active editor
>
> I hope this helps you !
>
> Good Luck !
thx, works ;)
Re: save as image [message #216312 is a reply to message #216093] Wed, 17 May 2006 02:38 Go to previous message
Eclipse UserFriend
A very useful plugin ! Thanks fo the link Thomas !
Previous Topic:Is it really possible to use draw2d without GEF?
Next Topic:How to get key bindings to work ?
Goto Forum:
  


Current Time: Tue Jul 08 13:24:36 EDT 2025

Powered by FUDForum. Page generated in 0.26265 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top