Book a Demo

Author Topic: Creating images compatible sur Shapescript  (Read 8213 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Creating images compatible sur Shapescript
« on: February 09, 2015, 07:33:16 pm »
Hi,

I looked for some information from the EA help on using shapescripts in UML profiles and managed to get some stereotypes to work ok.
I need to define a couple of stereotypes with an image rendered in my object. Having been given these images by the client, I'm looking for some information on the dimensions and other properties (save as emf?) to create compatible images that will render well as defined in a stereotype using shapescript.

Have you got any recommendation on achieving this? Would inkscape or gimp tool good enough to update and generate compatible images?
To some extent, an EA user will have to perform these tasks to maintain the MDG.

Thanks
Guillaume
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating images compatible sur Shapescript
« Reply #1 on: February 09, 2015, 07:41:09 pm »
I'm not sure what you are exactly after. Embedding EMF/PNG in shape scripts?

Regarding Inkscape: I use it to design icons and you can do quite a lot with it. Easy to use, lots of tutorials and support on the web. Gimp is also nice but it's more meant to manipulate images (hence the name) you have taken from a camera.

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Creating images compatible sur Shapescript
« Reply #2 on: February 09, 2015, 07:44:41 pm »
I did update some images in inkscape and saved them in emf.
Then I imported them into EA to embed them in Shapescript.

For some of them, the dimension or ratio wasn't correct (is there any recommended dimension to set).

thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating images compatible sur Shapescript
« Reply #3 on: February 09, 2015, 09:40:20 pm »
There is no difference between PNG and WMF (I just tested). Both are scaled with the element and get skewed. You may set fixedAspectRatio = true; which will prevent the element to get skewed.

q.

shimon

  • EA User
  • **
  • Posts: 172
  • Karma: +6/-0
    • View Profile
Re: Creating images compatible sur Shapescript
« Reply #4 on: December 29, 2015, 12:40:08 am »
Hi,
I tried associating a EMF file with a stereotype, but it does not display. Using a shapescript did work, but I want to use an Icon not a shape.

Is there any limitation on size of image file? Is there more than one EMF format?

Sincerely,
Shimon J.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating images compatible sur Shapescript
« Reply #5 on: December 29, 2015, 03:59:29 am »
It's a while ago I last used EMF but had no issue with that.  Have you tried with a tiny EMF before going to your probably fully fledged one? There should be some EMFs in the Windoze guts.

q.

shimon

  • EA User
  • **
  • Posts: 172
  • Karma: +6/-0
    • View Profile
Re: Creating images compatible sur Shapescript
« Reply #6 on: December 31, 2015, 03:26:08 am »
Thanks  qwerty. I suspect that the culprit was the format.
In any case, using images did not suit me, as the attributes and operations wouldn't show. There is a way to add them via script, but I choose the easier path of converting the image to an icon and using the decorator syntax instead of the draw shape.
I hope to have time in the next few days and I'll post what I did.

Shimon J.