Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » save as image
save as image [message #216076] Sat, 13 May 2006 01: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 09:04 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
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 21:19 Go to previous messageGo to next message
Thomas Maier is currently offline Thomas MaierFriend
Messages: 117
Registered: July 2009
Senior Member
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 13: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 06:38 Go to previous message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
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: Fri Apr 26 08:40:14 GMT 2024

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

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

Back to the top