From 9c0288d8e2834239788bddff9ff1cd341f382643 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Jun 2020 20:41:42 +0000 Subject: pict2e (20jun20) git-svn-id: svn://tug.org/texlive/trunk@55609 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/pict2e/pict2e.sty | 31 ++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty index 48d6e7482e6..63e27730da3 100644 --- a/Master/texmf-dist/tex/latex/pict2e/pict2e.sty +++ b/Master/texmf-dist/tex/latex/pict2e/pict2e.sty @@ -24,7 +24,7 @@ %% This work consists of all files listed in `manifest.txt'. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{pict2e}[2020/06/13 v0.3d Improved picture commands (HjG,RN,JT)] +\ProvidesPackage{pict2e}[2020/06/20 v0.3e Improved picture commands (HjG,RN,JT)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax @@ -589,10 +589,10 @@ \else \pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7) \fi} - \newcommand*\pIIe@bezier@QtoC[3]{% - \@tempdimc#1\relax \advance\@tempdimc-#2\relax - \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax - #3\@tempdimc} + \newcommand*\pIIe@bezier@QtoC[3]{% + \@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 @@ -676,6 +676,27 @@ \def\@polyline(#1,#2){% \pIIe@lineto{#1\unitlength}{#2\unitlength}% \@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}} + \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)} + \def\polyvector(#1,#2){% + \@killglue + \@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{% + \PackageWarning{pict2e}% + {Polygonal vectors require at least two vertices!}\ignorespaces}} + \def\@polyvector(#1,#2)(#3,#4){% + \@xdim#1\unitlength \@tempdima=#3\unitlength + \@ydim#2\unitlength \@tempdimb=#4\unitlength + \advance\@tempdima-\@xdim \advance\@tempdimb-\@ydim + \ifdim\@tempdima=\z@ \@linelen\@tempdimb \else + \ifdim\@tempdimb=\z@ \@linelen\@tempdima \else + \pIIe@pyth\@tempdima\@tempdimb\@linelen + \fi + \fi + \ifdim\@linelen<\z@ \@linelen-\@linelen\fi + \pIIe@divide{\@tempdima}\@linelen\@ovxx + \pIIe@divide{\@tempdimb}\@linelen\@ovyy + \pIIe@concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim + \pIIe@vector \pIIe@fillGraph + \@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}} \def\polygon{% \@killglue \@ifstar{\begingroup\@tempswatrue\@polygon}% -- cgit v1.2.3