Hi,
I planned to create a custom class stereotype with a custom icon. My problem is that the icon is displayed on the left side of the class header instead of right. (Another problem, maybe related, is that the icon size can be higher than the class name compartment, a 100x100 size seems good, if I specify 150x150, e.g., the icon overlaps with other compartments.)
Here's the very simple ShapeScript I created:
decoration Icon
{
image("UI - Popup", 0, 0, 100, 100);
}
As far as I can understand, the decoration should be aligned to the right side of the main shape, once decorations go to right per UML's definition.
I have also tried another ShapeScript:
shape main {
drawnativeshape();
moveto(100, 0);
addsubshape("Icon", 20, 20);
shape Icon
{
h_align = "right";
v_align = "top";
//rectangle(100, 0, 120, 20);
image("UI - Screen", 0, 0, 100, 100);
}
}
Unfortunatelly, this resulted in the image aligned outside the box (on the right side). I also tried to draw a rectangle (the commented-out line) in the hope it will position the drawing cursor used by the image method, but with no luck.
Any tips on aligning the shape on right?