| 1 |
%% |
| 2 |
%% This is file `pict2e.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% pict2e.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 2003-2016 |
| 10 |
%% Rolf Niepraschk, [email protected] |
| 11 |
%% Hubert Gaesslein, |
| 12 |
%% Josef Tkadlec, [email protected] |
| 13 |
%% |
| 14 |
%% This work may be distributed and/or modified under the |
| 15 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 16 |
%% of this license or (at your option) any later version. |
| 17 |
%% The latest version of this license is in |
| 18 |
%% http://www.latex-project.org/lppl.txt |
| 19 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 20 |
%% version 2003/12/01 or later. |
| 21 |
%% |
| 22 |
%% This work has the LPPL maintenance status "author-maintained". |
| 23 |
%% |
| 24 |
%% This work consists of all files listed in `manifest.txt'. |
| 25 |
%% |
| 26 |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 27 |
\ProvidesPackage{pict2e}[2020/09/30 v0.4b Improved picture commands (HjG,RN,JT)] |
| 28 |
\edef\Gin@codes{% |
| 29 |
\catcode`\noexpand\^^A\the\catcode`\^^A\relax |
| 30 |
\catcode`\noexpand\"\the\catcode`\"\relax |
| 31 |
\catcode`\noexpand\!\the\catcode`\!\relax |
| 32 |
\catcode`\noexpand\:\the\catcode`\:\relax} |
| 33 |
\catcode`\^^A=\catcode`\% |
| 34 |
\@makeother\"% |
| 35 |
\@makeother\!% |
| 36 |
\@makeother\:% |
| 37 |
\def\@defaultunitsset#1#2#3{% |
| 38 |
\@defaultunits#1\dimexpr#2#3\relax\relax\@nnil} |
| 39 |
\newcommand*\pIIe@mode{-1} |
| 40 |
\newcommand*\pIIe@code[1]{} |
| 41 |
\providecommand*\Gin@driver{} |
| 42 |
\newcommand*\pIIe@tempa{} |
| 43 |
\newcommand*\pIIe@tempb{} |
| 44 |
\newcommand*\pIIe@tempc{} |
| 45 |
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}} |
| 46 |
\DeclareOption{xdvi}{\ExecuteOptions{dvips}} |
| 47 |
\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}} |
| 48 |
\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}} |
| 49 |
\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}} |
| 50 |
\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}} |
| 51 |
\DeclareOption{luatex}{\def\Gin@driver{luatex.def}} |
| 52 |
\DeclareOption{xetex}{\def\Gin@driver{xetex.def}} |
| 53 |
\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}} |
| 54 |
\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}} |
| 55 |
\DeclareOption{oztex}{\ExecuteOptions{dvips}} |
| 56 |
\DeclareOption{textures}{\def\Gin@driver{textures.def}} |
| 57 |
\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}} |
| 58 |
\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}} |
| 59 |
\DeclareOption{vtex}{\def\Gin@driver{vtex.def}} |
| 60 |
\DeclareOption{original}{\def\pIIe@mode{0}} |
| 61 |
\newif\ifpIIe@pdfliteral@ok |
| 62 |
\pIIe@pdfliteral@oktrue |
| 63 |
\ifx\pIIe@pdfliteral\@undefined |
| 64 |
\ifx\pdfliteral\@undefined |
| 65 |
\pIIe@pdfliteral@okfalse |
| 66 |
\def\pIIe@pdfliteral#1{% |
| 67 |
\PackageWarning{pict2e}{pdfliteral not supported}% |
| 68 |
}% |
| 69 |
\else |
| 70 |
\let\pIIe@pdfliteral\pdfliteral |
| 71 |
\fi |
| 72 |
\fi |
| 73 |
\def\pIIe@buttcap{% |
| 74 |
\ifpIIe@pdfliteral@ok |
| 75 |
\buttcap |
| 76 |
\fi |
| 77 |
} |
| 78 |
\newcommand*\pIIe@FAL{1.52}% |
| 79 |
\newcommand*\pIIe@FAW{3.2}% |
| 80 |
\newcommand*\pIIe@CAW{1.5pt}% |
| 81 |
\newcommand*\pIIe@FAI{0.25}% |
| 82 |
\newcommand*\ltxarrows{% |
| 83 |
\let\pIIe@vector=\pIIe@vector@ltx |
| 84 |
} |
| 85 |
\newcommand*\pstarrows{% |
| 86 |
\let\pIIe@vector=\pIIe@vector@pst |
| 87 |
} |
| 88 |
\DeclareOption{ltxarrows}{\AtEndOfPackage{\ltxarrows}} |
| 89 |
\DeclareOption{pstarrows}{\AtEndOfPackage{\pstarrows}} |
| 90 |
\newcommand*\pIIe@debug@comment{} |
| 91 |
\DeclareOption{debug}{% |
| 92 |
\def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}% |
| 93 |
\begingroup |
| 94 |
\@ifundefined{pdfcompresslevel}{}{\global\pdfcompresslevel\z@}% |
| 95 |
\endgroup} |
| 96 |
\DeclareOption{hide}{\AtEndOfPackage{% |
| 97 |
\let\pIIe@code\@gobble |
| 98 |
}} |
| 99 |
\DeclareOption*{\ExecuteOptions{original}} |
| 100 |
\ExecuteOptions{ltxarrows} |
| 101 |
\InputIfFileExists{pict2e.cfg}{}{} |
| 102 |
\ProcessOptions\relax |
| 103 |
\ifnum\pIIe@mode=\z@ |
| 104 |
\PackageInfo{pict2e}{Package option `original' requested} |
| 105 |
\else |
| 106 |
\if!\Gin@driver! |
| 107 |
\PackageError{pict2e} |
| 108 |
{No driver specified at all} |
| 109 |
{You should make a default driver option in a file\MessageBreak |
| 110 |
pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}% |
| 111 |
\else |
| 112 |
\PackageInfo{pict2e}{Driver file: \Gin@driver} |
| 113 |
\@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{} |
| 114 |
\PackageInfo{pict2e}{Driver file for pict2e: p2e-\Gin@driver} |
| 115 |
\InputIfFileExists{p2e-\Gin@driver}{}{% |
| 116 |
\PackageError{pict2e}% |
| 117 |
{Driver file ``p2e-\Gin@driver'' not found}% |
| 118 |
{Q: Is the file properly installed? A: No!}} |
| 119 |
\fi |
| 120 |
\fi |
| 121 |
\ifnum\pIIe@mode>\z@ |
| 122 |
\ifnum\pIIe@mode<\thr@@ |
| 123 |
\RequirePackage{trig} |
| 124 |
\let\pIIe@oldline\line |
| 125 |
\let\pIIe@old@sline\@sline |
| 126 |
\let\pIIe@oldvector\vector |
| 127 |
\let\pIIe@old@circle\@circle |
| 128 |
\let\pIIe@old@dot\@dot |
| 129 |
\let\pIIe@old@bezier\@bezier |
| 130 |
\AtBeginDocument{% |
| 131 |
\@ifundefined{@cbezier}{% |
| 132 |
\def\pIIe@old@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){}% |
| 133 |
}{\let\pIIe@old@cbezier\@cbezier}} |
| 134 |
\let\pIIe@oldoval\oval |
| 135 |
\let\pIIe@old@oval\@oval |
| 136 |
\newcommand*\OriginalPictureCmds{% |
| 137 |
\let\@sline\pIIe@old@sline |
| 138 |
\let\line\pIIe@oldline |
| 139 |
\let\vector\pIIe@oldvector |
| 140 |
\let\@circle\pIIe@old@circle |
| 141 |
\let\@dot\pIIe@old@dot |
| 142 |
\let\@bezier\pIIe@old@bezier |
| 143 |
\let\@cbezier\pIIe@old@cbezier |
| 144 |
\renewcommand*\oval[1][]{\pIIe@oldoval}% |
| 145 |
\let\@oval\pIIe@old@oval |
| 146 |
} |
| 147 |
\else |
| 148 |
\PackageError{pict2e} |
| 149 |
{Unsupported mode (\pIIe@mode) specified} |
| 150 |
{The driver you specified requested a mode\MessageBreak |
| 151 |
not supported by this version of this package} |
| 152 |
\fi |
| 153 |
\else |
| 154 |
\ifnum\pIIe@mode<\z@ |
| 155 |
\PackageError{pict2e} |
| 156 |
{No suitable driver specified} |
| 157 |
{You should make a default driver option in a file\MessageBreak |
| 158 |
pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}} |
| 159 |
\fi |
| 160 |
\fi |
| 161 |
\ifnum\pIIe@mode>\z@ |
| 162 |
\ifcase\pIIe@mode\relax |
| 163 |
\or |
| 164 |
\newcommand*\pIIe@moveto@op{moveto} |
| 165 |
\newcommand*\pIIe@lineto@op{lineto} |
| 166 |
\newcommand*\pIIe@setlinewidth@op{setlinewidth} |
| 167 |
\newcommand*\pIIe@stroke@op{stroke} |
| 168 |
\newcommand*\pIIe@fill@op{fill} |
| 169 |
\newcommand*\pIIe@curveto@op{curveto} |
| 170 |
\newcommand*\pIIe@concat@op{concat} |
| 171 |
\newcommand*\pIIe@closepath@op{closepath} |
| 172 |
\or |
| 173 |
\newcommand*\pIIe@moveto@op{m} |
| 174 |
\newcommand*\pIIe@lineto@op{l} |
| 175 |
\newcommand*\pIIe@setlinewidth@op{w} |
| 176 |
\newcommand*\pIIe@stroke@op{S} |
| 177 |
\newcommand*\pIIe@fill@op{f} |
| 178 |
\newcommand*\pIIe@curveto@op{c} |
| 179 |
\newcommand*\pIIe@concat@op{cm} |
| 180 |
\newcommand*\pIIe@closepath@op{h} |
| 181 |
\fi |
| 182 |
\@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH} |
| 183 |
\newcommand*\pIIe@addtoGraph[1]{% |
| 184 |
\begingroup |
| 185 |
\edef\x{\the\pIIe@GRAPH\space#1}% |
| 186 |
\global\pIIe@GRAPH\expandafter{\x}% |
| 187 |
\endgroup} |
| 188 |
\newcommand*\pIIe@fillGraph{\begingroup \@tempswatrue\pIIe@drawGraph} |
| 189 |
\newcommand*\pIIe@strokeGraph{\begingroup \@tempswafalse\pIIe@drawGraph} |
| 190 |
\newcommand*\pIIe@drawGraph{% |
| 191 |
\edef\x{\pIIe@debug@comment\space |
| 192 |
\pIIe@scale@PTtoBP}% |
| 193 |
\if@tempswa |
| 194 |
\edef\y{\pIIe@fill@op}% |
| 195 |
\else |
| 196 |
\edef\x{\x\space |
| 197 |
\strip@pt\@wholewidth\space\pIIe@setlinewidth@op |
| 198 |
\pIIe@linecap\pIIe@linejoin\space}% |
| 199 |
\edef\y{\pIIe@stroke@op}% |
| 200 |
\fi |
| 201 |
\expandafter\pIIe@code\expandafter{% |
| 202 |
\expandafter\x\the\pIIe@GRAPH\space\y}% |
| 203 |
\global\pIIe@GRAPH{}\xdef\pIIe@CPx{}\xdef\pIIe@CPy{}% |
| 204 |
\endgroup} |
| 205 |
\newcommand*\pIIe@CPx{} \newcommand*\pIIe@CPy{} |
| 206 |
\newcommand*\pIIe@add@CP[2]{% |
| 207 |
\begingroup |
| 208 |
\@tempdima#1\xdef\pIIe@CPx{\the\@tempdima}% |
| 209 |
\@tempdimb#2\xdef\pIIe@CPy{\the\@tempdimb}% |
| 210 |
\pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}% |
| 211 |
\endgroup} |
| 212 |
\newcommand*\pIIe@add@nums[2]{% |
| 213 |
\begingroup |
| 214 |
\@tempdima#1\relax |
| 215 |
\@tempdimb#2\relax |
| 216 |
\pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}% |
| 217 |
\endgroup} |
| 218 |
\newcommand*\pIIe@add@num[1]{% |
| 219 |
\begingroup |
| 220 |
\@tempdima#1\relax |
| 221 |
\pIIe@addtoGraph{\strip@pt\@tempdima}% |
| 222 |
\endgroup} |
| 223 |
\newcommand*\pIIe@PTtoBP{0.99626401 } |
| 224 |
\ifcase\pIIe@mode\relax |
| 225 |
\or |
| 226 |
\newcommand*\pIIe@concat[6]{% |
| 227 |
\begingroup |
| 228 |
\pIIe@addtoGraph{[}% |
| 229 |
\@tempdima#1\relax \@tempdimb#2\relax |
| 230 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 231 |
\@tempdima#3\relax \@tempdimb#4\relax |
| 232 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 233 |
\@tempdima#5\relax \@tempdimb#6\relax |
| 234 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 235 |
\pIIe@addtoGraph{] \pIIe@concat@op}% |
| 236 |
\endgroup} |
| 237 |
\newcommand*\pIIe@translate[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{translate}} |
| 238 |
\newcommand*\pIIe@rotate[1]{\pIIe@add@num{#1}\pIIe@addtoGraph{rotate}} |
| 239 |
\newcommand*\pIIe@scale[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{scale}} |
| 240 |
\newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP \pIIe@PTtoBP scale} |
| 241 |
\or |
| 242 |
\newcommand*\pIIe@concat[6]{% |
| 243 |
\begingroup |
| 244 |
\@tempdima#1\relax \@tempdimb#2\relax |
| 245 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 246 |
\@tempdima#3\relax \@tempdimb#4\relax |
| 247 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 248 |
\@tempdima#5\relax \@tempdimb#6\relax |
| 249 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 250 |
\pIIe@addtoGraph\pIIe@concat@op |
| 251 |
\endgroup} |
| 252 |
\newcommand*\pIIe@translate[2]{\pIIe@concat\p@\z@\z@\p@{#1}{#2}} |
| 253 |
\newcommand*\pIIe@rotate[1]{% |
| 254 |
\begingroup |
| 255 |
\@tempdima#1\relax |
| 256 |
\edef\pIIe@tempa{\strip@pt\@tempdima}% |
| 257 |
\CalculateSin\pIIe@tempa |
| 258 |
\CalculateCos\pIIe@tempa |
| 259 |
\edef\pIIe@tempb{\UseSin\pIIe@tempa}% |
| 260 |
\edef\pIIe@tempc{\UseCos\pIIe@tempa}% |
| 261 |
\pIIe@concat{\pIIe@tempc\p@}{\pIIe@tempb\p@}% |
| 262 |
{-\pIIe@tempb\p@}{\pIIe@tempc\p@}\z@\z@ |
| 263 |
\endgroup} |
| 264 |
\newcommand*\pIIe@scale[2]{\pIIe@concat{#1}\z@\z@{#2}\z@\z@} |
| 265 |
\newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP 0 0 \pIIe@PTtoBP 0 0 \pIIe@concat@op} |
| 266 |
\fi |
| 267 |
\newcommand*\pIIe@moveto[2]{% |
| 268 |
\pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op} |
| 269 |
\newcommand*\pIIe@lineto[2]{% |
| 270 |
\pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op} |
| 271 |
\ifcase\pIIe@mode\relax |
| 272 |
\or |
| 273 |
\newcommand*\pIIe@rcurveto[6]{% |
| 274 |
\begingroup |
| 275 |
\@tempdima#1\relax \@tempdimb#2\relax |
| 276 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 277 |
\@tempdima#3\relax \@tempdimb#4\relax |
| 278 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 279 |
\@tempdima#5\relax \@tempdimb#6\relax |
| 280 |
\pIIe@add@CP\@tempdima\@tempdimb |
| 281 |
\pIIe@addtoGraph{rcurveto}% |
| 282 |
\endgroup} |
| 283 |
\or |
| 284 |
\newcommand*\pIIe@rcurveto[6]{% |
| 285 |
\begingroup |
| 286 |
\@tempdima#1\advance\@tempdima\pIIe@CPx\relax |
| 287 |
\@tempdimb#2\advance\@tempdimb\pIIe@CPy\relax |
| 288 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 289 |
\@tempdima#3\advance\@tempdima\pIIe@CPx\relax |
| 290 |
\@tempdimb#4\advance\@tempdimb\pIIe@CPy\relax |
| 291 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 292 |
\@tempdima#5\advance\@tempdima\pIIe@CPx\relax |
| 293 |
\@tempdimb#6\advance\@tempdimb\pIIe@CPy\relax |
| 294 |
\pIIe@add@CP\@tempdima\@tempdimb |
| 295 |
\pIIe@addtoGraph\pIIe@curveto@op |
| 296 |
\endgroup} |
| 297 |
\fi |
| 298 |
\newcommand*\pIIe@curveto[6]{% |
| 299 |
\begingroup |
| 300 |
\@tempdima#1\relax \@tempdimb#2\relax |
| 301 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 302 |
\@tempdima#3\relax \@tempdimb#4\relax |
| 303 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 304 |
\@tempdima#5\relax \@tempdimb#6\relax |
| 305 |
\pIIe@add@CP\@tempdima\@tempdimb |
| 306 |
\pIIe@addtoGraph\pIIe@curveto@op |
| 307 |
\endgroup} |
| 308 |
\newcommand*\pIIe@closepath{\pIIe@addtoGraph\pIIe@closepath@op} |
| 309 |
\newcommand*\pIIe@pyth[3]{% |
| 310 |
\begingroup |
| 311 |
\@tempdima=#1\relax |
| 312 |
\ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi |
| 313 |
\@tempdimb=#2\relax |
| 314 |
\ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi |
| 315 |
\advance\@tempdimb\@tempdima |
| 316 |
\ifnum\@tempdimb=\z@ |
| 317 |
\@tempdimc=\z@ |
| 318 |
\else |
| 319 |
\multiply\@tempdima 8\relax |
| 320 |
\pIIe@divide\@tempdima\@tempdimb\@tempdimc |
| 321 |
\advance\@tempdimc -4pt |
| 322 |
\multiply\@tempdimc 2 |
| 323 |
\edef\pIIe@tempa{\strip@pt\@tempdimc}% |
| 324 |
\@tempdima=\pIIe@tempa\@tempdimc |
| 325 |
\advance\@tempdima 64pt |
| 326 |
\divide\@tempdima 2\relax |
| 327 |
\@dashdim=7pt |
| 328 |
\pIIe@@pyth\pIIe@@pyth\pIIe@@pyth |
| 329 |
\edef\pIIe@tempa{\strip@pt\@dashdim}% |
| 330 |
\@tempdimc=\pIIe@tempa\@tempdimb |
| 331 |
\global\divide\@tempdimc 8 |
| 332 |
\fi |
| 333 |
\edef\x{\endgroup#3=\the\@tempdimc}% |
| 334 |
\x} |
| 335 |
\newcommand*\pIIe@@pyth{% |
| 336 |
\pIIe@divide\@tempdima\@dashdim\@tempdimc |
| 337 |
\advance\@dashdim\@tempdimc |
| 338 |
\divide\@dashdim\tw@} |
| 339 |
\newcommand*\pIIe@divide[3]{% |
| 340 |
\begingroup |
| 341 |
\dimendef\Numer=254\relax \dimendef\Denom=252\relax |
| 342 |
\countdef\Num=254\relax \countdef\Den=252\relax |
| 343 |
\countdef\I=250\relax \countdef\Numb=248\relax |
| 344 |
\Numer #1\relax \Denom #2\relax |
| 345 |
\ifdim\Denom<\z@ \Denom -\Denom \Numer=-\Numer \fi |
| 346 |
\ifdim\Numer<\z@ \def\sign{-}\Numer=-\Numer \else \def\sign{}\fi |
| 347 |
\ifdim\Denom=\z@ |
| 348 |
\edef\Q{\strip@pt\maxdimen}% |
| 349 |
\PackageWarning{pict2e}% |
| 350 |
{Division by 0, \sign\strip@pt\maxdimen\space used}{}% |
| 351 |
\else |
| 352 |
\Num=\Numer \Den=\Denom |
| 353 |
\Numb=\Num \divide\Numb\Den |
| 354 |
\ifnum\Numb>16383 |
| 355 |
\edef\Q{\strip@pt\maxdimen}% |
| 356 |
\PackageWarning{pict2e}% |
| 357 |
{Division overflow, \sign\strip@pt\maxdimen\space used}{}% |
| 358 |
\else |
| 359 |
\edef\Q{\number\Numb.}% |
| 360 |
\multiply \Numb\Den \advance\Num -\Numb |
| 361 |
\I=6\relax |
| 362 |
\@whilenum \I>\z@ \do{\pIIe@@divide\advance\I\m@ne}% |
| 363 |
\fi |
| 364 |
\fi |
| 365 |
\edef\tempend{\noexpand\endgroup\noexpand#3=\sign\Q\p@}% |
| 366 |
\tempend} |
| 367 |
\def\pIIe@@divide{% |
| 368 |
\@whilenum \Num>214748364 \do{\divide\Num\tw@ \divide\Den\tw@}% |
| 369 |
\multiply \Num 10 |
| 370 |
\Numb=\Num \divide\Numb\Den |
| 371 |
\edef\Q{\Q\number\Numb}% |
| 372 |
\multiply \Numb\Den \advance \Num -\Numb |
| 373 |
\ifnum\Num>\z@\else\I=0\fi} |
| 374 |
\newcommand*\pIIe@checkslopeargsline[2]{% |
| 375 |
\pIIe@checkslopeargs{#1}{#2}{16383}} |
| 376 |
\newcommand*\pIIe@checkslopeargsvector[2]{% |
| 377 |
\pIIe@checkslopeargs{#1}{#2}{1000}} |
| 378 |
\newcommand*\pIIe@checkslopeargs[3]{% |
| 379 |
\edef\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% |
| 380 |
\edef\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}% |
| 381 |
\ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi} |
| 382 |
\def\pIIe@checkslopearg #1.#2:#3{% |
| 383 |
\def\@tempa{#1}% |
| 384 |
\ifx\@tempa\empty\def\@tempa{0}\fi |
| 385 |
\ifx\@tempa\space\def\@tempa{0}\fi |
| 386 |
\ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3 \@badlinearg \fi} |
| 387 |
\def\@badlinearg{\PackageError |
| 388 |
{pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}} |
| 389 |
\def\line(#1,#2)#3{% |
| 390 |
\begingroup |
| 391 |
\pIIe@checkslopeargsline{#1}{#2}% |
| 392 |
\@tempdima=#1pt\relax \@tempdimb=#2pt\relax |
| 393 |
\@defaultunitsset\@linelen{#3}\unitlength |
| 394 |
\ifdim\@linelen<\z@ \@badlinearg \else |
| 395 |
\pIIe@sline |
| 396 |
\pIIe@moveto\z@\z@ |
| 397 |
\pIIe@lineto\@xdim\@ydim |
| 398 |
\pIIe@strokeGraph |
| 399 |
\box\@tempboxa |
| 400 |
\fi |
| 401 |
\endgroup} |
| 402 |
\newcommand*\pIIe@sline{% |
| 403 |
\ifdim\@tempdima=\z@ |
| 404 |
\ifdim\@tempdimb<\z@\@linelen-\@linelen\fi |
| 405 |
\@ydim=\@linelen |
| 406 |
\@xdim=\z@ |
| 407 |
\else |
| 408 |
\ifdim\@tempdima<\z@\@linelen-\@linelen\fi |
| 409 |
\ifdim\@tempdimb=\z@ |
| 410 |
\@xdim=\@linelen |
| 411 |
\@ydim=\z@ |
| 412 |
\else |
| 413 |
\pIIe@divide\@tempdimb\@tempdima\dimen@ |
| 414 |
\@ydim=\strip@pt\dimen@\@linelen |
| 415 |
\@xdim=\@linelen |
| 416 |
\fi |
| 417 |
\fi |
| 418 |
\@ovxx=\ifnum\@xdim=\z@ \z@\else\@linelen\fi |
| 419 |
\@ovyy=\ifnum\@ydim<\z@ \z@\else\@ydim\fi |
| 420 |
\@ovdy=\ifnum\@ydim<\z@ -\@ydim\else\z@\fi |
| 421 |
\setbox\@tempboxa\hbox{% |
| 422 |
\vrule\@height \@ovyy \@depth \@ovdy \@width \z@ |
| 423 |
\vrule\@height \z@ \@depth \z@ \@width \@ovxx}} |
| 424 |
\def\vector(#1,#2)#3{% |
| 425 |
\begingroup |
| 426 |
\pIIe@checkslopeargsvector{#1}{#2}% |
| 427 |
\@tempdima=#1pt\relax \@tempdimb=#2pt\relax |
| 428 |
\@defaultunitsset\@linelen{#3}\unitlength |
| 429 |
\ifdim\@linelen<\z@ \@badlinearg \else |
| 430 |
\pIIe@sline |
| 431 |
\@defaultunitsset\@linelen{#3}\unitlength |
| 432 |
\pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@ |
| 433 |
\ifdim\@tempdima=\z@ \else |
| 434 |
\ifdim\@tempdimb=\z@ \else |
| 435 |
\pIIe@divide\dimen@{\@tempdima}\@xdim |
| 436 |
\@linelen\strip@pt\@xdim\@linelen |
| 437 |
\ifdim\@linelen<\z@\@linelen-\@linelen\fi |
| 438 |
\fi |
| 439 |
\fi |
| 440 |
\pIIe@divide{\@tempdimb}\dimen@\@ydim |
| 441 |
\pIIe@divide{\@tempdima}\dimen@\@xdim |
| 442 |
\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@ |
| 443 |
\pIIe@vector |
| 444 |
\pIIe@fillGraph |
| 445 |
\box\@tempboxa |
| 446 |
\fi |
| 447 |
\endgroup} |
| 448 |
\newcommand*\pIIe@vector{} |
| 449 |
\newcommand*\pIIe@vector@ltx{% |
| 450 |
\@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax |
| 451 |
\@ovxx\pIIe@FAL\@ydim |
| 452 |
\@xdim\@linelen \advance\@xdim-\@ovxx |
| 453 |
\divide\@ydim\tw@ |
| 454 |
\divide\@ovxx\tw@ \advance\@ovxx\@xdim |
| 455 |
\@ovyy\@ydim |
| 456 |
\divide\@ovyy\tw@ \advance\@ovyy-\pIIe@FAI\@ydim |
| 457 |
\pIIe@bezier@QtoC\@linelen\@ovxx\@ovro |
| 458 |
\pIIe@bezier@QtoC\z@\@ovyy\@ovri |
| 459 |
\pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd |
| 460 |
\pIIe@bezier@QtoC\@ydim\@ovyy\@clnht |
| 461 |
\pIIe@moveto\@linelen\z@ |
| 462 |
\pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}% |
| 463 |
\ifdim\@xdim>\z@ |
| 464 |
\pIIe@lineto\@xdim{-\@halfwidth}% |
| 465 |
\pIIe@lineto\z@{-\@halfwidth}% |
| 466 |
\pIIe@lineto\z@{\@halfwidth}% |
| 467 |
\pIIe@lineto\@xdim{\@halfwidth}% |
| 468 |
\fi |
| 469 |
\pIIe@lineto\@xdim\@ydim |
| 470 |
\pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@} |
| 471 |
\newcommand*\pIIe@vector@pst{% |
| 472 |
\@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax |
| 473 |
\@ovxx\pIIe@FAL\@ydim |
| 474 |
\@xdim\@linelen \advance\@xdim-\@ovxx |
| 475 |
\divide\@ydim\tw@ |
| 476 |
\@ovyy\@ydim \advance\@ovyy-\@halfwidth |
| 477 |
\@ovdx\pIIe@FAI\@ovxx |
| 478 |
\pIIe@divide\@ovdx\@ydim\@tempdimc |
| 479 |
\@ovxx\strip@pt\@ovyy\@tempdimc |
| 480 |
\advance\@ovxx\@xdim |
| 481 |
\advance\@ovdx\@xdim |
| 482 |
\pIIe@moveto\@linelen\z@ |
| 483 |
\pIIe@lineto\@xdim{-\@ydim}% |
| 484 |
\ifdim\@xdim>\z@ |
| 485 |
\pIIe@lineto\@ovxx{-\@halfwidth}% |
| 486 |
\pIIe@lineto\z@{-\@halfwidth}% |
| 487 |
\pIIe@lineto\z@{\@halfwidth}% |
| 488 |
\pIIe@lineto\@ovxx{\@halfwidth}% |
| 489 |
\else |
| 490 |
\pIIe@lineto\@ovdx\z@ |
| 491 |
\fi |
| 492 |
\pIIe@lineto\@xdim\@ydim |
| 493 |
\pIIe@lineto\@linelen\z@} |
| 494 |
\def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}} |
| 495 |
\def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}} |
| 496 |
\newcommand*\pIIe@circ[1]{% |
| 497 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 498 |
\ifdim\pIIe@tempdima<\z@ \pIIe@badcircarg \fi |
| 499 |
\divide\pIIe@tempdima\tw@ |
| 500 |
\pIIe@circle\pIIe@tempdima |
| 501 |
\if@tempswa \pIIe@fillGraph \else \buttcap \pIIe@strokeGraph \fi |
| 502 |
\endgroup} |
| 503 |
\newcommand*\pIIe@circle[1]{% |
| 504 |
\pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}% |
| 505 |
\pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}\pIIe@closepath} |
| 506 |
\newcommand*\pIIe@qcircle[3][0]{% |
| 507 |
\begingroup |
| 508 |
\@ovro#3\relax \@ovri0.55228474983\@ovro |
| 509 |
\@tempdimc\@ovri \advance\@tempdimc-\@ovro |
| 510 |
\ifnum#1>\z@ \@tempswatrue \else \@tempswafalse \fi |
| 511 |
\ifcase#2\relax |
| 512 |
\pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro |
| 513 |
\or |
| 514 |
\pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}% |
| 515 |
\or |
| 516 |
\pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}% |
| 517 |
\or |
| 518 |
\pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro |
| 519 |
\fi |
| 520 |
\endgroup} |
| 521 |
\newcommand*\pIIe@@qcircle[8]{% |
| 522 |
\if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}} |
| 523 |
\newcommand*\pIIe@badcircarg{% |
| 524 |
\PackageError{pict2e}% |
| 525 |
{Illegal argument in \protect\circle(*), \protect\oval, \protect\arc(*) or |
| 526 |
\protect\circlearc.}% |
| 527 |
{The radius of a circle, dot, arc or oval corner must be greater than zero.}}% |
| 528 |
\newcommand*\maxovalrad{20pt} |
| 529 |
\newcommand*\pIIe@defaultUL[2]{% |
| 530 |
\@defaultunitsset\pIIe@tempdima{#2}\unitlength |
| 531 |
\edef#1{\the\pIIe@tempdima}} |
| 532 |
\newcommand*\pIIe@def@UL{} |
| 533 |
\def\pIIe@def@UL#1\relax#2#3{% |
| 534 |
\edef#2{\the\dimen@}} |
| 535 |
\newcommand*\pIIe@maxovalrad{} |
| 536 |
\newcommand*\pIIe@oval{} |
| 537 |
\def\pIIe@oval#1(#2,#3){\@ifnextchar[{\@oval(#2,#3)}{\@oval(#2,#3)[]}} |
| 538 |
\renewcommand*\oval[1][\maxovalrad]{% |
| 539 |
\begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}% |
| 540 |
\ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi |
| 541 |
\pIIe@oval} |
| 542 |
\def\@oval(#1,#2)[#3]{% |
| 543 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength \divide\pIIe@tempdima\tw@ |
| 544 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength \divide\pIIe@tempdimb\tw@ |
| 545 |
\pIIe@tempdimc \ifdim\pIIe@tempdimb>\pIIe@tempdima \pIIe@tempdima \else \pIIe@tempdimb \fi |
| 546 |
\ifdim\pIIe@maxovalrad<\pIIe@tempdimc \pIIe@tempdimc\pIIe@maxovalrad\relax \fi |
| 547 |
\pIIe@tempdimd\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimc |
| 548 |
\pIIe@tempdime\pIIe@tempdimb \advance\pIIe@tempdime-\pIIe@tempdimc |
| 549 |
\pIIe@get@quadrants{#3}% |
| 550 |
\ifnum15=\@tempcnta \pIIe@buttcap \fi |
| 551 |
\@tempswatrue |
| 552 |
\ifnum9=\@tempcnta |
| 553 |
\pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}% |
| 554 |
\thr@@\pIIe@tempdimc\pIIe@tempdima\z@ |
| 555 |
\@tempcnta\@ne |
| 556 |
\fi |
| 557 |
\pIIe@qoval\pIIe@tempdima\z@\pIIe@tempdima\pIIe@tempdime% |
| 558 |
\z@\pIIe@tempdimc\z@\pIIe@tempdimb |
| 559 |
\pIIe@qoval\z@\pIIe@tempdimb{-\pIIe@tempdimd}\pIIe@tempdimb% |
| 560 |
\@ne\pIIe@tempdimc{-\pIIe@tempdima}\z@ |
| 561 |
\pIIe@qoval{-\pIIe@tempdima}\z@{-\pIIe@tempdima}{-\pIIe@tempdime}% |
| 562 |
\tw@\pIIe@tempdimc\z@{-\pIIe@tempdimb}% |
| 563 |
\pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}% |
| 564 |
\thr@@\pIIe@tempdimc\pIIe@tempdima\z@ |
| 565 |
\pIIe@strokeGraph |
| 566 |
\endgroup} |
| 567 |
\newcommand*\pIIe@qoval[8]{% |
| 568 |
\ifodd\@tempcnta |
| 569 |
\if@tempswa\pIIe@moveto{#1}{#2}\fi |
| 570 |
\pIIe@lineto{#3}{#4}\pIIe@qcircle{#5}{#6}\pIIe@lineto{#7}{#8}% |
| 571 |
\@tempswafalse |
| 572 |
\else |
| 573 |
\@tempswatrue |
| 574 |
\fi |
| 575 |
\divide\@tempcnta\tw@} |
| 576 |
\newcommand*\pIIe@get@quadrants[1]{% |
| 577 |
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@ |
| 578 |
\@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}% |
| 579 |
\if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi |
| 580 |
\if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi} |
| 581 |
\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){% |
| 582 |
\ifnum #1=\z@ |
| 583 |
\@killglue |
| 584 |
\begingroup |
| 585 |
\@defaultunitsset\pIIe@tempdima{#2}\unitlength |
| 586 |
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength |
| 587 |
\@defaultunitsset\pIIe@tempdimc{#4}\unitlength |
| 588 |
\@defaultunitsset\pIIe@tempdimd{#5}\unitlength |
| 589 |
\@defaultunitsset\pIIe@tempdime{#6}\unitlength |
| 590 |
\@defaultunitsset\pIIe@tempdimf{#7}\unitlength |
| 591 |
\pIIe@bezier@QtoC\pIIe@tempdima\pIIe@tempdimc\@ovro |
| 592 |
\pIIe@bezier@QtoC\pIIe@tempdimb\pIIe@tempdimd\@ovri |
| 593 |
\pIIe@bezier@QtoC\pIIe@tempdime\pIIe@tempdimc\@clnwd |
| 594 |
\pIIe@bezier@QtoC\pIIe@tempdimf\pIIe@tempdimd\@clnht |
| 595 |
\pIIe@moveto\pIIe@tempdima\pIIe@tempdimb |
| 596 |
\pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\pIIe@tempdime\pIIe@tempdimf |
| 597 |
\pIIe@strokeGraph |
| 598 |
\endgroup |
| 599 |
\ignorespaces |
| 600 |
\else |
| 601 |
\pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7) |
| 602 |
\fi} |
| 603 |
\newcommand*\pIIe@bezier@QtoC[3]{% |
| 604 |
\@tempdimc#1\relax \advance\@tempdimc-#2\relax |
| 605 |
\divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax |
| 606 |
#3\@tempdimc} |
| 607 |
\ifx\undefined\@arclen \newdimen\@arclen \fi |
| 608 |
\ifx\undefined\@arcrad \newdimen\@arcrad \fi |
| 609 |
\ifx\undefined\pIIe@tempdima \newdimen\pIIe@tempdima \fi |
| 610 |
\ifx\undefined\pIIe@tempdimb \newdimen\pIIe@tempdimb \fi |
| 611 |
\ifx\undefined\pIIe@tempdimc \newdimen\pIIe@tempdimc \fi |
| 612 |
\ifx\undefined\pIIe@tempdimd \newdimen\pIIe@tempdimd \fi |
| 613 |
\ifx\undefined\pIIe@tempdime \newdimen\pIIe@tempdime \fi |
| 614 |
\ifx\undefined\pIIe@tempdimf \newdimen\pIIe@tempdimf \fi |
| 615 |
\newcommand*\pIIe@arc[6][0]{% |
| 616 |
\@arcrad #4\relax |
| 617 |
\ifdim \@arcrad<\z@ \pIIe@badcircarg \else |
| 618 |
\@arclen #6\p@ \advance\@arclen -#5\p@ |
| 619 |
\ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi |
| 620 |
\ifdim \sign\@arclen>720\p@ |
| 621 |
\PackageWarning {pict2e}{The arc angle is reduced to -720..720}% |
| 622 |
\@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}% |
| 623 |
\@tempdima #5\p@ \advance\@tempdima \@arclen |
| 624 |
\edef\@angleend{\strip@pt\@tempdima}% |
| 625 |
\pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}% |
| 626 |
\else |
| 627 |
\pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}% |
| 628 |
\fi |
| 629 |
\fi} |
| 630 |
\newcommand*\pIIe@@arc[6]{% |
| 631 |
\begingroup |
| 632 |
\ifdim \sign\@arclen>90\p@ |
| 633 |
\divide\@arclen 2 |
| 634 |
\@tempdima #5\p@ \advance\@tempdima \@arclen |
| 635 |
\edef\@anglemid{\strip@pt\@tempdima}% |
| 636 |
\def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}% |
| 637 |
\expandafter\@temp\expandafter{\@anglemid}% |
| 638 |
\def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}% |
| 639 |
\expandafter\@temp\expandafter{\@anglemid}{#6}% |
| 640 |
\else |
| 641 |
\CalculateSin{#5}\CalculateCos{#5}% |
| 642 |
\@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax |
| 643 |
\@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax |
| 644 |
\ifcase #1\relax |
| 645 |
\pIIe@lineto\@tempdima\@tempdimb |
| 646 |
\or \pIIe@moveto\@tempdima\@tempdimb |
| 647 |
\or |
| 648 |
\else \PackageWarning {pict2e}% |
| 649 |
{Illegal obligatory argument in \protect\circlearc.}% |
| 650 |
\fi |
| 651 |
\@tempdimc\@arclen \divide\@tempdimc\@iv |
| 652 |
\edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}% |
| 653 |
\@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@ |
| 654 |
\advance\@tempdima-\UseSin{#5}\@linelen |
| 655 |
\advance\@tempdimb \UseCos{#5}\@linelen |
| 656 |
\pIIe@add@nums\@tempdima\@tempdimb |
| 657 |
\CalculateSin{#6}\CalculateCos{#6}% |
| 658 |
\@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax |
| 659 |
\@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax |
| 660 |
\@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima |
| 661 |
\pIIe@tempdimd-\UseCos{#6}\@linelen \advance\pIIe@tempdimd \@tempdimb |
| 662 |
\pIIe@add@nums\@tempdimc\pIIe@tempdimd |
| 663 |
\pIIe@add@CP\@tempdima\@tempdimb |
| 664 |
\pIIe@addtoGraph\pIIe@curveto@op |
| 665 |
\fi |
| 666 |
\endgroup} |
| 667 |
\newcommand*\pIIearc |
| 668 |
{\@ifstar{\@tempswatrue\pIIe@arc@}{\@tempswafalse\pIIe@arc@}} |
| 669 |
\newcommand*\pIIe@arc@[2][0,360]{\pIIe@arc@@(#1){#2}} |
| 670 |
\def\pIIe@arc@@(#1,#2)#3{% |
| 671 |
\@defaultunitsset\pIIe@tempdima{#3}\unitlength |
| 672 |
\if@tempswa |
| 673 |
\pIIe@moveto\z@\z@ |
| 674 |
\pIIe@arc{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}% |
| 675 |
\pIIe@closepath\pIIe@fillGraph |
| 676 |
\else |
| 677 |
\pIIe@arc[1]{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}% |
| 678 |
\pIIe@strokeGraph |
| 679 |
\fi} |
| 680 |
\ifx\undefined\arc |
| 681 |
\else |
| 682 |
\PackageWarning{pict2e}{\protect\arc\space redefined}% |
| 683 |
\fi |
| 684 |
\let\arc\pIIearc |
| 685 |
\let\lp@r( \let\rp@r) |
| 686 |
\def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)} |
| 687 |
\def\polyline(#1,#2){% |
| 688 |
\@killglue |
| 689 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 690 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 691 |
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 692 |
\@ifnextchar\lp@r{\@polyline}{\PackageWarning{pict2e}% |
| 693 |
{Polygonal lines require at least two vertices!}% |
| 694 |
\ignorespaces}} |
| 695 |
\def\@polyline(#1,#2){% |
| 696 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 697 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 698 |
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 699 |
\@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}} |
| 700 |
\def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)} |
| 701 |
\def\polyvector(#1,#2){% |
| 702 |
\@killglue |
| 703 |
\@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{% |
| 704 |
\PackageWarning{pict2e}% |
| 705 |
{Polygonal vectors require at least two vertices!}\ignorespaces}} |
| 706 |
\def\@polyvector(#1,#2)(#3,#4){% |
| 707 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 708 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 709 |
\@defaultunitsset\pIIe@tempdimc{#3}\unitlength |
| 710 |
\@defaultunitsset\pIIe@tempdimd{#4}\unitlength |
| 711 |
\advance\pIIe@tempdimc-\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimb |
| 712 |
\ifdim\pIIe@tempdimc=\z@ \@linelen\pIIe@tempdimd \else |
| 713 |
\ifdim\pIIe@tempdimd=\z@ \@linelen\pIIe@tempdimc \else |
| 714 |
\pIIe@pyth\pIIe@tempdimc\pIIe@tempdimd\@linelen |
| 715 |
\fi |
| 716 |
\fi |
| 717 |
\ifdim\@linelen<\z@ \@linelen-\@linelen\fi |
| 718 |
\pIIe@divide{\pIIe@tempdimc}\@linelen\pIIe@tempdime |
| 719 |
\pIIe@divide{\pIIe@tempdimd}\@linelen\pIIe@tempdimf |
| 720 |
\pIIe@concat\pIIe@tempdime\pIIe@tempdimf{-\pIIe@tempdimf}\pIIe@tempdime\pIIe@tempdima\pIIe@tempdimb |
| 721 |
\pIIe@vector \pIIe@fillGraph |
| 722 |
\@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}} |
| 723 |
\def\polygon{% |
| 724 |
\@killglue |
| 725 |
\@ifstar{\begingroup\@tempswatrue\@polygon}% |
| 726 |
{\begingroup\@tempswafalse\@polygon}} |
| 727 |
\def\@polygon(#1,#2){% |
| 728 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 729 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 730 |
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 731 |
\@ifnextchar\lp@r{\@@polygon}{\PackageWarning{pict2e}% |
| 732 |
{Polygons require at least two vertices!}% |
| 733 |
\ignorespaces}} |
| 734 |
\def\@@polygon(#1,#2){% |
| 735 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 736 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 737 |
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 738 |
\@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath |
| 739 |
\if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi |
| 740 |
\endgroup |
| 741 |
\ignorespaces}} |
| 742 |
\def\moveto(#1,#2){% |
| 743 |
\@killglue |
| 744 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 745 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 746 |
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 747 |
\ignorespaces} |
| 748 |
\def\lineto(#1,#2){% |
| 749 |
\@killglue |
| 750 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 751 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 752 |
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 753 |
\ignorespaces} |
| 754 |
\def\curveto(#1,#2)(#3,#4)(#5,#6){% |
| 755 |
\@killglue |
| 756 |
\@defaultunitsset\pIIe@tempdima{#1}\unitlength |
| 757 |
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength |
| 758 |
\@defaultunitsset\pIIe@tempdimc{#3}\unitlength |
| 759 |
\@defaultunitsset\pIIe@tempdimd{#4}\unitlength |
| 760 |
\@defaultunitsset\pIIe@tempdime{#5}\unitlength |
| 761 |
\@defaultunitsset\pIIe@tempdimf{#6}\unitlength |
| 762 |
\pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}% |
| 763 |
{\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}% |
| 764 |
\ignorespaces} |
| 765 |
\newcommand*\circlearc[6][0]{% |
| 766 |
\@killglue |
| 767 |
\@defaultunitsset\pIIe@tempdima{#2}\unitlength |
| 768 |
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength |
| 769 |
\@defaultunitsset\pIIe@tempdimc{#4}\unitlength |
| 770 |
\pIIe@arc[#1]{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}{#5}{#6}% |
| 771 |
\ignorespaces} |
| 772 |
\def\closepath{\pIIe@closepath} |
| 773 |
\def\strokepath{\pIIe@strokeGraph} |
| 774 |
\def\fillpath{\pIIe@fillGraph} |
| 775 |
\ifcase\pIIe@mode\relax |
| 776 |
\or |
| 777 |
\newcommand*\pIIe@linecap@op{setlinecap} |
| 778 |
\newcommand*\pIIe@linejoin@op{setlinejoin} |
| 779 |
\or |
| 780 |
\newcommand*\pIIe@linecap@op{J} |
| 781 |
\newcommand*\pIIe@linejoin@op{j} |
| 782 |
\fi |
| 783 |
\def\pIIe@linecap{} |
| 784 |
\def\pIIe@linejoin{} |
| 785 |
\def\buttcap{\edef\pIIe@linecap{ 0 \pIIe@linecap@op}} |
| 786 |
\def\roundcap{\edef\pIIe@linecap{ 1 \pIIe@linecap@op}} |
| 787 |
\def\squarecap{\edef\pIIe@linecap{ 2 \pIIe@linecap@op}} |
| 788 |
\def\miterjoin{\edef\pIIe@linejoin{ 0 \pIIe@linejoin@op}} |
| 789 |
\def\roundjoin{\edef\pIIe@linejoin{ 1 \pIIe@linejoin@op}} |
| 790 |
\def\beveljoin{\edef\pIIe@linejoin{ 2 \pIIe@linejoin@op}} |
| 791 |
\AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*% |
| 792 |
\cbezier[2][0]{\pIIe@@cbezier[#1]#2}% |
| 793 |
\@ifdefinable\pIIe@@cbezier{}% |
| 794 |
\def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}% |
| 795 |
\def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){% |
| 796 |
\@killglue |
| 797 |
\@defaultunitsset\pIIe@tempdima{#2}\unitlength |
| 798 |
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength |
| 799 |
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}% |
| 800 |
\@defaultunitsset\pIIe@tempdima{#4}\unitlength |
| 801 |
\@defaultunitsset\pIIe@tempdimb{#5}\unitlength |
| 802 |
\@defaultunitsset\pIIe@tempdimc{#6}\unitlength |
| 803 |
\@defaultunitsset\pIIe@tempdimd{#7}\unitlength |
| 804 |
\@defaultunitsset\pIIe@tempdime{#8}\unitlength |
| 805 |
\@defaultunitsset\pIIe@tempdimf{#9}\unitlength |
| 806 |
\pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}% |
| 807 |
{\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}% |
| 808 |
\pIIe@strokeGraph |
| 809 |
\ignorespaces}% |
| 810 |
} |
| 811 |
\else |
| 812 |
\renewcommand*\oval[1][]{\pIIe@oldoval} |
| 813 |
\newcommand*\maxovalrad{20pt} |
| 814 |
\newcommand*\OriginalPictureCmds{} |
| 815 |
\fi |
| 816 |
\Gin@codes |
| 817 |
\let\Gin@codes\relax |
| 818 |
\endinput |
| 819 |
%% |
| 820 |
%% End of file `pict2e.sty'. |