Author Topic: Additional information about defining shapes?  (Read 2912 times)

David OD

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Additional information about defining shapes?
« on: December 23, 2009, 02:26:04 pm »
All

The shape script feature seems very useful for some of the work we are doing.  However there seem to be several gaps in the documentation that make understanding the process somewhat difficult.

I saw a single reference in the help file (which I can't find again!)  that suggested (unsurprisingly) that the shapes are drawn onto a "canvas".  However there is no information about this canvas as such.

From playing with the Shape Editor, it is fairly easy to create many shapes.  However I have had difficulty generating circles!  Even though the "canvas" appears to have a 100x100 coordinate system, this is not square, but rather rectangular.  This makes drawing many shapes  (especially regular polygons) difficult.

Does anybody out there have any suggestions/examples to share?

Regards
David
Regards
David

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Additional information about defining shapes?
« Reply #1 on: December 24, 2009, 08:18:59 am »
Use fixedAspectRatio=true in a profile that specifies the size your stereotype items get created and you can enforce a square.

If you use addsubshape, then you can additionally use scalable=false to force a fixed size (as specified by preferredHeight and preferredWidth)