Here's the component glyph...
I've set it up to be conditional on whether the element is a package or not...
shape main
{
drawnativeshape();
if (hasproperty("type", "Package"))
{
setorigin("NE",-20,5);
addsubshape("PackagingComponent", 0, 0);
}
Shape PackagingComponent
{
scalable = false;
Rectangle(0,0,15,25);
Rectangle(-5,5,5,10);
Rectangle(-5,15,5,20);
}
}Couple of issues:
1) The subshape changes aspect ratio with the change in aspect ratio of the base nativeshape. (whereas the proper component glyph doesn't) Fixed as a result of post below - NEW code supplied!
2) For some elements, I get slightly differnet renderings - not sure why yet. (But I'm pretty sure it's related to EAUI wrt to the three different ways to specify element rendering.
Enjoy,
Paolo