alberts / pgf-umlsd

Automatically exported from code.google.com/p/pgf-umlsd
0 stars 0 forks source link

Provide command to reference each node in the umlsd graph #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to draw additional stuff in the sdl diagram. therefor I need to 
reference the points where a message starts and ends.

It could be solved something like this (untested):
# Usage: \sdnode{reference of instance}{level}
\newcommand{\sdnode}[2]{$(#1)+(0,2*\unitfactor-0.7*\unitfactor)$}

Then you could call something like:
\draw (\sdnode{inst1}{2}) rectangle (\sdnode{inst3}{5})};

Original issue reported on code.google.com by frankmor...@googlemail.com on 25 Jul 2011 at 10:06

GoogleCodeExporter commented 8 years ago
maybe providing the points by given instant name and message name is better, 
because the idea of this package is user doesn't have to care about positions 
(such as level)

Original comment by xuyuan...@gmail.com on 25 Jul 2011 at 10:41

GoogleCodeExporter commented 8 years ago
Something new here? I want to add some text on specific positions along the 
threads/instances.

Original comment by unused.s...@gmail.com on 30 Jun 2013 at 8:37

GoogleCodeExporter commented 8 years ago
I ended up simply drawing directly into the picture:

\begin{sequencediagram}
    \newinst{ausweis}
    \newinst[1cm]{buerger}
...
\begin{pgfonlayer}{background}
    \fill [opacity=.05]
        ($(ausweis)+(.5,-7.2*\unitfactor-0.7*\unitfactor)$) rectangle
        ($(buerger)+(-.5,-11.1*\unitfactor-0.7*\unitfactor)$);
\end{pgfonlayer}
\end{sequencediagram}

The above example draws a rectangle around the 7th and 11th calls.

Original comment by frankmor...@googlemail.com on 30 Jun 2013 at 7:47