% Copyright 2006 by Mark Wibrow
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\usepgflibrary{shapes.callouts}%

\pgfkeys{/tikz/callout absolute pointer/.code={%
    \tikz@scan@one@point\tikz@lib@callout@checkforplus#1\relax%
    }%
}%

\def\tikz@lib@callout@checkforplus#1{%
    \pgfutil@ifnextchar+{\def\tikz@lib@callout@originalpoint{#1}\tikz@lib@callout@scan@relative}%
        {\pgf@lib@callout@makeabsolutepointer{#1}}}%

\def\tikz@lib@callout@scan@relative+{%
    \pgfutil@ifnextchar+{\tikz@lib@callout@scan@plusplus}{\tikz@lib@callout@scan@plus}}%
\def\tikz@lib@callout@scan@plusplus+{\tikz@scan@one@point\tikz@lib@callout@add}%
\def\tikz@lib@callout@scan@plus{\tikz@scan@one@point\tikz@lib@callout@add}%
\def\tikz@lib@callout@add#1{%
    \expandafter\pgf@lib@callout@makeabsolutepointer\expandafter{%
        \expandafter\pgfpointadd\expandafter{\tikz@lib@callout@originalpoint}{#1}}%
}%

\pgfkeys{/tikz/callout relative pointer/.code={%
        \tikz@scan@one@point\pgf@lib@callout@makerelativepointer#1\relax%
    }%
}%

\endinput
