Bug 128542 - [ImageSupport] animated SVG file cant be displayed in GMF
Summary: [ImageSupport] animated SVG file cant be displayed in GMF
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 05:04 EST by Jim Wang CLA
Modified: 2018-11-08 02:26 EST (History)
1 user (show)

See Also:


Attachments
the gef example,modifed the figure using SVG (49.11 KB, application/octet-stream)
2006-02-19 05:07 EST, Jim Wang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Wang CLA 2006-02-19 05:04:30 EST
i modified the GEF sample of org.eclipse.gef.examples.shape
in ShapeEditPart.java ,i modified the createFigureForModel method to :
/////////////////////////////////////////////////////////////////
	private IFigure createFigureForModel() {
		// if (getModel() instanceof EllipticalShape) {
		// return new Ellipse();
		// } else if (getModel() instanceof RectangularShape) {
		// return new RectangleFigure();
		// } else {
		// // if Shapes gets extended the conditions above must be updated
		// throw new IllegalArgumentException();
		// }
		String image1="src/org/eclipse/gef/examples/shapes/icons/ellipse24.gif";
		String image2="src/org/eclipse/gef/examples/shapes/icons/3d.svg";
		String image3="src/org/eclipse/gef/examples/shapes/icons/barChart.svg";

		Bundle bundle = Platform.getBundle("org.eclipse.gef.examples.shapes"); //$NON-NLS-1$
		RenderedImage renderedImage = RenderedImageFactory
				.getInstance(Platform.find(bundle, new Path(image3)));

		ScalableImageFigure imgFig = new ScalableImageFigure(renderedImage);
		NodeFigure nodeFig = new WrapperNodeFigure(imgFig);
		return nodeFig;
	//	return imgFig;

	}

/////////////////////////////////////////////////////////////////////
i use the three image file,and the result is :

the gif file cant be displayed right,i cannt recoganize it when it is displayed.
and the SVG image cant be displayed at all,it is a white blank.


and i use all the versions in this page:
http://download.eclipse.org/technology/gmf/downloads/drops/I-I20060216-200602161945/index.php

and how the feature will be ready?would you tell me the almost time?
Comment 1 Jim Wang CLA 2006-02-19 05:07:13 EST
Created attachment 34972 [details]
the gef example,modifed the figure using SVG 

it need the org.eclipse.core.runtime.IAdaptable class,and some eclipse version maynot have it.pls find the class to have it compiled.
Comment 2 Jim Wang CLA 2006-02-19 09:53:55 EST
and when i try to use:
Image swtImage0=renderedImage.getSWTImage();
the swtImage0 is null.it seems that the renderedImage has not contains the svg image data.
Comment 3 Steven R. Shaw CLA 2006-02-23 15:37:46 EST
I can't read the attachment.  Can you attach .zip format?
Comment 4 Steven R. Shaw CLA 2006-02-24 15:13:27 EST
ok, nevermind... I managed to extract the .rar file
Comment 5 Steven R. Shaw CLA 2006-02-24 15:46:08 EST
I was able to display the gif file fine.

The SVG file throws an exception in the Batik libraries.  I've created a bugzilla in the Batik database.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38782

I suspect this has to do with the fact that the SVG is animated.  We don't currently support the animated display even if the Batik library didn't throw an exception.
Comment 6 Steven R. Shaw CLA 2006-03-05 22:48:13 EST
Reopening for further investigation based on response from Batik  bugzilla:

You don't say exactly what the BridgeException is but I
assume it is:

An I/O error occured while processing the URI:
"batikLogo.svg#Batik_Squiggle"

The problem is that when you use a FileInputStream it
has no idea what the location of the source document
is (it just sees an InputStream), hence it has no way 
to resolve relative paths.

I would suggest providing the URL of the document being
transcoded.
Comment 7 Anthony Hunter CLA 2007-06-19 11:43:14 EDT
Moving to the next release, GMF 2.1. 
Comment 8 Eclipse Webmaster CLA 2010-07-19 21:57:55 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug