%%
%% This is file `pict2e.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pict2e.dtx  (with options: `package')
%% 
%% Copyright (C) 2003, 2004
%% Rolf Niepraschk, Rolf.Niepraschk@ptb.de
%% Hubert Gaesslein, HubertJG@open.mind.de
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "author-maintained".
%% 
%% This work consists of all files listed in `manifest.txt'.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01] % ???
\ProvidesPackage{pict2e}
  [2004/08/06 v0.2q Improved picture commands (HjG,RN)]
\edef\Gin@codes{%
 \catcode`\noexpand\^^A\the\catcode`\^^A\relax
 \catcode`\noexpand\"\the\catcode`\"\relax
 \catcode`\noexpand\!\the\catcode`\!\relax
 \catcode`\noexpand\:\the\catcode`\:\relax}
\catcode`\^^A=\catcode`\%
\@makeother\"%
\@makeother\!%
\@makeother\:%
\newcommand*\pIIe@mode{-1}
\newcommand*\pIIe@code[1]{}
\providecommand*\Gin@driver{}
\newcommand*\pIIe@tempa{}
\newcommand*\pIIe@tempb{}
\newcommand*\pIIe@tempc{}
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
\DeclareOption{oztex}{\ExecuteOptions{dvips}}
\DeclareOption{textures}{\def\Gin@driver{textures.def}}
\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
\DeclareOption{original}{\def\pIIe@mode{0}}
\DeclareOption{ltxarrows}{\AtEndOfPackage{%
  \let\pIIe@vector=\pIIe@vector@ltx
  \def\pIIe@FAL{1.52}%
  \def\pIIe@FAW{3.2}%
  \def\pIIe@CAW{1.5pt}%
  \def\pIIe@FAI{0.25}%
  }}
\DeclareOption{pstarrows}{\AtEndOfPackage{%
  \let\pIIe@vector=\pIIe@vector@pst
  \def\pIIe@FAL{1.4}%
  \def\pIIe@FAW{2}%
  \def\pIIe@CAW{1.5pt}%
  \def\pIIe@FAI{0.4}%
  }}
\newcommand*\pIIe@debug@comment{}
\DeclareOption{debug}{%
  \def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}%
  \begingroup
    \@ifundefined{pdfcompresslevel}{}{\global\pdfcompresslevel\z@}%
  \endgroup}
\DeclareOption{hide}{\AtEndOfPackage{%
  \let\pIIe@code\@gobble
}}
\DeclareOption*{\ExecuteOptions{original}}
\ExecuteOptions{ltxarrows}
\InputIfFileExists{pict2e.cfg}{}{}
\ProcessOptions\relax
\ifnum\pIIe@mode=\z@
  \PackageInfo{pict2e}{Package option `original' requested}
\else
  \if!\Gin@driver!
    \PackageError{pict2e}
      {No driver specified at all}
      {You should make a default driver option in a file\MessageBreak
       pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}%
  \else
    \PackageInfo{pict2e}{Driver file: \Gin@driver}
    \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
    \PackageInfo{pict2e}{Driver file for pict2e: p2e-\Gin@driver}
    \InputIfFileExists{p2e-\Gin@driver}{}{%
      \PackageError{pict2e}%
        {Driver file ``p2e-\Gin@driver'' not found}%
        {Q: Is the file properly installed? A: No!}}
  \fi
\fi
\ifnum\pIIe@mode>\z@
  \ifnum\pIIe@mode<\thr@@
    \RequirePackage{trig}
    \let\pIIe@oldline\line
    \let\pIIe@old@sline\@sline
    \let\pIIe@oldvector\vector
    \let\pIIe@old@circle\@circle
    \let\pIIe@old@dot\@dot
    \let\pIIe@old@bezier\@bezier
    \AtBeginDocument{%
      \@ifundefined{@cbezier}{%
        \def\pIIe@old@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){}%
        }{\let\pIIe@old@cbezier\@cbezier}}
    \let\pIIe@oldoval\oval
    \let\pIIe@old@oval\@oval
    \newcommand*\OriginalPictureCmds{%
      \let\@sline\pIIe@old@sline
      \let\line\pIIe@oldline
      \let\vector\pIIe@oldvector
      \let\@circle\pIIe@old@circle
      \let\@dot\pIIe@old@dot
      \let\@bezier\pIIe@old@bezier
      \let\@cbezier\pIIe@old@cbezier
      \renewcommand*\oval[1][]{\pIIe@oldoval}%
      \let\@oval\pIIe@old@oval
    }
  \else
    \PackageError{pict2e}
      {Unsupported mode (\pIIe@mode) specified}
      {The driver you specified requested a mode\MessageBreak
       not supported by this version of this package}
  \fi
\else
  \ifnum\pIIe@mode<\z@
    \PackageError{pict2e}
      {No suitable driver specified}
      {You should make a default driver option in a file\MessageBreak
       pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}
  \fi
\fi
\ifnum\pIIe@mode>\z@
\ifcase\pIIe@mode\relax
\or
  \newcommand*\pIIe@moveto@op{moveto}
  \newcommand*\pIIe@lineto@op{lineto}
  \newcommand*\pIIe@setlinewidth@op{setlinewidth}
  \newcommand*\pIIe@stroke@op{stroke}
  \newcommand*\pIIe@fill@op{fill}
  \newcommand*\pIIe@curveto@op{curveto}
  \newcommand*\pIIe@concat@op{concat}
\or
  \newcommand*\pIIe@moveto@op{m}
  \newcommand*\pIIe@lineto@op{l}
  \newcommand*\pIIe@setlinewidth@op{w}
  \newcommand*\pIIe@stroke@op{S}
  \newcommand*\pIIe@fill@op{f}
  \newcommand*\pIIe@curveto@op{c}
  \newcommand*\pIIe@concat@op{cm}
\fi
  \@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH}
  \newcommand*\pIIe@addtoGraph[1]{%
    \begingroup
      \edef\x{\the\pIIe@GRAPH\space#1}%
      \global\pIIe@GRAPH\expandafter{\x}%
    \endgroup}
  \newcommand*\pIIe@fillGraph{\begingroup \@tempswatrue\pIIe@drawGraph}
  \newcommand*\pIIe@strokeGraph{\begingroup \@tempswafalse\pIIe@drawGraph}
  \newcommand*\pIIe@drawGraph{%
      \edef\x{\pIIe@debug@comment\space
              \pIIe@scale@PTtoBP}%
      \if@tempswa
        \edef\y{\pIIe@fill@op}%
      \else
        \edef\x{\x\space\strip@pt\@wholewidth
          \space\pIIe@setlinewidth@op}%
        \edef\y{\pIIe@stroke@op}%
      \fi
      \expandafter\pIIe@code\expandafter{%
        \expandafter\x\the\pIIe@GRAPH\space\y}%
      \global\pIIe@GRAPH{}\xdef\pIIe@CPx{}\xdef\pIIe@CPy{}%
    \endgroup}
  \newcommand*\pIIe@CPx{} \newcommand*\pIIe@CPy{}
  \newcommand*\pIIe@add@CP[2]{%
    \begingroup
      \@tempdima#1\xdef\pIIe@CPx{\the\@tempdima}%
      \@tempdimb#2\xdef\pIIe@CPy{\the\@tempdimb}%
      \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
    \endgroup}
  \newcommand*\pIIe@add@nums[2]{%
    \begingroup
      \@tempdima#1\relax
      \@tempdimb#2\relax
      \pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
    \endgroup}
  \newcommand*\pIIe@add@num[1]{%
    \begingroup
      \@tempdima#1\relax
      \pIIe@addtoGraph{\strip@pt\@tempdima}%
    \endgroup}
  \newcommand*\pIIe@PTtoBP{0.99626401 }
\ifcase\pIIe@mode\relax
\or
  \newcommand*\pIIe@concat[6]{%
    \begingroup
      \pIIe@addtoGraph{[}%
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \pIIe@addtoGraph{] \pIIe@concat@op}%
    \endgroup}
  \newcommand*\pIIe@translate[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{translate}}
  \newcommand*\pIIe@rotate[1]{\pIIe@add@num{#1}\pIIe@addtoGraph{rotate}}
  \newcommand*\pIIe@scale[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{scale}}
  \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP \pIIe@PTtoBP scale}
\or
  \newcommand*\pIIe@concat[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@concat@op
    \endgroup}
  \newcommand*\pIIe@translate[2]{\pIIe@concat\p@\z@\z@\p@{#1}{#2}}
  \newcommand*\pIIe@rotate[1]{%
    \begingroup
      \@tempdima#1\relax
      \edef\pIIe@tempa{\strip@pt\@tempdima}%
      \CalculateSin\pIIe@tempa
      \CalculateCos\pIIe@tempa
      \edef\pIIe@tempb{\UseSin\pIIe@tempa}%
      \edef\pIIe@tempc{\UseCos\pIIe@tempa}%
      \pIIe@concat{\pIIe@tempc\p@}{\pIIe@tempb\p@}%
        {-\pIIe@tempb\p@}{\pIIe@tempc\p@}\z@\z@
    \endgroup}
  \newcommand*\pIIe@scale[2]{\pIIe@concat{#1}\z@\z@{#2}\z@\z@}
  \newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP 0 0 \pIIe@PTtoBP 0 0 \pIIe@concat@op}
\fi
  \newcommand*\pIIe@moveto[2]{%
      \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op}
  \newcommand*\pIIe@lineto[2]{%
      \pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op}
\ifcase\pIIe@mode\relax
\or
  \newcommand*\pIIe@rcurveto[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph{rcurveto}%
    \endgroup}
\or
  \newcommand*\pIIe@rcurveto[6]{%
    \begingroup
      \@tempdima#1\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#2\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#4\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\advance\@tempdima\pIIe@CPx\relax
      \@tempdimb#6\advance\@tempdimb\pIIe@CPy\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@curveto@op
    \endgroup}
\fi
  \newcommand*\pIIe@curveto[6]{%
    \begingroup
      \@tempdima#1\relax \@tempdimb#2\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#3\relax \@tempdimb#4\relax
      \pIIe@add@nums\@tempdima\@tempdimb
      \@tempdima#5\relax \@tempdimb#6\relax
      \pIIe@add@CP\@tempdima\@tempdimb
      \pIIe@addtoGraph\pIIe@curveto@op
    \endgroup}
\newcommand*\pIIe@pyth[3]{%
  \begingroup
    \@tempdima=#1\relax
    \ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi
    \@tempdimb=#2\relax
    \ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi
    \advance\@tempdimb\@tempdima
    \ifnum\@tempdimb=\z@
      \global\@tempdimc=\z@
    \else
      \multiply\@tempdima 8\relax
      \pIIe@@divide\@tempdima\@tempdimb
      \advance\@tempdimc -4pt
      \multiply\@tempdimc 2
      \edef\pIIe@tempa{\strip@pt\@tempdimc}%
      \@tempdima=\pIIe@tempa\@tempdimc
      \advance\@tempdima 64pt
      \divide\@tempdima 2\relax
      \@dashdim=7pt
      \pIIe@@pyth\pIIe@@pyth\pIIe@@pyth
      \edef\pIIe@tempa{\strip@pt\@dashdim}%
      \@tempdimc=\pIIe@tempa\@tempdimb
      \global\divide\@tempdimc 8
    \fi
  \endgroup
  #3=\@tempdimc}
\newcommand*\pIIe@@pyth{%
  \pIIe@@divide\@tempdima\@dashdim
  \advance\@dashdim\@tempdimc
  \divide\@dashdim\tw@}
\newcommand*\pIIe@@divide[2]{%
  \@tempcnta\p@
  \multiply\@tempcnta\two@fourteen
  \@clnwd#2\relax
  \divide\@clnwd\@iv
  \divide\@tempcnta\@clnwd
  \@clnht\@tempcnta sp\relax
  \@clnwd#1\relax
  \@tempdimc\strip@pt\@clnwd\@clnht}
\newcommand*\pIIe@divide[3]{%
  \pIIe@@divide{#1}{#2}%
  #3=\@tempdimc}
\newcommand*\pIIe@checkslopeargs{%
    \ifnum\ifnum\@xarg<\z@-\fi\@xarg>\@m \@badlinearg \fi
    \ifnum\ifnum\@yarg<\z@-\fi\@yarg>\@m \@badlinearg \fi
    \ifnum\@xarg=\z@ \ifnum\@yarg=\z@ \@badlinearg \fi\fi}
  \def\line(#1,#2)#3{%
    \@xarg #1\relax \@yarg #2\relax
    \@linelen #3\unitlength
    \pIIe@checkslopeargs
    \ifdim\@linelen<\z@\@badlinearg\else
      \ifnum\@xarg =\z@ \@vline
      \else
        \ifnum\@yarg =\z@ \@hline \else \@sline\fi
      \fi
    \fi}
  \def\@sline{%
    \begingroup
      \ifnum\@xarg<\z@\@linelen-\@linelen\fi
      \pIIe@divide{\@yarg\p@}{\@xarg\p@}\dimen@
      \@ydim=\strip@pt\dimen@\@linelen
      \pIIe@moveto\z@\z@
      \pIIe@lineto\@linelen\@ydim
      \pIIe@strokeGraph
    \endgroup}
  \def\vector(#1,#2)#3{%
    \begingroup
      \@xarg#1\relax \@yarg#2\relax
      \@linelen#3\unitlength
      \pIIe@checkslopeargs
      \ifdim\@linelen<\z@ \@badlinearg \else
        \pIIe@pyth{\@xarg\p@}{\@yarg\p@}\dimen@
        \ifnum\@xarg=\z@
        \else\ifnum\@yarg=\z@
          \else
            \pIIe@divide\dimen@{\@xarg\p@}\@xdim
            \@linelen\strip@pt\@xdim\@linelen
            \ifdim\@linelen<\z@\@linelen-\@linelen\fi
          \fi
        \fi
        \pIIe@divide{\@yarg\p@}\dimen@\@ydim
        \pIIe@divide{\@xarg\p@}\dimen@\@xdim
        \pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
        \pIIe@vector
        \pIIe@fillGraph
      \fi
    \endgroup}
  \newcommand*\pIIe@vector{}
  \newcommand*\pIIe@FAL{}\newcommand*\pIIe@FAW{}\newcommand*\pIIe@CAW{}
  \newcommand*\pIIe@FAI{}
  \newcommand*\pIIe@@firstnum{}\newcommand*\pIIe@@secondnum{}
  \AtBeginDocument{%
    \@ifpackageloaded{pstricks}{%
      \def\pIIe@FAL{\psk@arrowlength}%
      \def\pIIe@FAW{\expandafter\pIIe@@secondnum\psk@arrowsize}%
      \def\pIIe@CAW{\expandafter\pIIe@@firstnum\psk@arrowsize}%
      \def\pIIe@FAI{\psk@arrowinset}%
      \def\pIIe@@firstnum#1 #2 {#1\p@}%
      \def\pIIe@@secondnum#1 #2 {#2}%
    }{}%
  }
  \newcommand*\pIIe@vector@ltx{%
    \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
    \@ovxx\pIIe@FAL\@ydim
    \@xdim\@linelen \advance\@xdim-\@ovxx
    \divide\@ydim\tw@
    \divide\@ovxx\tw@ \advance\@ovxx\@xdim
    \@ovyy\@ydim
    \divide\@ovyy\tw@ \advance\@ovyy-\pIIe@FAI\@ydim
    \pIIe@bezier@QtoC\@linelen\@ovxx\@ovro
    \pIIe@bezier@QtoC\z@\@ovyy\@ovri
    \pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd
    \pIIe@bezier@QtoC\@ydim\@ovyy\@clnht
    \pIIe@moveto\@linelen\z@
    \pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}%
    \ifdim\@xdim>\z@
      \pIIe@lineto\@xdim{-\@halfwidth}%
      \pIIe@lineto\z@{-\@halfwidth}%
      \pIIe@lineto\z@{\@halfwidth}%
      \pIIe@lineto\@xdim{\@halfwidth}%
    \fi
    \pIIe@lineto\@xdim\@ydim
    \pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@}
  \newcommand*\pIIe@vector@pst{%
    \@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
    \@ovxx\pIIe@FAL\@ydim
    \@xdim\@linelen \advance\@xdim-\@ovxx
    \divide\@ydim\tw@
    \@ovyy\@ydim \advance\@ovyy-\@halfwidth
    \@ovdx\pIIe@FAI\@ovxx
    \pIIe@@divide\@ovdx\@ydim
    \@ovxx\strip@pt\@ovyy\@tempdimc
    \advance\@ovxx\@xdim
    \advance\@ovdx\@xdim
    \pIIe@moveto\@linelen\z@
    \pIIe@lineto\@xdim{-\@ydim}%
    \ifdim\@xdim>\z@
      \pIIe@lineto\@ovxx{-\@halfwidth}%
      \pIIe@lineto\z@{-\@halfwidth}%
      \pIIe@lineto\z@{\@halfwidth}%
      \pIIe@lineto\@ovxx{\@halfwidth}%
    \else
      \pIIe@lineto\@ovdx\z@
    \fi
    \pIIe@lineto\@xdim\@ydim
    \pIIe@lineto\@linelen\z@}
  \def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}}
  \def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}}
  \newcommand*\pIIe@circ[1]{%
      \@tempdima#1\unitlength
      \ifdim\@tempdima<\z@ \pIIe@badcircarg \fi
      \divide\@tempdima\tw@
      \pIIe@circle\@tempdima
      \if@tempswa \pIIe@fillGraph \else \pIIe@strokeGraph \fi
    \endgroup}
  \newcommand*\pIIe@circle[1]{%
    \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle  \@ne{#1}%
    \pIIe@qcircle  \tw@{#1}\pIIe@qcircle\thr@@{#1}}
  \newcommand*\pIIe@qcircle[3][0]{%
    \begingroup
      \@ovro#3\relax \@ovri0.55228474983\@ovro
      \@tempdimc\@ovri \advance\@tempdimc-\@ovro
      \ifnum#1>\z@ \@tempswatrue \else \@tempswafalse \fi
      \ifcase#2\relax
        \pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro
      \or
        \pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}%
      \or
        \pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}%
      \or
        \pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro
      \fi
    \endgroup}
  \newcommand*\pIIe@@qcircle[8]{%
    \if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}}
  \newcommand*\pIIe@badcircarg{%
    \PackageError{pict2e}%
      {Illegal argument in \protect\circle(*) or \protect\oval}%
      {The radius of a circle, dot or oval corner must be greater than zero.}}%
\newcommand*\maxovalrad{20pt}
\newcommand*\pIIe@defaultUL[2]{%
  \afterassignment\pIIe@def@UL\dimen@#2\unitlength\relax{#1}{#2}}
\newcommand*\pIIe@def@UL{}
\def\pIIe@def@UL#1\relax#2#3{%
  \edef#2{\the\dimen@}}
\newcommand*\pIIe@maxovalrad{}
\renewcommand*\oval[1][\maxovalrad]{%
  \begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}%
    \ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi
    \pIIe@oldoval}
\def\@oval(#1,#2)[#3]{%
  \@ovxx#1\unitlength \divide\@ovxx\tw@
  \@ovyy#2\unitlength \divide\@ovyy\tw@
  \@tempdimc \ifdim\@ovyy>\@ovxx \@ovxx \else \@ovyy \fi
  \ifdim\pIIe@maxovalrad<\@tempdimc \@tempdimc\pIIe@maxovalrad\relax \fi
  \@xdim\@ovxx \advance\@xdim-\@tempdimc
  \@ydim\@ovyy \advance\@ydim-\@tempdimc
  \pIIe@get@quadrants{#3}%
  \@tempswatrue
  \ifnum9=\@tempcnta
    \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
    \@tempcnta\@ne
  \fi
  \pIIe@qoval\@ovxx\z@\@ovxx\@ydim\z@\@tempdimc\z@\@ovyy
  \pIIe@qoval\z@\@ovyy{-\@xdim}\@ovyy\@ne\@tempdimc{-\@ovxx}\z@
  \pIIe@qoval{-\@ovxx}\z@{-\@ovxx}{-\@ydim}\tw@\@tempdimc\z@{-\@ovyy}%
  \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
  \pIIe@strokeGraph
  \endgroup}
  \newcommand*\pIIe@qoval[8]{%
    \ifodd\@tempcnta
      \if@tempswa\pIIe@moveto{#1}{#2}\fi
      \pIIe@lineto{#3}{#4}\pIIe@qcircle{#5}{#6}\pIIe@lineto{#7}{#8}%
      \@tempswafalse
    \else
      \@tempswatrue
    \fi
    \divide\@tempcnta\tw@}
  \newcommand*\pIIe@get@quadrants[1]{%
    \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
    \@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}%
    \if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi
    \if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi}
  \def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
    \@killglue
    \begingroup
      \@ovxx#2\unitlength \@ovyy#3\unitlength
      \@ovdx#4\unitlength \@ovdy#5\unitlength
      \@xdim#6\unitlength \@ydim#7\unitlength
      \pIIe@bezier@QtoC\@ovxx\@ovdx\@ovro
      \pIIe@bezier@QtoC\@ovyy\@ovdy\@ovri
      \pIIe@bezier@QtoC\@xdim\@ovdx\@clnwd
      \pIIe@bezier@QtoC\@ydim\@ovdy\@clnht
      \pIIe@moveto\@ovxx\@ovyy
      \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim
      \pIIe@strokeGraph
    \endgroup
    \ignorespaces}
  \newcommand*\pIIe@bezier@QtoC[3]{%
    \@tempdimc#1\relax      \advance\@tempdimc-#2\relax
    \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
    #3\@tempdimc}
  \AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*%
      \cbezier[2][0]{\pIIe@@cbezier[#1]#2}%
    \@ifdefinable\pIIe@@cbezier{}%
    \def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}%
    \def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
      \@killglue
      \pIIe@moveto{#2\unitlength}{#3\unitlength}%
      \pIIe@curveto{#4\unitlength}{#5\unitlength}%
        {#6\unitlength}{#7\unitlength}{#8\unitlength}{#9\unitlength}%
      \pIIe@strokeGraph
      \ignorespaces}%
  }
\else
  \renewcommand*\oval[1][]{\pIIe@oldoval}
  \newcommand*\maxovalrad{20pt}
  \newcommand*\OriginalPictureCmds{}
\fi
\Gin@codes
\let\Gin@codes\relax
\endinput
%%
%% End of file `pict2e.sty'.
