Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Can GMF load eps images ?
Can GMF load eps images ? [message #179068] Wed, 26 March 2008 10:06 Go to next message
Sandip is currently offline SandipFriend
Messages: 39
Registered: July 2009
Member
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 #179348 is a reply to message #179068] Thu, 27 March 2008 10:59 Go to previous messageGo to next message
Toyin is currently offline ToyinFriend
Messages: 35
Registered: July 2009
Member
Hi Sandip,
Im trying to load a custom image into GMF just like what you have done,
please could you describe how you achieved that please. Instead of drawing
shapes like rectangle or poligon, i want to load a cloud-like image. Thans
very much.
Re: Can GMF load eps images ? [message #179370 is a reply to message #179068] Thu, 27 March 2008 12:06 Go to previous messageGo to next message
Eclipse UserFriend
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 #179476 is a reply to message #179370] Fri, 28 March 2008 06:16 Go to previous messageGo to next message
Sandip is currently offline SandipFriend
Messages: 39
Registered: July 2009
Member
Ya, I think thats the last option. But even for that, do you have any idea
for a good java image converters that can be used in Eclipse? Are there
any libraries available? I found one in net http://reader.imagero.com/
but yet to evaluate it.
Re: Can GMF load eps images ? [message #179484 is a reply to message #179348] Fri, 28 March 2008 06:30 Go to previous messageGo to next message
Sandip is currently offline SandipFriend
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.
Re: Can GMF load eps images ? [message #180116 is a reply to message #179484] Tue, 01 April 2008 13:02 Go to previous messageGo to next message
Toyin is currently offline ToyinFriend
Messages: 35
Registered: July 2009
Member
Hi,
Thanks for your help. The custom image is now working. Now Im trying to
annotate it i.e label the custom image. Whenever I name it, it doesnt show
on the image but it shows on the property view.How can I make it show on
the image just like any other standard shapes?

Thanks a lot
Re: Can GMF load eps images ? [message #180287 is a reply to message #179476] Wed, 02 April 2008 06:43 Go to previous message
Sandip is currently offline SandipFriend
Messages: 39
Registered: July 2009
Member
Guys, this tool needs a eps/ps interpreter and it uses GhostScript for it.

This tool works fine, if you have installed Ghostscript.

I am using it internally to convert my eps images into .png files (Runtime
shell execution), and later reading it using our RenderedImage objects.

There is also a java library avialable which wraps this tool. Its called
Jmagick.
Someone can evaluate that too.
Previous Topic:layout document
Next Topic:merging models
Goto Forum:
  


Current Time: Thu Apr 18 11:00:48 GMT 2024

Powered by FUDForum. Page generated in 0.01837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top