% Copyright 2008 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.

\usetikzlibrary{decorations}%
\usepgflibrary{decorations.pathreplacing}%


\def\tikz@lib@dec@installinputsegmentpoints{%
    \pgf@process{\pgf@decorate@inputsegment@first}%
    \edef\tikzinputsegmentfirst{\the\pgf@x,\the\pgf@y}%
    %
    \pgf@process{\pgf@decorate@inputsegment@last}%
    \edef\tikzinputsegmentlast{\the\pgf@x,\the\pgf@y}%
    %
    \pgf@process{\pgf@decorate@inputsegment@supporta}%
    \edef\tikzinputsegmentsupporta{\the\pgf@x,\the\pgf@y}%
    %
    \pgf@process{\pgf@decorate@inputsegment@supportb}%
    \edef\tikzinputsegmentsupportb{\the\pgf@x,\the\pgf@y}%
}%

\pgfkeys{
    /pgf/decoration/.cd,
        moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{\tikz@lib@dec@installinputsegmentpoints#1},
        lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{\tikz@lib@dec@installinputsegmentpoints#1},
        curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{\tikz@lib@dec@installinputsegmentpoints#1},
        closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{\tikz@lib@dec@installinputsegmentpoints#1}
}%

\endinput
