Debian Codegraph @

texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-shapes-heatmark.tex

raw
1 % !TeX spellcheck = en_US
2 % !TeX root = tikz-ext-manual.tex
3 % Copyright 2022 by Qrrbrbirlbel
4 %
5 % This file may be distributed and/or modified
6 %
7 % 1. under the LaTeX Project Public License and/or
8 % 2. under the GNU Free Documentation License.
9 %
10 \section{Shape: Heatmark}
11 \begin{pgflibrary}{ext.shapes.heatmark}
12 A circular shape that has customizable rings around it.
13 \inspiration{ShapeHeat-Q}{ShapeHeat-A}
14 \end{pgflibrary}
15
16 \begin{ext_shape}{heatmark}
17 \begin{key}{/\pgfext/heatmark arcs=\meta{arcs num} (initially 3)}\keycompat{pgf}
18 Sets the number of arc around the circle to \meta{arcs num}.
19 \end{key}
20 \begin{key}{/\pgfext/heatmark arc width=\meta{arc width} (initially 4pt)}\keycompat{pgf}
21 Sets the width of the rings around the circle to \meta{arc width}.
22 \end{key}
23 \begin{key}{/\pgfext/heatmark arc sep=\meta{sep length} (initially 1pt)}\keycompat{pgf}
24 Sets the whitespace between the rings to \meta{sep length}.
25 \end{key}
26 \begin{key}{/\pgfext/heatmark arc rings=\meta{rings num} (initially 3)}\keycompat{pgf}
27 Sets the number of rings around the circle to \meta{rings num}
28 \end{key}
29 \begin{key}{/\pgfext/heatmark arc sep angle=\meta{sep angle} (initially 20)}\keycompat{pgf}
30 Sets the whitespace angle between the arcs in one ring to \meta{sep angle}.
31 \end{key}
32 \begin{key}{/\pgfext/heatmark inner opacity=\meta{inner opacity} (initially 0.8)}\keycompat{pgf}
33 Sets the opacity of the inner ring to \meta{inner opacity}.
34 \end{key}
35 \begin{key}{/\pgfext/heatmark outer opacity=\meta{low opacity} (initially 0.2)}\keycompat{pgf}
36 Sets the opacity of the outer ring to \meta{outer opacity}.
37
38 The opacity of the rings between the outer and the inner ring will be interpolated by these two opacities.
39 \end{key}
40
41 This shape takes the value of |/pgf/shape border rotate|%
42 \indexKeyO[/pgf/]{shape border rotate} into consideration.
43
44 For every ring and for every arc the following styke keys are tried.
45 \begin{stylekey}{/\pgfext/heatmark ring \meta{ring number}}
46 \end{stylekey}
47 \begin{stylekey}{/\pgfext/heatmark arc \meta{arc number}}
48 \end{stylekey}
49 \begin{stylekey}{/\pgfext/heatmark ring \meta{ring number} arc \meta{arc number}}
50 \end{stylekey}
51
52 The \pgfname shape is setup in a way that even \tikzname\space
53 styles can be used with a little bit work:
54 \begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark}]
55 \tikz[
56 shape border rotate=90,
57 /pgf/ext/heatmark ring 1/.append style={/tikz/fill=green},
58 /pgf/ext/heatmark arc 1/.append style={/tikz/fill=blue},
59 /pgf/ext/heatmark ring 2 arc 2/.append style={/tikz/fill=yellow!70!black}
60 ] \node[ext_heatmark, fill=red] (n) {100};
61 \end{codeexample}
62
63 It is best to use this shape with no actual border (|draw = none|) and the |outer sep| set to zero.
64 \begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.heatmark},width=16cm]
65 \begin{tikzpicture}\Huge
66 \node[name=s, shape=ext_heatmark, shape example,
67 fill=blue!25, draw=none, outer sep=0pt]
68 {Heatmark\vrule width 1pt height 2cm};
69 \foreach \anchor/\placement in
70 {north west/above left, north/above,
71 north east/above right,
72 west/left, center/above, east/right,
73 mid west/right, mid/above, mid east/left,
74 base west/left, base/below, base east/right,
75 south west/below left, south/below,
76 south east/below right,
77 text/left, 10/right, 130/above}
78 \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
79 node[\placement] {\scriptsize\texttt{(s.\anchor)}};
80 \end{tikzpicture}
81 \end{codeexample}
82 \end{ext_shape}
83 \endinput