|
|
Re: Can GMF load eps images ? [message #179370 is a reply to message #179068] |
Thu, 27 March 2008 12:06 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
You may convert it to SVG; ScalableImageFigure understands SVG.
Sandip wrote:
>
> Hi Team,
>
> Is there any way in which I can load an eps image in my editor?
>
> Currently my ImageDescriptor extends ScalableImageFigure for my node,
> which successfully loads .gif, .bmp, .jpeg files. But I am not able to
> load an .eps file.
>
> ~Sandip
>
|
|
|
|
Re: Can GMF load eps images ? [message #179484 is a reply to message #179348] |
Fri, 28 March 2008 06:30 |
Sandip Messages: 39 Registered: July 2009 |
Member |
|
|
Hi Tony,
I think I tool the ideas from the following two tutorials... please have a
look into them. Incase you cant solve it let me know.
http://wiki.eclipse.org/index.php/GMF_Tutorial_BPMN
http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_3
Remember your ImageDescriptor should extend ScalableImageFigure for this
job.
Use the following constructor -
public ContainerImageDescriptor(RenderedImage lastRenderedImage,
boolean myUseLocalCoordinates, boolean myOriginalColor,
boolean myAntiAlias) {
super(lastRenderedImage, myUseLocalCoordinates, myOriginalColor,
myAntiAlias);
createContents();
}
Next in your createNodeShape(), ensure you create new descriptor passing
the URL of the image file.
figure = new
ContainerImageDescriptor( RenderedImageFactory.getInstance(url), true,
true, true);
Hope this helps.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01837 seconds