| 1 |
% tkz-draw-points.tex |
| 2 |
% Copyright 2011-2026 Alain Matthes |
| 3 |
% SPDX-License-Identifier: LPPL-1.3c |
| 4 |
% Maintainer: Alain Matthes |
| 5 |
|
| 6 |
\typeout{2026/01/25 5.13c tkz-draw-eu-points.tex} |
| 7 |
\makeatletter |
| 8 |
%<---------------------------------------------------------------------------> |
| 9 |
% tkzSetUpPoint définit la forme d'un point |
| 10 |
%<---------------------------------------------------------------------------> |
| 11 |
\pgfkeys{/tkzsetuppt/.cd, |
| 12 |
size/.store in = \tkz@pt@size, |
| 13 |
color/.store in = \tkz@pt@color, |
| 14 |
fill/.store in = \tkz@pt@fill, |
| 15 |
shape/.store in = \tkz@pt@shape, |
| 16 |
size = \tkz@euc@pointsize, |
| 17 |
color = \tkz@euc@pointcolor, |
| 18 |
fill = \tkz@euc@pointfillcolor, |
| 19 |
shape = \tkz@euc@pointshape, |
| 20 |
/tkzsetuppt/.search also = {/tikz}, |
| 21 |
} |
| 22 |
\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{% |
| 23 |
\tkz@SetUpPoint[]}} |
| 24 |
\def\tkz@SetUpPoint[#1]{% |
| 25 |
\pgfqkeys{/tkzsetuppt}{#1} |
| 26 |
% redefine point style with new values |
| 27 |
\tikzset{point style/.style={draw = \tkz@pt@color, |
| 28 |
inner sep = 0pt, |
| 29 |
shape = \tkz@pt@shape, |
| 30 |
minimum size = \tkz@pt@size, |
| 31 |
fill = \tkz@pt@fill}} |
| 32 |
}% end setup |
| 33 |
%<---------------------------------------------------------------------------> |
| 34 |
% Draw Point |
| 35 |
%<---------------------------------------------------------------------------> |
| 36 |
\pgfkeys{/tkzdrawpt/.cd, |
| 37 |
size/.code = {\tikzset{point style/.append style={minimum size = #1}}}, |
| 38 |
size = \tkz@euc@pointsize, |
| 39 |
/tkzdrawpt/.search also = {/tikz}, |
| 40 |
} |
| 41 |
%<-------------------------------------------------------------------------- |
| 42 |
\def\tkzDrawPoint{\pgfutil@ifnextchar[{\tkz@DrawPoint}{\tkz@DrawPoint[]}} |
| 43 |
\def\tkz@DrawPoint[#1](#2){% |
| 44 |
\begingroup |
| 45 |
\pgfqkeys{/tkzdrawpt}{#1} |
| 46 |
\node[point style,/tkzdrawpt/.cd,#1] at (#2) {};%2016 |
| 47 |
\endgroup |
| 48 |
} |
| 49 |
%<---------------------------------------------------------------------------> |
| 50 |
\def\tkzDrawPoints{\pgfutil@ifnextchar[{\tkz@drawpts}{\tkz@drawpts[]}} |
| 51 |
%<---------------------------------------------------------------------------> |
| 52 |
\def\tkz@drawpts[#1](#2){% |
| 53 |
\begingroup |
| 54 |
\pgfqkeys{/tkzdrawpt}{#1} |
| 55 |
\foreach \point in {#2}{\node[point style,/tkzdrawpt/.cd,#1] at (\point) {};} %2016 |
| 56 |
\endgroup |
| 57 |
} |
| 58 |
%<--------------------------------------------------------------------------> |
| 59 |
% tkzLabelPoint Affichage des LABELS pour un point |
| 60 |
%<--------------------------------------------------------------------------> |
| 61 |
\def\tkzLabelPoint{\pgfutil@ifnextchar[{\tkz@LabelPoint}{\tkz@LabelPoint[]}} |
| 62 |
\def\tkz@LabelPoint[#1](#2)#3{% |
| 63 |
\node[label style,#1] at (#2) {#3};}% |
| 64 |
%<---------------------------------------------------------------------------> |
| 65 |
|
| 66 |
\def\tkzLabelPoints{\pgfutil@ifnextchar[{\tkz@LabelPoints}{\tkz@LabelPoints[]}}% |
| 67 |
\def\tkz@LabelPoints[#1](#2){% |
| 68 |
\foreach \point in {#2}{ |
| 69 |
\node[label style,#1] at (\point) {$\point$};} |
| 70 |
}% |
| 71 |
%<---------------------------------------------------------------------------> |
| 72 |
%<---------------------------------------------------------------------------> |
| 73 |
% |
| 74 |
%<---------------------------------------------------------------------------> |
| 75 |
\def\tkzSetUpLabel{\pgfutil@ifnextchar[{\tkz@SetUpLabel}{% |
| 76 |
\tkz@SetUpLabel[]}} |
| 77 |
\def\tkz@SetUpLabel[#1]{% |
| 78 |
\tikzset{label style/.style={#1}} |
| 79 |
}% end setup |
| 80 |
%<---------------------------------------------------------------------------> |
| 81 |
|
| 82 |
\pgfkeys{/tkzautolab/.cd, |
| 83 |
center/.store in = \tkz@center, |
| 84 |
dist/.store in = \tkz@dist, |
| 85 |
dist = 0.15, |
| 86 |
/tkzautolab/.search also = {/tikz}, |
| 87 |
} |
| 88 |
\def\tkzAutoLabelPoints{\pgfutil@ifnextchar[{\tkz@AutoLabelPoints}{\tkz@AutoLabelPoints[]}}% |
| 89 |
\def\tkz@AutoLabelPoints[#1](#2){% |
| 90 |
\begingroup |
| 91 |
\pgfqkeys{/tkzautolab}{#1} |
| 92 |
\foreach \point in {#2}{ |
| 93 |
\path (\tkz@center) -- ($ (\point) + \tkz@dist*($(\point)-(\tkz@center)$) $) node[/tkzautolab/.cd,label style,#1]{$\point$};} |
| 94 |
\endgroup |
| 95 |
}% |
| 96 |
%<---------------------------------------------------------------------------> |
| 97 |
% PointShowCoord |
| 98 |
%<---------------------------------------------------------------------------> |
| 99 |
\pgfkeys{/tkzprcoord/.cd, |
| 100 |
xlabel/.store in = \tkz@xlabel, |
| 101 |
ylabel/.store in = \tkz@ylabel, |
| 102 |
xstyle/.code = {\tikzset{xcoord style/.append style={#1}}}, |
| 103 |
ystyle/.code = {\tikzset{ycoord style/.append style={#1}}}, |
| 104 |
noxdraw/.is if = tkz@coord@noxdraw, |
| 105 |
noxdraw/.default = true, |
| 106 |
noydraw/.is if = tkz@coord@noydraw, |
| 107 |
noydraw/.default = true, |
| 108 |
xlabel = {}, |
| 109 |
ylabel = {}, |
| 110 |
xstyle = {}, |
| 111 |
ystyle = {}, |
| 112 |
noxdraw = false, |
| 113 |
noydraw = false, |
| 114 |
/tkzprcoord/.search also = {/tikz}, |
| 115 |
} |
| 116 |
\def\tkzPointShowCoord{\pgfutil@ifnextchar[{\tkz@PointShowCoord}{\tkz@PointShowCoord[]}} |
| 117 |
\def\tkz@PointShowCoord[#1](#2){% |
| 118 |
\begingroup |
| 119 |
\pgfqkeys{/tkzprcoord}{#1} |
| 120 |
% 2019 for showcoord |
| 121 |
\iftkznodedefined{tkz@xline}{}{% |
| 122 |
\path (0,0) --(1,0) node(tkz@xline){}; |
| 123 |
\path (0,0) --(0,1) node(tkz@yline){}; |
| 124 |
} |
| 125 |
\iftkz@coord@noxdraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 |- tkz@xline);\fi |
| 126 |
\iftkz@coord@noydraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 -| tkz@yline);\fi |
| 127 |
\ifx\tkzutil@empty\tkz@xlabel |
| 128 |
\else |
| 129 |
\path (#2)--(#2 |- tkz@xline) |
| 130 |
node[xcoord style] {\tkz@xlabel}; |
| 131 |
\fi |
| 132 |
\ifx\tkzutil@empty\tkz@ylabel |
| 133 |
\else |
| 134 |
\path (#2)--(#2 -| tkz@yline) |
| 135 |
node[ycoord style] {\tkz@ylabel}; |
| 136 |
\fi |
| 137 |
\endgroup |
| 138 |
} |
| 139 |
\let\tkzShowPointCoord\tkzPointShowCoord |
| 140 |
\makeatother |
| 141 |
\endinput |