Next: , Previous: , Up: Specifying Arrows   [Contents]


9.3.2 Arrow Attributes

Arrows can have the following attributes.

label

This is the text associated with the arrow. See Labels for more information on how to specify labels. In Msc-generator the first line of the label is written above the arrow, while subsequent lines are written under it. Future versions may make this behaviour more flexible.

text.*

All text formatting attributes described in Common Attributes can be used to manipulate the appearance of the label40.

number

Can be set to yes, no or to a number, to turn numbering on or off, or to specify a number, respectively. See Numbering.

refname

Can be set to any string and is used to give a name to the arrow, which can be used to reference this arrow. Use the \r(name) escape in labels to insert the number of the referenced arrow. See Numbering.

compress

Can be set to yes or no to turn compressing of this arrow on or off. See Compression and Vertical Spacing.

vspacing

Can be set to a number interpreted in pixels or to the string compress. Governs how much vertical space is added before the arrow (can be negative). This attribute is another form (superset) of the compress attribute; compress=yes is equivalent to vspacing=compress, whereas compress=no is equivalent to vspacing=0.

angle

This takes a number in degrees and makes the arrow slanted. Arrows pointing to the same entity cannot have such an attribute. This attribute takes its default value from the angle chart option (or is zero in the absence of such an option, which corresponds to horizontal arrows).

slant_depth

This is similar in effect to the angle attribute, but instead of specifying the angle of the slant in degrees, you can use this attribute to specify how many pixels shall the end of the arrow be below the start of it. If you specify both the angle attribute and slant_depth the latter takes effect.

color

This specifies the color of the text, arrow and arrowheads. It is a shorthand to setting text.color, line.color and arrow.color to the same value.

line.color, line.width

Set the color and the width of the line, see Common Attributes.

line.corner

This attribute specifies how the line shall be drawn at corners. It impacts boxes and entities drawn with this line, for arrows it is effective for arrows that start and end at the same entity. Its value can be none, round, bevel or note. See the example below. Setting line.corner without line.radius will result in the default radius of 10.

line.radius

For arrows starting and ending at the same entity, this specifies the roundness of the arrow corners. 0 is fully sharp (equivalent to line.corner=none, positive values are meant in pixels, a negative value will result in a single arc (for any corner setting). If only line.radius is set and not line.corner the result will be a round corner.

ex44_cshex44
arrow.size

The size of the arrowheads. It can be epsilon, spot, tiny, small, normal, big or huge, with small as default.

arrow.color

The color of the arrowheads.

arrow.type

Specity the arrowhead type. The values can be half, line, empty, solid, which draw a single line, a two-line arrow, an empty triangle and a filled triangle, respectively. The above 4 types also exist in double and triple variants, which draw two or three of them. sharp and empty_sharp draws a bit more pointier arrowhead, filled or empty, respectively. Even more pointed are vee and empty_vee. diamond and empty_diamond draws a filled or empty diamond, while dot and empty_dot draws a filled or empty circle. The last four has non-symmetric versions, where the dot or diamond is not drawn on the entity line, but before it: nsdiamond, empty_nsdiamond, nsdot and empty_nsdot. Specifying none will result in no arrowhead at all. This attribute sets both the endtype and midtype, see below.

arrow.endtype

Sets the arrow type for arrow endings only. This refers to the end of the arrow, where it points to. In case of bidirectional arrows, both ends are drawn with this type. It defaults to a filled triangle.

arrow.midtype

This attribute sets the arrowhead type used for intermediate entities of a multi-segment arrow. It defaults to a filled triangle.

arrow.skiptype

This attribute specifies what to draw for entities the arrow passes over but does not stop at. E.g., if we have three entities ‘a’, ‘b’ and ‘c’, then an arrow specified as a->c, will pass over entity ‘b’. This attribute defaults to none, but another suitable value is jumpover, which draws a small half-circle.

arrow.starttype

This attribute sets the arrowhead type used at the starting point of an arrow. It defaults to no arrowhead.

arrow.xmul
arrow.ymul

These attributes change the width or the height of the arrowhead. The default value is ‘1’. They are multipiers, thus the value of ‘1.1’ results in a 10% increase, for example.

ex45_cshex45
arrow.gvtype
arrow.gvendtype
arrow.gvmidtype
arrow.gvskiptype
arrow.gvstarttype

Use these attributes to set the corresponding arrowhead using the graphviz- style arrowhead specification syntax. This syntax is a superset of what graphviz supports and is not really meaningful for block arrows. Setting any of arrow.*type or arrow.gv*type will erase the other attribute, since these govern the same property of the arrow.

You have a set of basic forms normal (a regular filled triangle), inv (filled triangle in inverse direction), vee (a v shape), crow (v shape in the reverse direction), tee (a thick line perpendicular to the arrow line), tick (a thin line perpendicular to the arrow line), box (a square), diamond, dot, curve (a half circle line) and icurve (in the reverse direction). Msc-generator supports the following additional basic forms: sharp, line and jumpover, which are the same as for the ‘arrow.type’ attribute above; and sbox, sdiamond and sdot, which are symmetric versions of box, diamond and dot, respectively.41

You can combine the basic forms by appending them, such as normalnormal, which is a double filled triangle. You can create arbitrary long combinations. The first form specified will be the tip of the arrow closest to the entity line with the remaining forms following behind.

Some of the forms may be prepended by the letter o to create a non-filled version, such as odot or onormal. You can use the l or r letters to draw only half of the arrowhead which falls on one side of the arrow line, such as lbox, rcurve or even olnormal.

Inserting a size modifier will change the size of the subsequent forms, such as spotdotsmallnormal, will draw a smaller dot and a larger triangle. Since the term ‘normal’ is both a size and a type, if you mean the size, use sizenormal. In addition to size modifiers, you can also insert any color name. Finally, you can also insert one of the following attributes: lwidth to change the line width of the arrowhead; ltype to change the line type of the arrowhead; color to change the color of the arrowhead (e.g., to an rgb value); xmul, ymul or mul to apply a (cumulative) multiplier to the x or y dimension of the arrowhead or to both. These attributes must be terminated with a pipe symbol (|) and when using them the attribute value must be enclosed in quotation marks, such as arrow.gvtype="xmul=0.2|normal|color=12,34,56|dot". See the examples below.

Note that you can use these attributes to set arrowhead style for block arrows, but in that case only one form can be given (you can use stripes and triangle_stripes, but cannot use line, curve, icurve, jumpover and crow. Also, line/color attributes have no effect. All in all, you are better off not using the graphviz syntax for block arrows.

exBA_cshexBA
lost.text.*

The values specified here will be added to the values of text.* when drawing the label of the lost part of the message.

lost.line.*

The values specified here will be added to the values of line.* when drawing the line of the lost part of the message.

lost.arrow.*

The values specified here will be added to the values of arrow.* when drawing the arrowheads in the lost part of the message.

x.size

The size of the loss symbol for lost messages. It can be tiny, small, normal, big or huge, with normal as default.

x.line.width
x.line.color

The linewidth and color of the loss symbol for lost messages.

Note that default values can be changed using styles, see Defining Styles.


Footnotes

(40)

A special note on left and right text margins (to be specified via \ml() and \mr() escapes). Msc-generator always adds enough text margins to prevent the label to overlap with the arrowhead. Thus, if you specify less margin, it will have no effect.

(41)

This is because box, diamond and dot in graphviz are drawn before the target, in conflict with Msc-generator beahviour for ‘arrow.type’. Thus, if you specify ‘arrow.type=dot’, you will get a dot centered on the arrow line; while if you use ‘arrow.gvtype=dot’, you will get one before the entity line.


Next: Arrow Appearance, Previous: Lost Messages, Up: Specifying Arrows   [Contents]