Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » SVG rendering with GEF/GMF
SVG rendering with GEF/GMF [message #548243] Wed, 21 July 2010 08:49 Go to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2010
Junior Member
Hi,

I'm trying to use SVG images with GEF in an RCP app.
I was already using a dedicated plugin for image rendering, but only PNG and JPG.
I tried to adapt this plugin to be able to display SVG (as background images for a GEF graph).
I'm using a ScalableImageFigure for this background images, and regular imageFigure for the objects that will be drawn over these background images.

I did manage to get an "image" displayed, but it looks like a bunch of colored squares, and I don't understand why. The SVG images that I'm using are exported from DWG files using easy CAD to SVG converter, and it seems that there is transparency, don't know if that's important so I wanted to mention it.

As I can't find any example, any help would be appreciated (or even tutorials!)

Thanks
Re: SVG rendering with GEF/GMF [message #548254 is a reply to message #548243] Wed, 21 July 2010 09:14 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,

The org.eclipse.gmf.runtime.lite.svg bundle may provide you what you want.
It is availalble in the GMF experimental SDK, from thyhe GMP update-site.

--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: SVG rendering with GEF/GMF [message #548272 is a reply to message #548254] Wed, 21 July 2010 10:18 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2010
Junior Member
Thank you, I'll take a look at it.

I discovered something odd when trying to create a BIRT report using this image : it seems that the image has a really tiny size, which explains why i see it that way (I have a automatic "fit to page").

What I don't get right now, is that :
- The images are SVG, and yet it seems that they're converted to SWT to be displayed ? I was planning on using larger images since they're vector image, without having memory issues ....
- the image size was set to 16000*12000 (and when i open the XML I can see these values), why would GMF display them so small ? Missing a parameter maybe (I tried playing with the renderinfo, without success) ?

Aurélien
Re: SVG rendering with GEF/GMF [message #548392 is a reply to message #548272] Wed, 21 July 2010 16:33 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2010
Junior Member
OK, I tried SVGFigure and everything works fine, but it seems that when I open a 5MB SVG file, memory usage is crazy (compared to the old PNG files).
The rest of the application remains unchanged, so I guess SVG isn't that light :/

Please let me know about any experience you've had with SVG redering.

Aurélien
Re: SVG rendering with GEF/GMF [message #550683 is a reply to message #548243] Wed, 04 August 2010 07:09 Go to previous message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

Effectively it seems that SVG image takes a lot of memory and in GMF, each element takes a new SVG image even if it is the same image to display. It will be useful to used a registry perhaps but I didn't find the time for now to explore this way.

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Previous Topic:GMF model to text transformation
Next Topic:CreateElementCommand - elements do not appear on diagram
Goto Forum:
  


Current Time: Tue Apr 23 12:04:24 GMT 2024

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

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

Back to the top