| 1 |
% Copyright 2018 by Till Tantau |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Public License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
\ProvidesPackage{pgfpict2e}[2004/11/28 ver 0.01] |
| 11 |
|
| 12 |
\RequirePackage{pgfcore} |
| 13 |
|
| 14 |
\def\pgf@pict@line(#1,#2)#3{% |
| 15 |
\pgfsys@beginpurepicture% |
| 16 |
\pgfsetlinewidth{\@wholewidth}% |
| 17 |
\pgfsetroundcap% |
| 18 |
\pgfpathqmoveto{0}{0}% |
| 19 |
\ifnum#1=0\relax% |
| 20 |
\pgf@xa=0pt\relax% |
| 21 |
\pgf@ya=#3\unitlength\relax% |
| 22 |
\else% |
| 23 |
\pgf@y=#2\unitlength% |
| 24 |
\divide\pgf@y by#1\relax% |
| 25 |
\pgf@xa=#3\unitlength\relax% |
| 26 |
\pgf@ya=#3\pgf@y\relax% |
| 27 |
\fi% |
| 28 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}}% |
| 29 |
\pgfusepath{stroke}% |
| 30 |
\pgfsys@endpurepicture% |
| 31 |
}% |
| 32 |
|
| 33 |
\def\line(#1,#2)#3{{\pgfsetarrows{-}\pgf@pict@line(#1,#2){#3}}}% |
| 34 |
\def\vector(#1,#2)#3{{\pgfsetarrows{-latex}\pgf@pict@line(#1,#2){#3}}}% |
| 35 |
|
| 36 |
\def\@circle#1{{% |
| 37 |
\pgfsys@beginpurepicture% |
| 38 |
\pgfsetlinewidth{\@wholewidth}% |
| 39 |
\pgf@x=#1\unitlength% |
| 40 |
\pgfpathqcircle{.5\pgf@x}% |
| 41 |
\pgfusepathqstroke% |
| 42 |
\pgfsys@endpurepicture}} |
| 43 |
|
| 44 |
\def\@dot#1{{% |
| 45 |
\pgfsys@beginpurepicture% |
| 46 |
\pgfsetlinewidth{\@wholewidth}% |
| 47 |
\pgf@x=#1\unitlength% |
| 48 |
\pgfpathqcircle{.5\pgf@x}% |
| 49 |
\pgfusepathqfill% |
| 50 |
\pgfsys@endpurepicture}} |
| 51 |
|
| 52 |
|
| 53 |
\def\oval{\pgfutil@ifnextchar[{\pgfpictIIe@oval}{\pgfpictIIe@oval[20pt]}} |
| 54 |
\def\pgfpictIIe@oval[#1](#2,#3){\pgfutil@ifnextchar[{\pgfpictIIe@@oval[#1](#2,#3)}{\pgfpictIIe@@oval[#1](#2,#3)[]}} |
| 55 |
\def\pgfpictIIe@@oval[#1](#2,#3)[#4]{{% |
| 56 |
\pgfsys@beginpurepicture% |
| 57 |
\@tfor\reserved@a:=#4\do{\csname pgfpictIIe@clip\reserved@a\endcsname}% |
| 58 |
\pgf@x=#2\unitlength% |
| 59 |
\pgf@y=#3\unitlength% |
| 60 |
\pgf@x=-.5\pgf@x% |
| 61 |
\pgf@y=-.5\pgf@y% |
| 62 |
\pgfsys@transformshift{\the\pgf@x}{\the\pgf@y}% |
| 63 |
\pgfsetlinewidth{\@wholewidth}% |
| 64 |
\pgf@ya=#3\unitlength% |
| 65 |
\advance\pgf@ya by-#1\relax% |
| 66 |
\pgfpathmoveto{\pgfpoint{0pt}{\pgf@ya}}% |
| 67 |
\pgfpatharc{180}{90}{#1}% |
| 68 |
\pgf@xa=#2\unitlength% |
| 69 |
\advance\pgf@xa by-#1\relax% |
| 70 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{#3\unitlength}}% |
| 71 |
\pgfpatharc{90}{0}{#1}% |
| 72 |
\pgfpathlineto{\pgfpoint{#2\unitlength}{#1}}% |
| 73 |
\pgfpatharc{0}{-90}{#1}% |
| 74 |
\pgfpathlineto{\pgfpoint{#1}{0pt}}% |
| 75 |
\pgfpatharc{-90}{-180}{#1}% |
| 76 |
\pgfpathclose% |
| 77 |
\pgfusepathqstroke% |
| 78 |
\pgfsys@endpurepicture% |
| 79 |
}} |
| 80 |
\def\pgfpictIIe@clipr{\pgfpathrectangle{\pgfpoint{0pt}{-1000pt}}{\pgfpoint{1000pt}{2000pt}}\pgfusepath{clip}} |
| 81 |
\def\pgfpictIIe@clipl{\pgfpathrectangle{\pgfpoint{-1000pt}{-1000pt}}{\pgfpoint{1000pt}{2000pt}}\pgfusepath{clip}} |
| 82 |
\def\pgfpictIIe@clipt{\pgfpathrectangle{\pgfpoint{-1000pt}{0pt}}{\pgfpoint{2000pt}{1000pt}}\pgfusepath{clip}} |
| 83 |
\def\pgfpictIIe@clipb{\pgfpathrectangle{\pgfpoint{-1000pt}{-1000pt}}{\pgfpoint{2000pt}{1000pt}}\pgfusepath{clip}} |
| 84 |
|
| 85 |
|
| 86 |
\renewcommand\bezier[1]{\pgfpictIIe@qbezier} |
| 87 |
\renewcommand\qbezier[1][]{\pgfpictIIe@qbezier} |
| 88 |
\def\pgfpictIIe@qbezier(#1,#2)(#3,#4)(#5,#6){{% |
| 89 |
\pgfsys@beginpurepicture% |
| 90 |
\pgfsetlinewidth{\@wholewidth}% |
| 91 |
\pgfpathmoveto{\pgfpoint{#1\unitlength}{#2\unitlength}}% |
| 92 |
\pgfpathcurveto% |
| 93 |
{\pgfpointmid{0.66666666}{\pgfpoint{#1\unitlength}{#2\unitlength}}{\pgfpoint{#3\unitlength}{#4\unitlength}}}% |
| 94 |
{\pgfpointmid{0.66666666}{\pgfpoint{#5\unitlength}{#6\unitlength}}{\pgfpoint{#3\unitlength}{#4\unitlength}}}% |
| 95 |
{\pgfpoint{#5\unitlength}{#6\unitlength}}%% |
| 96 |
\pgfusepathqstroke% |
| 97 |
\pgfsys@endpurepicture% |
| 98 |
}} |
| 99 |
\newcommand\cbezier[1][]{\pgfpictIIe@cbezier} |
| 100 |
\def\pgfpictIIe@cbezier(#1,#2)(#3,#4)(#5,#6)(#7,#8){{% |
| 101 |
\pgfsys@beginpurepicture% |
| 102 |
\pgfsetlinewidth{\@wholewidth}% |
| 103 |
\pgfpathmoveto{\pgfpoint{#1\unitlength}{#2\unitlength}}% |
| 104 |
\pgfpathcurveto% |
| 105 |
{\pgfpoint{#3\unitlength}{#4\unitlength}}% |
| 106 |
{\pgfpoint{#5\unitlength}{#6\unitlength}}% |
| 107 |
{\pgfpoint{#7\unitlength}{#8\unitlength}}%% |
| 108 |
\pgfusepathqstroke% |
| 109 |
\pgfsys@endpurepicture% |
| 110 |
}} |
| 111 |
|
| 112 |
\endinput |