From 5ec5f19d019852c1f26cfc8fe2822ade4a59c0ee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 8 Feb 2019 22:55:02 +0000 Subject: curve2e (8feb19) git-svn-id: svn://tug.org/texlive/trunk@49974 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/curve2e/curve2e.sty | 46 ++++++++++++++++++------- 1 file changed, 33 insertions(+), 13 deletions(-) (limited to 'Master/texmf-dist/tex/latex/curve2e') diff --git a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty index 3a72e84ffd2..0224f13d05a 100644 --- a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty +++ b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty @@ -6,16 +6,17 @@ %% %% curve2e.dtx (with options: `package') %% -%% Copyright (C) 2005--2015 Claudio Beccari all rights reserved. +%% Copyright (C) 2005--2019 Claudio Beccari all rights reserved. %% License information appended %% -\NeedsTeXFormat{LaTeX2e}[2014/05/01] +\NeedsTeXFormat{LaTeX2e}[2016/01/01] \ProvidesPackage{curve2e}% - [2015/07/11 v.1.60 Extension package for pict2e] + [2019/02/07 v.1.61 Extension package for pict2e] \RequirePackage{color} \RequirePackageWithOptions{pict2e}[2014/01/01] +\RequirePackage{xparse} \def\TRON{\tracingcommands\tw@ \tracingmacros\tw@}% \def\TROF{\tracingcommands\z@ \tracingmacros\z@}% \ifx\undefined\@tdA \newdimen\@tdA \fi @@ -55,17 +56,17 @@ \countdef\NumA3254\countdef\NumB3252\relax \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB - \SubVect\V@ttA from\V@ttB to\V@ttC - \ModOfVect\V@ttC to\DlineMod - \DivideFN\DlineMod by#3 to\NumD - \NumA\expandafter\Integer\NumD.?? - \ifodd\NumA\else\advance\NumA\@ne\fi - \NumB=\NumA \divide\NumB\tw@ - \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod - \DividE\p@ by\NumA\p@ to \@tempa - \MultVect\V@ttC by\@tempa,0 to\V@ttB + \SubVect\V@ttA from\V@ttB to\V@ttC + \ModOfVect\V@ttC to\DlineMod + \DivideFN\DlineMod by#3 to\NumD + \NumA\expandafter\Integer\NumD.?? + \ifodd\NumA\else\advance\NumA\@ne\fi + \NumB=\NumA \divide\NumB\tw@ + \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod + \DividE\p@ by\NumA\p@ to \@tempa + \MultVect\V@ttC by\@tempa,0 to\V@ttB \MultVect\V@ttB by 2,0 to\V@ttC - \advance\NumB\@ne + \advance\NumB\@ne \edef\@mpt{\noexpand\egroup \noexpand\multiput(\V@ttA)(\V@ttC){\number\NumB}% {\noexpand\LIne(\V@ttB)}}% @@ -177,6 +178,25 @@ \def\p@lyline(#1){\GetCoord(#1)\d@mX\d@mY \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}% \@ifnextchar\lp@r{\p@lyline}{\strokepath\ignorespaces}} +\providecommand\polygon{} +\RenewDocumentCommand\polygon{s O{\beveljoin} }{\@killglue\begingroup +\IfBooleanTF{#1}{\@tempswatrue}{\@tempswafalse}% +\@polygon[#2]} + +\def\@polygon[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY + \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}% + \@ifnextchar\lp@r{\@@polygon}{% + \PackageWarning{curve2e}% + {Polygons require at least two vertices!\MessageBreak + Control your polygon specification\MessageBreak}% + \ignorespaces}} + + \def\@@polygon(#1){\GetCoord(#1)\d@mX\d@mY + \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}% + \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath + \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi + \endgroup + \ignorespaces}} \def\GraphGrid(#1,#2){\bgroup\textcolor{red}{\linethickness{.1\p@}% \RoundUp#1modulo10to\@GridWd \RoundUp#2modulo10to\@GridHt \@tempcnta=\@GridWd \divide\@tempcnta10\relax \advance\@tempcnta\@ne -- cgit v1.2.3