Shape Attributes
syntax: attribute "=" value ";"
example:
shape main
{
//Initialisation attributes - must be before drawing commands
noshadow = "true";
h_align = "center";
//drawing commands
rectangle(0,0,100,100);
println("foo bar");
}
Attribute Name |
Type |
Description |
v_align |
string |
Affects vertical placement of printed text and subshapes depending on the layoutType attribute. Valid values: "top", "center", or "bottom"; |
h_align |
string |
Affects horizontal placement of printed text and subshapes depending on the layoutType attribute. Valid values: "left", "center", or "right" |
endpointy, endpointx |
integer |
Only used for the reserved "target" and "source" shapes for connectors, this point determines where main connector line connects to the end shapes. Default: 0 and 0 |
editableField |
string |
Adding this attribute to a shape defines it as an editable region of the element. This field only impacts element shapes only, line glyphs are not supported. Valid Values: "alias", "name", "note", "stereotype" |
noshadow |
string |
Assign to "true" to suppress the shapes shadow from being rendered. Default: "false" Valid values: "true" or "false" |
orientation |
string |
Applies to "decoration" shapes only. Determines where the decoration is positioned within the containing element glyph. Valid values: "NW", "N", "NE", "E", "SE", "S", "SW", "W" |
layoutType |
string |
Determines subshapes are sized and positioned. See Layout Types for further details. Valid values: "leftright", "topdown", "border" |
preferredWidth |
|
used by border layout - east and west used by leftright layout, shapes where scalable is false to determine how much space they occupy for layout purposes |
preferredHeight |
|
used by border layout - north and south used in the drawing of the source and target shapes for connectors to determine how wide the line is. |
scalable |
string |
Setting scalable to false stops the shape from being relatively sized to the associated diagram glyph, Valid values: "true" or "false" Default: "true" |
rotatable |
string |
Set to "false" to prevent rotation of the shape. This attribute is only applicable to the "source" and "target" shapes for lines glyphs. Default: "true" Valid values: "true" or "false" |