SVG rendering with GEF/GMF [message #548243] |
Wed, 21 July 2010 08:49  |
Eclipse User |
|
|
|
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 #548272 is a reply to message #548254] |
Wed, 21 July 2010 10:18   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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,
|
|
|
Powered by
FUDForum. Page generated in 0.03496 seconds