how to show a svg file in the editor [message #175322] |
Tue, 04 March 2008 02:50 |
Eclipse User |
|
|
|
Originally posted by: yuanqiulu.163.com
I'm learning some gmf examples from the eclipse CVS.
But I don't know how to show a customed svg picture in the editor.
I've tried the following codes, but it seems there is something wrong.
I could show the svg, but the svg cannot move and modify and the editor is
cannot be edited anymore.
Have any others met the same problem before?
> protected IFigure createNodeShape() {
> return primaryShape = new ScalableImageFigure(getRenderedImage(), true,
> true, true);
> }
> protected RenderedImage getRenderedImage() {
> URL url = null;
> url = FileLocator.find(OrgmlOrganisationDiagramEditorPlugin
> .getInstance().getBundle(), new Path("icons/nodes/group.png"), null);
> return RenderedImageFactory.getInstance(url);
> }
> protected RenderedImage getRenderedImage() {
> URL url = null;
> url = FileLocator.find(OrgmlOrganisationDiagramEditorPlugin
> .getInstance().getBundle(), new Path("icons/nodes/group.png"), null);
> return RenderedImageFactory.getInstance(url);
> }
|
|
|
|
Powered by
FUDForum. Page generated in 0.28023 seconds