summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-02 13:34:14 +0000
committerKarl Berry <karl@freefriends.org>2008-07-02 13:34:14 +0000
commitcbc72319fc7de5dcabd0240007488a054a11f5ae (patch)
tree3f460c1c40fcd8fdd91e216f7d533254c84acd29 /Master/texmf-dist/tex/latex/pict2e/pict2e.sty
parentbbe50638e74d39df437470a5ea81e5b7d91363c5 (diff)
pict2e update (1jul08)
git-svn-id: svn://tug.org/texlive/trunk@9155 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pict2e/pict2e.sty')
-rw-r--r--Master/texmf-dist/tex/latex/pict2e/pict2e.sty468
1 files changed, 319 insertions, 149 deletions
diff --git a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
index bdab3211eb5..d7e26a494a2 100644
--- a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
+++ b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty
@@ -6,9 +6,10 @@
%%
%% pict2e.dtx (with options: `package')
%%
-%% Copyright (C) 2003, 2004
+%% Copyright (C) 2003, 2004, 2008
%% Rolf Niepraschk, Rolf.Niepraschk@ptb.de
%% Hubert Gaesslein, HubertJG@open.mind.de
+%% Josef Tkadlec, j.tkadlec@email.cz
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -24,7 +25,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pict2e}
- [2006/03/05 v0.2s Improved picture commands (HjG,RN)]
+ [2008/06/29 v0.2u Improved picture commands (HjG,RN,JT)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
@@ -155,6 +156,7 @@
\newcommand*\pIIe@fill@op{fill}
\newcommand*\pIIe@curveto@op{curveto}
\newcommand*\pIIe@concat@op{concat}
+ \newcommand*\pIIe@closepath@op{closepath}
\or
\newcommand*\pIIe@moveto@op{m}
\newcommand*\pIIe@lineto@op{l}
@@ -163,6 +165,7 @@
\newcommand*\pIIe@fill@op{f}
\newcommand*\pIIe@curveto@op{c}
\newcommand*\pIIe@concat@op{cm}
+ \newcommand*\pIIe@closepath@op{h}
\fi
\@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH}
\newcommand*\pIIe@addtoGraph[1]{%
@@ -289,6 +292,7 @@
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@curveto@op
\endgroup}
+ \newcommand*\pIIe@closepath{\pIIe@addtoGraph\pIIe@closepath@op}
\newcommand*\pIIe@pyth[3]{%
\begingroup
\@tempdima=#1\relax
@@ -300,7 +304,7 @@
\@tempdimc=\z@
\else
\multiply\@tempdima 8\relax
- \pIIe@@divide\@tempdima\@tempdimb
+ \pIIe@divide\@tempdima\@tempdimb\@tempdimc
\advance\@tempdimc -4pt
\multiply\@tempdimc 2
\edef\pIIe@tempa{\strip@pt\@tempdimc}%
@@ -316,160 +320,198 @@
\edef\x{\endgroup#3=\the\@tempdimc}%
\x}
\newcommand*\pIIe@@pyth{%
- \pIIe@@divide\@tempdima\@dashdim
+ \pIIe@divide\@tempdima\@dashdim\@tempdimc
\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}
+\ifx\undefined\@maxdimhalfplus \newdimen\@maxdimhalfplus \fi
+\ifx\undefined\@maxdim@two@xvi \newdimen\@maxdim@two@xvi \fi
+\@maxdimhalfplus=\maxdimen \divide\@maxdimhalfplus\tw@
+\advance\@maxdimhalfplus 1sp
+\@maxdim@two@xvi=\maxdimen \divide\@maxdim@two@xvi 65536
\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{}
- \iffalse% the pstricks values gives too small arrows. (RN)
- \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}%
- }{}%
- }
+ \begingroup
+ \dimendef\@Numer=254\relax \dimendef\@Denom=252\relax
+ \@Numer=#1\relax \@Denom=#2\relax
+ \ifdim\@Denom<\z@ \@Denom -\@Denom \@Numer -\@Numer \fi
+ \def\sign{}\ifdim\@Numer<\z@ \def\sign{-}\@Numer -\@Numer \fi
+ \ifdim \@Numer>\@maxdim@two@xvi
+ \@tempcnta=\z@
+ \@whiledim \@Numer<\@maxdimhalfplus
+ \do {\multiply\@Numer\tw@ \advance\@tempcnta 1}%
+ \@whilenum \@tempcnta<16
+ \do {\divide\@Denom\tw@ \advance\@tempcnta 1}%
+ \else
+ \@Numer 65536\@Numer
\fi
- \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}%
+ \ifdim \@Denom=\z@
+ \ifdim \@Numer=\z@ \@Numer\p@ \else \@Numer\maxdimen \fi
+ \else
+ \divide\@Numer\@Denom
+ \fi
+ \global#3\sign\@Numer
+ \endgroup}
+\newcommand*\pIIe@checkslopeargsline[2]{%
+ \pIIe@checkslopeargs{#1}{#2}{16383}}
+\newcommand*\pIIe@checkslopeargsvector[2]{%
+ \pIIe@checkslopeargs{#1}{#2}{1000}}
+\newcommand*\pIIe@checkslopeargs[3]{%
+ \def\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
+ \def\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
+ \ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi}
+\def\pIIe@checkslopearg #1.#2:#3{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\empty\def\@tempa{0}\fi
+ \ifx\@tempa\space\def\@tempa{0}\fi
+ \ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3\@badlinearg \fi}
+\def\@badlinearg{\PackageError
+ {pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}}
+\def\line(#1,#2)#3{%
+ \pIIe@checkslopeargsline{#1}{#2}%
+ \@tempdima=#1pt\relax \@tempdimb=#2pt\relax
+ \@linelen #3\unitlength
+ \ifdim\@linelen<\z@ \@badlinearg \else \@sline \fi}
+\def\@sline{%
+ \begingroup
+ \ifdim\@tempdima=\z@
+ \ifdim\@tempdimb<\z@\@linelen-\@linelen\fi
+ \@ydim=\@linelen
+ \@xdim=\z@
+ \else
+ \ifdim\@tempdimb=\z@
+ \ifdim\@tempdima<\z@\@linelen-\@linelen\fi
+ \@xdim=\@linelen
+ \@ydim=\z@
\else
- \pIIe@lineto\@ovdx\z@
+ \ifnum\@tempdima<\z@\@linelen-\@linelen\fi
+ \pIIe@divide\@tempdimb\@tempdima\dimen@
+ \@ydim=\strip@pt\dimen@\@linelen
+ \@xdim=\@linelen
\fi
- \pIIe@lineto\@xdim\@ydim
- \pIIe@lineto\@linelen\z@}
+ \fi
+ \pIIe@moveto\z@\z@
+ \pIIe@lineto\@xdim\@ydim
+ \pIIe@strokeGraph
+ \endgroup}
+\def\vector(#1,#2)#3{%
+ \begingroup
+ \pIIe@checkslopeargsvector{#1}{#2}%
+ \@tempdima=#1pt\relax \@tempdimb=#2pt\relax
+ \@linelen#3\unitlength
+ \ifdim\@linelen<\z@ \@badlinearg \else
+ \pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@
+ \ifdim\@tempdima=\z@
+ \else\ifdim\@tempdimb=\z@
+ \else
+ \pIIe@divide\dimen@{\@tempdima}\@xdim
+ \@linelen\strip@pt\@xdim\@linelen
+ \ifdim\@linelen<\z@\@linelen-\@linelen\fi
+ \fi
+ \fi
+ \pIIe@divide{\@tempdimb}\dimen@\@ydim
+ \pIIe@divide{\@tempdima}\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{}
+\iffalse% the pstricks values gives too small arrows. (RN)
+\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}%
+ }{}%
+}
+\fi
+\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\@tempdimc
+ \@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*\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]{%
+ \begingroup
+ \buttcap
+ \pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}%
+ \pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}%
+ \endgroup}
+\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(*), \protect\oval, \protect\arc(*) or
+ \protect\circlearc.}%
+ {The radius of a circle, dot, arc 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}}
@@ -489,6 +531,7 @@
\@xdim\@ovxx \advance\@xdim-\@tempdimc
\@ydim\@ovyy \advance\@ydim-\@tempdimc
\pIIe@get@quadrants{#3}%
+ \ifnum15=\@tempcnta \buttcap \fi
\@tempswatrue
\ifnum9=\@tempcnta
\pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
@@ -533,6 +576,133 @@
\@tempdimc#1\relax \advance\@tempdimc-#2\relax
\divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
#3\@tempdimc}
+\ifx\undefined\@arclen \newdimen\@arclen \fi
+\ifx\undefined\@arcrad \newdimen\@arcrad \fi
+\ifx\undefined\@tempdimd \newdimen\@tempdimd \fi
+\newcommand*\pIIe@arc[6][0]{%
+ \@arcrad #4\relax
+ \ifdim \@arcrad<\z@ \pIIe@badcircarg \else
+ \@arclen #6\p@ \advance\@arclen -#5\p@
+ \ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi
+ \ifdim \sign\@arclen>720\p@
+ \PackageWarning {pict2e}{The arc angle is reduced to -720..720}%
+ \@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}%
+ \@tempdima #5\p@ \advance\@tempdima \@arclen
+ \edef\@angleend{\strip@pt\@tempdima}%
+ \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}%
+ \else
+ \pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}%
+ \fi
+ \fi}
+\newcommand*\pIIe@@arc[6]{%
+ \begingroup
+ \ifdim \sign\@arclen>90\p@
+ \divide\@arclen 2
+ \@tempdima #5\p@ \advance\@tempdima \@arclen
+ \edef\@anglemid{\strip@pt\@tempdima}%
+ \def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}%
+ \expandafter\@temp\expandafter{\@anglemid}%
+ \def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}%
+ \expandafter\@temp\expandafter{\@anglemid}{#6}%
+ \else
+ \CalculateSin{#5}\CalculateCos{#5}%
+ \@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax
+ \@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax
+ \ifcase #1\relax
+ \pIIe@lineto\@tempdima\@tempdimb
+ \or \pIIe@moveto\@tempdima\@tempdimb
+ \or
+ \else \PackageWarning {pict2e}%
+ {Illegal obligatory argument in \protect\circlearc.}%
+ \fi
+ \@tempdimc\@arclen \divide\@tempdimc\@iv
+ \edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}%
+ \@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@
+ \advance\@tempdima-\UseSin{#5}\@linelen
+ \advance\@tempdimb \UseCos{#5}\@linelen
+ \pIIe@add@nums\@tempdima\@tempdimb
+ \CalculateSin{#6}\CalculateCos{#6}%
+ \@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax
+ \@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax
+ \@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima
+ \@tempdimd-\UseCos{#6}\@linelen \advance\@tempdimd \@tempdimb
+ \pIIe@add@nums\@tempdimc\@tempdimd
+ \pIIe@add@CP\@tempdima\@tempdimb
+ \pIIe@addtoGraph\pIIe@curveto@op
+ \fi
+ \endgroup}
+\newcommand*\arc{\@ifstar{\@tempswatrue\@arc}{\@tempswafalse\@arc}}
+\newcommand*\@arc[2][0,360]{\@@arc(#1){#2}}
+\def\@@arc(#1,#2)#3{%
+ \if@tempswa
+ \pIIe@moveto\z@\z@
+ \pIIe@arc{\z@}{\z@}{#3\unitlength}{#1}{#2}%
+ \pIIe@closepath\pIIe@fillGraph
+ \else
+ \pIIe@arc[1]{\z@}{\z@}{#3\unitlength}{#1}{#2}%
+ \pIIe@strokeGraph
+ \fi}
+ \let\lp@r( \let\rp@r)
+ \def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
+ \def\polyline(#1,#2){%
+ \@killglue
+ \pIIe@moveto{#1\unitlength}{#2\unitlength}%
+ \@ifnextchar\lp@r{\@polyline}{\PackageWarning{pict2e}%
+ {Polygonal lines require at least two vertices!}%
+ \ignorespaces}}
+ \def\@polyline(#1,#2){%
+ \pIIe@lineto{#1\unitlength}{#2\unitlength}%
+ \@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
+ \def\polygon{%
+ \@killglue
+ \@ifstar{\begingroup\@tempswatrue\@polygon}%
+ {\begingroup\@tempswafalse\@polygon}}
+ \def\@polygon(#1,#2){%
+ \pIIe@moveto{#1\unitlength}{#2\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{\PackageWarning{pict2e}%
+ {Polygons require at least two vertices!}%
+ \ignorespaces}}
+ \def\@@polygon(#1,#2){\pIIe@lineto{#1\unitlength}{#2\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
+ \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
+ \endgroup
+ \ignorespaces}}
+ \def\moveto(#1,#2){%
+ \@killglue
+ \pIIe@moveto{#1\unitlength}{#2\unitlength}%
+ \ignorespaces}
+ \def\lineto(#1,#2){%
+ \@killglue
+ \pIIe@lineto{#1\unitlength}{#2\unitlength}%
+ \ignorespaces}
+ \def\curveto(#1,#2)(#3,#4)(#5,#6){%
+ \@killglue
+ \pIIe@curveto{#1\unitlength}{#2\unitlength}{#3\unitlength}{#4\unitlength}%
+ {#5\unitlength}{#6\unitlength}%
+ \ignorespaces}
+ \newcommand*\circlearc[6][0]{%
+ \@killglue
+ \pIIe@arc[#1]{#2\unitlength}{#3\unitlength}{#4\unitlength}{#5}{#6}%
+ \ignorespaces}
+ \def\closepath{\pIIe@closepath}
+ \def\strokepath{\pIIe@strokeGraph}
+ \def\fillpath{\pIIe@fillGraph}
+ \ifcase\pIIe@mode\relax
+ \or
+ \def\buttcap{\special{ps:: 0 setlinecap}}
+ \def\roundcap{\special{ps:: 1 setlinecap}}
+ \def\squarecap{\special{ps:: 2 setlinecap}}
+ \def\miterjoin{\special{ps:: 0 setlinejoin}}
+ \def\roundjoin{\special{ps:: 1 setlinejoin}}
+ \def\beveljoin{\special{ps:: 2 setlinejoin}}
+ \or
+ \def\buttcap{\pdfliteral{0 J}}
+ \def\roundcap{\pdfliteral{1 J}}
+ \def\squarecap{\pdfliteral{2 J}}
+ \def\miterjoin{\pdfliteral{0 j}}
+ \def\roundjoin{\pdfliteral{1 j}}
+ \def\beveljoin{\pdfliteral{2 j}}
+ \fi
\AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*%
\cbezier[2][0]{\pIIe@@cbezier[#1]#2}%
\@ifdefinable\pIIe@@cbezier{}%