Book a Demo

Author Topic: Adding an icon decoration to a shape  (Read 5673 times)

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Adding an icon decoration to a shape
« on: February 16, 2015, 10:21:48 am »
Hi there, my google-fu is week today.  I want to add a icon to a shape, in this case to distinguish between a physical and virtual server.  The docs say

Quote
Shape Scripts contain a number of sections for defining different aspects of the image produced; for an element these include:
Main object
Label
Decoration (e.g. a Document element might contain an icon depicting a document)

Do I just use an image command inside a decoration to achive this, or am I missing something?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Adding an icon decoration to a shape
« Reply #1 on: February 16, 2015, 03:20:37 pm »
Quote
Do I just use an image command inside a decoration to achive this, or am I missing something?
That's about it. If you are making your profile available to other users in other projects, you would need to bundle the profile in an MDG Technology and include the images with the technology. In that case, I think you would need to pass into the image() command the name "Technology::Image" rather than just "Image" - but you can test it and see what works...
« Last Edit: February 16, 2015, 04:31:06 pm by KP »
The Sparx Team
[email protected]

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Adding an icon decoration to a shape
« Reply #2 on: February 17, 2015, 12:01:39 pm »
Thanks.  I had a play with doing that and discover I just get black boxes instead of the image.  As I haven't had create luck with including images in MDGs I think I'll just try and stick to shape script.