diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex index 32353d145f1..71305cd9a7e 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-polygons.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,13 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-polygons.tex} -% bug in regular polygon side 2020/03/18 + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-polygons.tex} +% bug in regular polygon side 2020/03/09 \makeatletter %<--------------------------------------------------------------------------–> % Polygon @@ -25,9 +23,9 @@ %<--------------------------------------------------------------------------–> \def\tkzDefSquare(#1,#2){ \begingroup - \tkzURotateAngle(#2,-90)(#1) + \tkzURotateAngle(#2,-90)(#1) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzURotateAngle(#1, 90)(#2) + \tkzURotateAngle(#1, 90)(#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } @@ -39,11 +37,21 @@ \tkzDefPointWith[colinear= at #3](#2,#1) \endgroup } +%<--------------------- rectangle ---------------------------------–> +% +%<--------------------------------------------------------------------------–> + +\def\tkzDefRectangle{\pgfutil@ifnextchar[{\tkz@DefRectangle}% + {\tkz@DefRectangle[]}} +\def\tkz@DefRectangle[#1](#2,#3){% +\begingroup + \path[#1](#2) -| coordinate (tkzFirstPointResult) (#3) -| coordinate (tkzSecondPointResult) (#2); +\endgroup +} %<-------------------------- gold rectangle -------------------------------–> % %<--------------------------------------------------------------------------–> - \def\tkzDefGoldRectangle(#1,#2){ \begingroup \tkzDefPointWith[K=-\tkzInvPhi](#2,#1) @@ -52,18 +60,16 @@ \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } -\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{% - \tkz@DrawGoldRectangle[]}} - +\let\tkzDefGoldenRectangle\tkzDefGoldRectangle %<---------------------------- Regular Polygon -------------------------–> \def\tkz@numregpol{0} \pgfkeys{/defregpoly/.cd, - name/.store in = \tkz@regpolname, - sides/.store in = \tkz@regpolsides, - center/.code = \def\tkz@numregpol{0}, - side/.code = \def\tkz@numregpol{1}, - name/.default = P, - sides/.default = 5, + name/.store in = \tkz@regpolname, + sides/.store in = \tkz@regpolsides, + center/.code = \def\tkz@numregpol{0}, + side/.code = \def\tkz@numregpol{1}, + name/.default = P, + sides/.default = 5, center } \def\tkzDefRegPolygon{\pgfutil@ifnextchar[{\tkz@DefRegPolygon}{\tkz@DefRegPolygon[]}} @@ -94,7 +100,7 @@ \pgfmathsetmacro{\tkz@regangleside}{(180-\tkz@regangle)/2} \tkzDefMidPoint(#1,#2) \pgfnodealias{tkz@tempPt}{tkzPointResult} -\tkzCalcLength[cm](tkz@tempPt,#1) \tkzGetLength{tkz@len} +\tkz@@CalcLengthcm(tkz@tempPt,#1){tkz@len} \pgfmathsetmacro{\tkz@inscriberadius}{% \tkz@len*tan(90*(\tkz@regpolsides-2)/\tkz@regpolsides)} \tkzDefPointWith[orthogonal normed,K=\tkz@inscriberadius](tkz@tempPt,#2) @@ -104,16 +110,6 @@ \endgroup } -%<---------------------------- CLIP --------------------------------–> -% -%<--------------------------------------------------------------------------–> -\def\tkzClipPolygon(#1,#2){% -\path[clip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} - \def\tkzClipOutPolygon(#1,#2){\clip[tkzreverseclip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} \makeatother \endinput
\ No newline at end of file |