% pgf/tikz library
% for signal flow diagrams
%
% Author: Dr. Karlheinz Ochs, Ruhr-University of Bochum, Germany
% Version: 0.1
% Date: 2007/01/05

%
% Extended general shape options, cf. tikz.code.tex
%
% #1 = source node
% Remark: The node distance is used
%         for the distance between the borders of two nodes
\tikzoption{below from}{\tikz@from{#1}{1}{-90}{south}{north}}%
\tikzoption{right from}{\tikz@from{#1}{1}{0}{east}{west}}%
\tikzoption{above from}{\tikz@from{#1}{1}{90}{north}{south}}%
\tikzoption{left from}{\tikz@from{#1}{1}{180}{west}{east}}%
\tikzoption{below left from}{\tikz@from{#1}{1.414214}{-135}{south west}{north east}}%
\tikzoption{below right from}{\tikz@from{#1}{1.414214}{-45}{south east}{north west}}%
\tikzoption{above right from}{\tikz@from{#1}{1.414214}{45}{north east}{south west}}%
\tikzoption{above left from}{\tikz@from{#1}{1.414214}{135}{north west}{south east}}%
\def\tikz@from#1#2#3#4#5{%
  \def\tikz@anchor{#5}%
  \let\tikz@do@auto@anchor=\relax%
  \tikz@addtransform{\pgftransformshift{\pgfpointscale{#2}{\pgfpointpolar{#3}{\tikz@node@distance}}}}%
  \def\tikz@node@at{\pgfpointanchor{#1}{#4}}}


%
% Styles for real and complex signal paths.
%
\tikzstyle{dotted path}
   = [loosely dotted,
      shorten >= 2mm,
      shorten <= 2mm]
\tikzstyle{r}
   = [line width=\pathlinewidth,
      >= real tip,
      draw]
\tikzstyle{r>}
   = [r,->]
\tikzstyle{<r}
   = [r,<-]
\tikzstyle{r.}
   = [r,dotted path]
\tikzstyle{c}
   = [line width=\pathlinewidth,
      double=\pathfillcolor,
      double distance=\pathlinewidth,
      >= complex tip,
      draw,shorten <=-\pathlineextend]
\tikzstyle{c>}
   = [c,->]
\tikzstyle{<c}
   = [c,<-]
\tikzstyle{c.}
   = [c,dotted path]


\endinput
