summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex158
1 files changed, 80 insertions, 78 deletions
diff --git a/macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex b/macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex
index 7645cf523a..21f2987bb9 100644
--- a/macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex
+++ b/macros/latex/contrib/tkz/tkz-base/latex/tkz-obj-points.tex
@@ -10,9 +10,9 @@
% This work has the LPPL maintenance status “maintained”.
% The Current Maintainer of this work is Alain Matthes.
-\def\fileversion{4.05b}
-\def\filedate{2022/01/28 }
-\typeout{2022/01/28 4.05b tkz-obj-eu-points.tex}
+\def\fileversion{4.2c}
+\def\filedate{2022/07/14 }
+\typeout{2022/07/14 4.2c tkz-obj-points.tex}
\makeatletter
%<--------------------------------------------------------------------------->
% init def point
@@ -116,56 +116,6 @@
% \tkz@DrawPt{#1}
% }
%<--------------------------------------------------------------------------->
-% tkzSetUpPoint définit la forme d'un point
-%<--------------------------------------------------------------------------->
-\pgfkeys{/tkzsetuppt/.cd,
- size/.store in = \tkz@pt@size,
- color/.store in = \tkz@pt@color,
- fill/.store in = \tkz@pt@fill,
- shape/.store in = \tkz@pt@shape,
- size = \tkz@euc@pointsize,
- color = \tkz@euc@pointcolor,
- fill = \tkz@euc@pointcolor,
- shape = \tkz@euc@pointshape,
- /tkzsetuppt/.search also = {/tikz},
- }
-\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{%
- \tkz@SetUpPoint[]}}
-\def\tkz@SetUpPoint[#1]{%
-\pgfqkeys{/tkzsetuppt}{#1}
-% redefine point style with new values
-\tikzset{point style/.style={draw = \tkz@pt@color,
- inner sep = 0pt,
- shape = \tkz@pt@shape,
- minimum size = \tkz@pt@size,
- fill = \tkz@pt@fill}}
-}% end setup
-%<--------------------------------------------------------------------------->
-% Draw Point
-%<--------------------------------------------------------------------------->
-\pgfkeys{/tkzdrawpt/.cd,
- size/.code = {\tikzset{point style/.append style={minimum size = #1}}},
- size = \tkz@euc@pointsize,
- /tkzdrawpt/.search also = {/tikz},
-}
-%<--------------------------------------------------------------------------
-\def\tkzDrawPoint{\pgfutil@ifnextchar[{\tkz@DrawPoint}{\tkz@DrawPoint[]}}
-\def\tkz@DrawPoint[#1](#2){%
-\begingroup
- \pgfqkeys{/tkzdrawpt}{#1}
- \node[point style,/tkzdrawpt/.cd,#1] at (#2) {};%2016
-\endgroup
-}
-%<--------------------------------------------------------------------------->
-\def\tkzDrawPoints{\pgfutil@ifnextchar[{\tkz@drawpts}{\tkz@drawpts[]}}
-%<--------------------------------------------------------------------------->
-\def\tkz@drawpts[#1](#2){%
-\begingroup
- \pgfqkeys{/tkzdrawpt}{#1}
- \foreach \point in {#2}{\node[point style,/tkzdrawpt/.cd,#1] at (\point) {};} %2016
-\endgroup
-}
-%<--------------------------------------------------------------------------->
%
%<--------------------------------------------------------------------------->
\def\tkzRenamePoint(#1)#2{\coordinate (#2) at (#1);}
@@ -191,6 +141,32 @@
\coordinate (#3) at (#2);
\end{scope}
}
+%<--------------------------------------------------------------------------->
+% Coordonnées d'un point
+% result in #2x et #2y #1 est le point et on récupère ses coordonnées
+% usage soit A un point \tkzGetPointCoord(A){V} alors \Vx = xA et \Vy = yA
+% en cm
+% tkzGetPointCoord avec [#1] cm ou bien pt ?? todo
+%<--------------------------------------------------------------------------->
+\def\tkzGetPointCoord(#1)#2{%
+\begingroup
+ \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}
+ \pgfmathparse{\pgf@sys@tonumber{\pgf@x}/28.45274}
+ \global\let\tkzresultx\pgfmathresult
+ \global\expandafter\edef\csname #2x\endcsname{\tkzresultx}%
+ \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}
+ \pgfmathparse{\pgf@sys@tonumber{\pgf@y}/28.45274}
+ \global\let\tkzresulty\pgfmathresult
+ \global\expandafter\edef\csname #2y\endcsname{\tkzresulty}
+\endgroup
+}
+\def\tkz@@extractxy#1{%
+\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}
+\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}
+}
+\let\tkzGetPointxy\tkzGetPointCoord
+%<--------------------------------------------------------------------------->
+%%%%%%%%%. Label,draw
%<-------------------------------------------------------------------------->
% tkzLabelPoint Affichage des LABELS pour un point
%<-------------------------------------------------------------------------->
@@ -248,10 +224,60 @@
\begingroup
\pgfqkeys{/tkzautolab}{#1}
\foreach \point in {#2}{
- \path (\tkz@center) -- ($ (\point) + \tkz@dist*($(\point)-(\tkz@center)$) $) node[/tkzautolab/.cd,#1]{$\point$};}
+ \path (\tkz@center) -- ($ (\point) + \tkz@dist*($(\point)-(\tkz@center)$) $) node[/tkzautolab/.cd,label style,#1]{$\point$};}
\endgroup
}%
%<--------------------------------------------------------------------------->
+% tkzSetUpPoint définit la forme d'un point
+%<--------------------------------------------------------------------------->
+\pgfkeys{/tkzsetuppt/.cd,
+ size/.store in = \tkz@pt@size,
+ color/.store in = \tkz@pt@color,
+ fill/.store in = \tkz@pt@fill,
+ shape/.store in = \tkz@pt@shape,
+ size = \tkz@euc@pointsize,
+ color = \tkz@euc@pointcolor,
+ fill = \tkz@euc@pointcolor,
+ shape = \tkz@euc@pointshape,
+ /tkzsetuppt/.search also = {/tikz},
+ }
+\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{%
+ \tkz@SetUpPoint[]}}
+\def\tkz@SetUpPoint[#1]{%
+\pgfqkeys{/tkzsetuppt}{#1}
+% redefine point style with new values
+\tikzset{point style/.style={draw = \tkz@pt@color,
+ inner sep = 0pt,
+ shape = \tkz@pt@shape,
+ minimum size = \tkz@pt@size,
+ fill = \tkz@pt@fill}}
+}% end setup
+%<--------------------------------------------------------------------------->
+% Draw Point
+%<--------------------------------------------------------------------------->
+\pgfkeys{/tkzdrawpt/.cd,
+ size/.code = {\tikzset{point style/.append style={minimum size = #1}}},
+ size = \tkz@euc@pointsize,
+ /tkzdrawpt/.search also = {/tikz},
+}
+%<--------------------------------------------------------------------------
+\def\tkzDrawPoint{\pgfutil@ifnextchar[{\tkz@DrawPoint}{\tkz@DrawPoint[]}}
+\def\tkz@DrawPoint[#1](#2){%
+\begingroup
+ \pgfqkeys{/tkzdrawpt}{#1}
+ \node[point style,/tkzdrawpt/.cd,#1] at (#2) {};%2016
+\endgroup
+}
+%<--------------------------------------------------------------------------->
+\def\tkzDrawPoints{\pgfutil@ifnextchar[{\tkz@drawpts}{\tkz@drawpts[]}}
+%<--------------------------------------------------------------------------->
+\def\tkz@drawpts[#1](#2){%
+\begingroup
+ \pgfqkeys{/tkzdrawpt}{#1}
+ \foreach \point in {#2}{\node[point style,/tkzdrawpt/.cd,#1] at (\point) {};} %2016
+\endgroup
+}
+%<--------------------------------------------------------------------------->
% PointShowCoord
%<--------------------------------------------------------------------------->
\pgfkeys{/tkzprcoord/.cd,
@@ -295,29 +321,5 @@
\endgroup
}
\let\tkzShowPointCoord\tkzPointShowCoord
-%<--------------------------------------------------------------------------->
-% Coordonnées d'un point
-% result in #2x et #2y #1 est le point et on récupère ses coordonnées
-% usage soit A un point \tkzGetPointCoord(A){V} alors \Vx = xA et \Vy = yA
-% en cm
-% tkzGetPointCoord avec [#1] cm ou bien pt ?? todo
-%<--------------------------------------------------------------------------->
-\def\tkzGetPointCoord(#1)#2{%
-\begingroup
- \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}
- \pgfmathparse{\pgf@sys@tonumber{\pgf@x}/28.45274}
- \global\let\tkzresultx\pgfmathresult
- \global\expandafter\edef\csname #2x\endcsname{\tkzresultx}%
- \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}
- \pgfmathparse{\pgf@sys@tonumber{\pgf@y}/28.45274}
- \global\let\tkzresulty\pgfmathresult
- \global\expandafter\edef\csname #2y\endcsname{\tkzresulty}
-\endgroup
-}
-\def\tkz@@extractxy#1{%
-\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}
-\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}
-}
-\let\tkzGetPointxy\tkzGetPointCoord
\makeatother
\endinput \ No newline at end of file