Thank you KP, that is what I wanted!
Though it doesn't work ideally. E.g. having to hide the default decoration by painting over it :-? (the background is visibly inhomogenous, on screen). Also, the shapescript draws ellipses and arcs somewhat imprecisely on the screen (even under high magnification; however, they are printed correctly). And there seems to be no posibility to hide the stereotype name when the decoration is applied. Etc.
The following (database sign) decoration I applied on component elements. Note that I had to use coordinate numbers like 2 or -10 in order the decoration looks fine:
decoration a
{
orientation="NE";
SetOrigin("NE",-35,2);
setpencolor(getuserfillcolor());
rectangle(-10,0,80,130);
setpencolor(getuserbordercolor());
ellipse(-10,80,80,120);
setpencolor(getuserfillcolor());
rectangle(-10,20,80,100);
setpencolor(getuserbordercolor());
// Arc(-10,80,80,120,-10,100,80,100);
MoveTo(-10,20);
LineTo(-10,100);
MoveTo(80,20);
LineTo(80,100);
ellipse(-10,0,80,40);
// image("database1",0,0,80,120);
}
Martin.