Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to save a GEF model as SVG file
How to save a GEF model as SVG file [message #542069] Wed, 23 June 2010 17:34 Go to next message
Simon is currently offline SimonFriend
Messages: 6
Registered: April 2010
Junior Member
Hello,

I try to save a GEF model as a SVG file. The GMF mindmap example contains functionality to do this. But when I looked at the sourcecode of the mindmap example I didn't find any classes or packages that realize the SVG export. So I have two questions.
1)Does anybody know which (GMF-, GEF-) classes or packages can be used to realize SVG export ?
2) Does a tutorial exist where the use of the corresponding classes is explained (or code examples)?

Regards

Simon
Re: How to save a GEF model as SVG file [message #542149 is a reply to message #542069] Thu, 24 June 2010 05:50 Go to previous messageGo to next message
Sven Krause is currently offline Sven KrauseFriend
Messages: 119
Registered: July 2009
Senior Member
Hi Simon,

according to the
org.eclipse.gmf.runtime.diagram.ui.render.actions.CopyToImag eAction used
by various editors is the
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUt il.copyToImage(DiagramEditPart,
IPath, ImageFileFormat, IProgressMonitor) method the active part...


Sven

Am 23.06.2010 19:34, schrieb Simon:
> Hello,
> I try to save a GEF model as a SVG file. The GMF mindmap example
> contains functionality to do this. But when I looked at the sourcecode
> of the mindmap example I didn't find any classes or packages that
> realize the SVG export. So I have two questions. 1)Does anybody know
> which (GMF-, GEF-) classes or packages can be used to realize SVG export ?
> 2) Does a tutorial exist where the use of the corresponding classes is
> explained (or code examples)?
>
> Regards
>
> Simon
Re: How to save a GEF model as SVG file [message #543331 is a reply to message #542149] Tue, 29 June 2010 07:30 Go to previous messageGo to next message
Simon is currently offline SimonFriend
Messages: 6
Registered: April 2010
Junior Member
Hello Sven,

thank you for Your answer and sorry for the late response. The class org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUt il is very useful if you want to store an instance of org.eclipse.gmf.runtime.notation.Diagram in a SVG file. My problem was that I wanted to store "pure" draw2d-figures in a SVG file (I formulated my questions a little bit imprecise). But I found the class org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.ex port.GraphicsSVG to do that . There is a very good example plugin of the University of Kassel where this class is used. You can download the plugin here: http:// sourceforge.net/projects/janus-plugin/files/Image%20Export%2 0Formats/0.11.0/de.unikassel.imageexport.svg_0.11.0.jar/down load.

Regards

Simon





Re: How to save a GEF model as SVG file [message #543345 is a reply to message #542069] Tue, 29 June 2010 07:53 Go to previous message
Simon is currently offline SimonFriend
Messages: 6
Registered: April 2010
Junior Member
Hello Sven,

thank you for Your answer and sorry for the late response. The class org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUt il is very useful if you want to store an instance of org.eclipse.gmf.runtime.notation.Diagram in a SVG file. My problem was that I wanted to store "pure" draw2d-figures in a SVG file (I formulated my questions a little bit imprecise). But I found the class org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.ex port.GraphicsSVG to do that . There is a very good example plugin of the University of Kassel where this class is used. You can download the plugin here: http:// sourceforge.net/projects/janus-plugin/files/Image%20Export%2 0Formats/0.11.0/de.unikassel.imageexport.svg_0.11.0.jar/down load.

Regards

Simon





Previous Topic:How to set the desired wizard category in the gmfgen file?
Next Topic:How to retrieve the fields properties of the editpart from the action
Goto Forum:
  


Current Time: Sat Jul 27 10:45:21 GMT 2024

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

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

Back to the top