summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex
diff options
context:
space:
mode:
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.tex47
1 files changed, 28 insertions, 19 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 b9b29a666e3..d92acc32498 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,11 +1,21 @@
% tkz-obj-eu-polygons.tex
-% Copyright 2020 by Alain Matthes
-% This file may be distributed and/or modified
-% 1. under the LaTeX Project Public License and/or
-% 2. under the GNU Public License.
-\def\fileversion{3.02c}
-\def\filedate{2020/01/24}
-\typeout{2020/01/24 3.02c tkz-obj-eu-polygons.tex}
+% Copyright 2020 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.
+% The latest version of this license is in
+% 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.05c}
+\def\filedate{2020/03/03}
+\typeout{2020/03/03 3.05c tkz-obj-eu-polygons.tex}
+% bug in regular polygon side 2020/03/03
\makeatletter
%<--------------------------------------------------------------------------–>
% Polygon
@@ -36,10 +46,10 @@
\def\tkzDefGoldRectangle(#1,#2){
\begingroup
- \tkzVecKOrth[-\tkzInvPhi](#2,#1)
- \pgfnodealias{tkzFirstPointResult}{tkzPointResult}
- \tkzVecKOrth[\tkzInvPhi](#1,#2)
- \pgfnodealias{tkzSecondPointResult}{tkzPointResult}
+ \tkzDefPointWith[K=-\tkzInvPhi](#2,#1)
+ \pgfnodealias{tkzFirstPointResult}{tkzPointResult}
+ \tkzDefPointWith[K=\tkzInvPhi](#1,#2)
+ \pgfnodealias{tkzSecondPointResult}{tkzPointResult}
\endgroup
}
\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{%
@@ -50,14 +60,13 @@
\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},
- center,
- name = P,
- sides = 5
+ 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[]}}
+\def\tkzDefRegPolygon{\pgfutil@ifnextchar[{\tkz@DefRegPolygon}{\tkz@DefRegPolygon[]}}
\def\tkz@DefRegPolygon[#1](#2,#3){%
\begingroup
\pgfqkeys{/defregpoly}{#1}
@@ -85,7 +94,7 @@
\pgfmathsetmacro{\tkz@regangleside}{(180-\tkz@regangle)/2}
\tkzDefMidPoint(#1,#2)
\pgfnodealias{tkz@tempPt}{tkzPointResult}
-\tkzCalcLength[cm](tkz@tempPt,B) \tkzGetLength{tkz@len}
+\tkzCalcLength[cm](tkz@tempPt,#1) \tkzGetLength{tkz@len}
\pgfmathsetmacro{\tkz@inscriberadius}{%
\tkz@len*tan(90*(\tkz@regpolsides-2)/\tkz@regpolsides)}
\tkzDefPointWith[orthogonal normed,K=\tkz@inscriberadius](tkz@tempPt,#2)