Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Converting elements to SVG(and using them in the editor)
Converting elements to SVG [message #1386315] Mon, 16 June 2014 13:20 Go to next message
John Cole is currently offline John ColeFriend
Messages: 66
Registered: June 2013
Member
Hello,

is it possible to convert elements, that I created in my Graphiti editor (e.g. specific EClasses), to SVG(-files) and use them instead, with all its advantages (scaling, etc.)?

I appreciate any counsel!

[Updated on: Mon, 16 June 2014 13:21]

Report message to a moderator

Re: Converting elements to SVG [message #1386374 is a reply to message #1386315] Tue, 17 June 2014 08:11 Go to previous messageGo to next message
Martin Hanysz is currently offline Martin HanyszFriend
Messages: 30
Registered: November 2013
Member
Dear John,

as far as I know, Graphiti comes with a separate plugin that allows you to export your diagrams to SVG. Just enable it in your target platform and you can select SVG in the export diagram dialog.

Edit: Using these SVGs in the editor is not possible though. The rendering of the diagram in the editor is done by the Graphical Editor Framework which in turn uses draw2D if I recall that correctly. That means how the diagram is rendered is not implemented in Graphiti itself but in one of the frameworks it uses.

Hope this helps,
Martin

[Updated on: Tue, 17 June 2014 08:15]

Report message to a moderator

Re: Converting elements to SVG [message #1386647 is a reply to message #1386374] Thu, 19 June 2014 05:52 Go to previous messageGo to next message
John Cole is currently offline John ColeFriend
Messages: 66
Registered: June 2013
Member
Hello Martin,

many thanks four your quick response!

Martin Hanysz wrote on Tue, 17 June 2014 04:11
Using these SVGs in the editor is not possible though.


That's too bad. Maybe I will find another solution.

Thanks again!
Re: Converting elements to SVG [message #1424008 is a reply to message #1386315] Mon, 15 September 2014 10:14 Go to previous messageGo to next message
anudeep arya is currently offline anudeep aryaFriend
Messages: 49
Registered: March 2013
Member
Hi,

I have added org.eclipse.graphiti.export.batik plugin as a dependency to my graphiti plugin and i get an option of exporting the graphiti editor to svg format and it is converted.But the exported svg image doesn't contain all the elements in the editor.It trims the content to the right and bottom of the editor(the graphiti editor is big and contains lot of elements),so only some part of editor is generated in the svg exported.

Can anyone Please help me on the issue.

Regards,
Anudeep.
Re: Converting elements to SVG [message #1425474 is a reply to message #1424008] Wed, 17 September 2014 11:11 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Anudeep,

I'm not aware of any size restrictions in the export to SVG functionality.
Are you sure, that you selected "All" in the export dialog? How large in
pixels would be the exported SVG?

Michael
Re: Converting elements to SVG [message #1425523 is a reply to message #1425474] Wed, 17 September 2014 12:42 Go to previous messageGo to next message
anudeep arya is currently offline anudeep aryaFriend
Messages: 49
Registered: March 2013
Member
Hi Micheal,

Thanks for the quick response.Yes i export "all" of the diagram.
You can find attched the exported svg image and in the diagram one can notice that some pictograms are missing both at the right side and at the bottom.

Regards,
Anudeep
  • Attachment: ghmood.svg
    (Size: 327.06KB, Downloaded 489 times)
Re: Converting elements to SVG [message #1426115 is a reply to message #1425523] Thu, 18 September 2014 09:15 Go to previous messageGo to next message
anudeep arya is currently offline anudeep aryaFriend
Messages: 49
Registered: March 2013
Member
HI Micheal,

Can you please look into the issue.Also some of the graphs generated are not scaled properly.They are generated as very small images and on zooming the clarity is lost.

Attached are the pictures for your reference of image snapshot and image exported from graphiti.

Couldn't figure out the reason for this.Any help would be appreciated .

Regards,
Anudeep.
Re: Converting elements to SVG [message #1431957 is a reply to message #1426115] Fri, 26 September 2014 11:49 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Anudeep,

in the SVG you attached I see in Internet Explorer (I don't have any other
SVG viewers) some shapes only shown half on the right and bottom. But these
are different shapes depending on the size of my IE window, so this seems
rather to be an issue with IE not showing all because of not enough space.

When I use all space on my monitor (27") the right-most full shape is
SPI_SWITCHES and there is a small part of another shape to the right of it.
At the bottom I see a row starting with ProjectOnOff until QCONN.

Maybe one just needs a SVG viewer that is capable of scrolling of zooming...

Regarding JPG export, there is some scaling in the libraries we use for the
export of bitmap graphics that scale the image to some sensible size (also
memory limitation play a role here). In the end you only have a fixed
resolution and details will be lacking when you zoom into bitmap graphics.

Michael
Previous Topic:can I use graphiti as a lib in standalone app?
Next Topic:Refering to another diagram with in a diagram
Goto Forum:
  


Current Time: Tue Mar 19 08:20:30 GMT 2024

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

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

Back to the top