Community
Participate
Working Groups
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?
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.
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.
I can't read the attachment. Can you attach .zip format?
ok, nevermind... I managed to extract the .rar file
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.
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.
Moving to the next release, GMF 2.1.
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug