% -*- mode: latex; auto-revert-interval: 0.5 -*- \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto, node distance=3em, very thin,font={\scriptsize\bf}] \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \tikzstyle{basic-block} = [draw=black!50, fill=white, rectangle, minimum width=6em, minimum height=1.1em] \ifthenelse{\boolean{preview}} {\tikzstyle{block} = [basic-block]} {\tikzstyle{block} = [basic-block, drop shadow]} \tikzstyle{enter} = [block, ellipse, fill=red!20] \tikzstyle{guard} = [block, fill=yellow!20] \tikzstyle{newguard} = [block, fill=green!20] \tikzstyle{lbl} = [font={\scriptsize\it}, minimum width=0em] \clip (-1.3, 0.6) rectangle (12.8,-5.9); % entry bridge \node[enter, name=entry0, fill=blue!20] {entry} ; \node[guard, name=entry1, below of=entry0] {...}; \path (entry0.south) edge (entry1.north) ; % main loop \node[enter, name=loop0, below right=2em and 5em of entry0] {loop 1} ; \node[guard, name=loop1, below of=loop0] {...} ; \node[guard, name=loop2, below of=loop1] {...} ; \node[guard, name=loop3, below of=loop2] {...}; \path (loop0.south) edge (loop1.north) ; \path (loop1.south) edge (loop2.north) ; \path (loop2.south) edge (loop3.north) ; \path (loop3.south) edge[distance=9em, out=230, in=130] (loop0.north) ; % other loop \node[enter, name=other0, below right=1em and 13em of loop0] {loop 2} ; \node[guard, name=other1, below of=other0] {...} ; \path (other0.south) edge (other1.north) ; \path (other1.south) edge[distance=9em, out=310, in=50] (other0.north) ; % entry bridge --> main loop \path (entry1.south) edge[in distance=12em, out distance=9em, out=300, in=110] (loop0.north); % inner bridge \node[newguard, name=inner0, right=1.5em of loop2] {inner}; \path (loop1.south east) edge (inner0.north) ; \path (inner0.south) edge[out distance=12em, in distance=10em, out=340, in=70] (loop0.north) ; % exit bridge \node[newguard, name=exit0, right=1.5em of loop3, fill=black!10] {exit}; \path (loop2.south east) edge (exit0.north) ; \path (exit0.south) edge[out distance=10em, in distance=10em, out=320, in=130] (other0.north) ; \end{tikzpicture}