% Copyright 2006 by Till Tantau
%
% 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.

\ProvidesFileRCS{pgfcorequick.code.tex}

% Quick version of basic drawing commands. Most high-level commands
% are not available if these commands are used.

% Move current point to (#1,#2).
%
% #1 = x dimension of new current point
% #2 = y dimension of new current point
% 
% Example:
%
% \pgfpathqmoveto{0pt}{0pt}
% \pgfpathqlineto{1pt}{1pt}
% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
% \pgfqstroke

\def\pgfpathqmoveto#1#2{\pgfsyssoftpath@moveto{#1}{#2}}


% Append a line to (#1,#2) to the current path.
%
% #1 = x dimension of target
% #2 = y dimension of target
% 
% Example:
%
% \pgfpathqmoveto{0pt}{0pt}
% \pgfpathqlineto{1pt}{1pt}
% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
% \pgfqstroke

\def\pgfpathqlineto#1#2{\pgfsyssoftpath@lineto{#1}{#2}}


% Append a bezier spline to the current path.
%
% #1 = x dimension of first support point
% #2 = y dimension of first support point
% #3 = x dimension of second support point
% #4 = y dimension of second support point
% #5 = x dimension of target point
% #6 = y dimension of target point
% 
% Example:
%
% \pgfpathqmoveto{0pt}{0pt}
% \pgfpathqlineto{1pt}{1pt}
% \pgfpathqcurveto{2pt}{1pt}{2pt}{2pt}{3pt}{2pt}
% \pgfqstroke

\def\pgfpathqcurveto#1#2#3#4#5#6{\pgfsyssoftpath@curveto{#1}{#2}{#3}{#4}{#5}{#6}}




% Append a circle of the given radius around the origin.
%
% #1 = radius
% 
% Example:
%
% \pgfpathqcircle{10pt}
% is quicker than
% \pgfpathcircle{\pgforigin}{10pt}

\def\pgfpathqcircle#1{%
  {%
    \pgf@x=#1%
    \pgf@y=0.5522847\pgf@x%
    \pgfsyssoftpath@moveto{\the\pgf@x}{0pt}%
    \pgfsyssoftpath@curveto{\the\pgf@x}{\the\pgf@y}{\the\pgf@y}{\the\pgf@x}{0pt}{\the\pgf@x}%
    \pgfsyssoftpath@curveto{-\the\pgf@y}{\the\pgf@x}{-\the\pgf@x}{\the\pgf@y}{-\the\pgf@x}{0pt}%
    \pgfsyssoftpath@curveto{-\the\pgf@x}{-\the\pgf@y}{-\the\pgf@y}{-\the\pgf@x}{0pt}{-\the\pgf@x}%
    \pgfsyssoftpath@curveto{\the\pgf@y}{-\the\pgf@x}{\the\pgf@x}{-\the\pgf@y}{\the\pgf@x}{0pt}%
    \pgfsyssoftpath@closepath%
  }%
}



% Stroke current path. No hooks called.
% 
% Example:
%
% \pgfpathqmoveto{0cm}{0cm}
% \pgfpathqlineto{1cm}{1cm}
% \pgfpathqcurveto{2cm}{1cm}{2cm}{2cm}{3cm}{2cm}
% \pgfqstroke

\def\pgfusepathqstroke{%
  \pgfsyssoftpath@flushcurrentpath%
  \pgfsys@stroke%
  \pgf@resetpathsizes%
}


% Quickly fill current path.

\def\pgfusepathqfill{%
  \pgfsyssoftpath@flushcurrentpath%
  \pgfsys@fill%
  \pgf@resetpathsizes%
}


% Quickly fill and stroke current path.

\def\pgfusepathqfillstroke{%
  \pgfsyssoftpath@flushcurrentpath%
  \pgfsys@fillstroke%
  \pgf@resetpathsizes%
}

% Quickly clip current path.

\def\pgfusepathqclip{%
  \pgfsyssoftpath@flushcurrentpath%
  \pgfsys@clipnext%
  \pgfsys@discardpath%
  \pgf@resetpathsizes%
}


\endinput
