Book a Demo

Author Topic: Shape Script Element border problem  (Read 2782 times)

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Shape Script Element border problem
« on: June 12, 2013, 11:42:00 pm »
Hi all,

I just developed the following shape script for a stereotype of metaclass Property:

Code: [Select]
shape main
{
      
      scalable="false";
      image("SPES2020::AndGate.bmp",0,0,30,30);
}

AndGate.bmp is 30x30 px and the stereotype has properties _sizeX=30 and _sizeY=30.

When I drag the stereotype from my toolbox in a diagram the element is created with the right size and also has a border around it with the right size. The problem arises, when I move the element to another position in the diagram: Suddenly selection border resizes to the original size of Property elements which is a rectangle.




Any ideas?


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Shape Script Element border problem
« Reply #1 on: June 13, 2013, 09:06:57 am »
Try something like this:

Code: [Select]
shape main
{
      defsize(30,30);
      image("SPES2020::AndGate.bmp",0,0,100,100);
}
« Last Edit: June 13, 2013, 02:41:56 pm by KP »
The Sparx Team
[email protected]