Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.conductor.sty

raw
1 %% Copyright 2016 Nils Fleischhacker
2 %%
3 %% This work may be distributed and/or modified under the
4 %% conditions of the LaTeX Project Public License, either
5 %% version 1.3 of this license or (at your option) any later
6 %% version. The latest version of this license is in
7 %%
8 %% http://www.latex-project.org/lppl.txt
9 %%
10 %% and version 1.3 or later is part of all distributions of
11 %% LaTeX version 2005/12/01 or later.
12 %%
13 %% This work has the LPPL maintenance status `maintained'.
14 %%
15 %% The Current Maintainer of this work is Nils Fleischhacker.
16 \tikzpeople@addcolorkey{hatshield}
17 \tikzpeople@addcolorkey{hatbadge}
18 \tikzpeople@addcolorkey{badge}
19
20
21 \newcommand{\tikzpeople@conductor@paint}{
22 \tikzpeople@person@paintshirt
23 \tikzpeople@conductor@paintshirtdetails
24 \tikzpeople@person@paintrighthorn
25 \tikzpeople@person@painthead
26 \tikzpeople@person@painthairstyletwo
27 \tikzpeople@conductor@painthat
28 \tikzpeople@person@paintgoatee
29 \tikzpeople@person@paintlefthorn
30 \tikzpeople@person@painthalo
31 }
32
33 \newcommand{\tikzpeople@conductor@paintundershirt}{
34 \draw[undershirt]
35 (-2.2pt,-1pt) -- (2pt,-8.5pt) -- (2pt,-1pt);
36 \draw[tie]
37 (0 pt,-2.5pt) -- (0.8pt,-3.2pt) -- (1.1pt,-6 pt) -- (1.7pt,-8.7pt) --
38 (1.9pt,-8.7pt) -- (2 pt,-5.5pt) -- (1 pt,-3.1pt) -- (1.2pt,-2 pt) --
39 (0.3pt,-2 pt);
40 \draw[undershirt,shading angle=-45]
41 (0.5pt,-3pt) -- (0.1pt,-3.7pt) -- (-1pt,-3pt);
42 \draw[undershirt,shading angle=-45]
43 (0.9pt,-2.5pt) -- (1.8pt,-3.2pt) -- (2.2pt,-2.2pt);
44 }
45
46 \newcommand{\tikzpeople@conductor@paintopenshirt}{
47 \begin{scope}
48 \clip
49 (-4pt,-8pt) .. controls (-2pt,-10pt) and (3pt,-9pt) .. ( 5pt,-7pt) ..
50 controls ( 5pt, 0pt) and (-5pt,0pt) .. (-4pt,-8pt);
51 \draw[shirt,shading angle=-45]
52 (-2 pt,-2.6 pt) -- (-1.5pt,-5 pt) -- (-0.5pt,-5pt) --
53 (-1.1pt,-5.2 pt) -- ( 1.6pt,-8.75pt) -- ( 1.9pt,-8.75pt) .. controls
54 (1.7pt,-7pt) and (-0pt,-3.2pt) .. (-1.6pt,-2pt) -- cycle;
55 \draw[shirt,shading angle=-45]
56 (2pt,-2pt) .. controls (2.2pt,-1.8pt) and (1.9pt,-8.5pt) ..
57 (1.9pt,-8.75pt) -- (2.3pt,-8.5pt) -- (3.2pt,-5.2pt) -- (2.6pt,-5.2 pt) --
58 (3.2pt,-5 pt) -- (2.3pt,-2.3pt) -- cycle;
59 \end{scope}
60 \draw[color=\tikzpeople@shirt\if@tikzpeople@saturated\else!80\fi]
61 (-4pt,-8pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) .. ( 5pt,-7pt) ..
62 controls ( 5pt, 0pt) and (-5pt, 0pt) .. (-4pt,-8pt);
63 }
64
65 \newcommand{\tikzpeople@conductor@paintshirtdetails}{
66 \tikzpeople@conductor@paintundershirt
67 \tikzpeople@conductor@paintopenshirt
68 \draw[badge]
69 (264:7pt) to[out=354 ,in=186] ++(0:0.5pt) -- ++(270:0.15pt)
70 to[in=354 ,out=186] ++(180:0.5pt) -- (264:7pt);
71 \draw[badge]
72 (261:7.5pt) to[out=354 ,in=186] ++(0:1.5pt) -- ++(270:0.25pt)
73 to[in=354 ,out=186] ++(180:1.5pt) -- (261:7.5pt);
74 }
75
76 \newcommand{\tikzpeople@conductor@painthat}{
77 \path
78 (160:3pt) arc (-180:-120:2.85pt and 1pt) coordinate (tikzpeople@tmp);
79 \draw[hatbottom,rounded corners=.75pt]
80 (tikzpeople@tmp) -- ++(340:1.5pt) .. controls ++(340:1pt) ..
81 ++(10:3.8pt) .. controls ++(45:.2pt) .. (20:3pt);
82 \draw[hatbottom]
83 (160:3pt) ++(0pt,1pt) -- (160:3pt) arc (-180:0:2.85pt and 1pt) --
84 ++(0pt,1pt);
85 \draw[hattop,rounded corners=.75pt]
86 (160:3pt) ++(0pt,0.5pt) arc (-180:-22:3pt and 1.05pt) -- ++(1pt,1.5pt) --
87 ++(0pt,.4pt) .. controls +(-4pt,.5pt) .. (142:4.8pt) -- ++(0pt,-0.5pt) --
88 cycle;
89 \begin{scope}
90 \clip[rounded corners=.75pt]
91 (160:3pt) ++(0pt,0.5pt) arc (-180:-22:3pt and 1.05pt) -- ++(1pt,1.5pt) --
92 ++(0pt,.4pt) .. controls +(-4pt,.5pt) .. (142:4.8pt) -- ++(0pt,-0.5pt) --
93 cycle;
94 \draw[hatbottom,nearly opaque]
95 (153:3.5pt) ++(0pt,-2pt) -- (153:3.5pt) .. controls ++(350:1.5pt) ..
96 ++(10:2.5pt) .. controls ++(335:1.2pt) .. ++(2:2.5pt) coordinate
97 (hatbadge) .. controls ++(335:1.2pt) .. ++(10:2.5pt) -- ++(0pt,-2pt);
98 \end{scope}
99 \draw[hatbadge]
100 (hatbadge) ++(0.2pt,-0.2pt) coordinate (tikzpeople@tmp) .. controls ++(190:.5pt) ..
101 ++(200:.75pt) .. controls ++(270:.75pt) .. ++(300:1pt) .. controls
102 ++(70:.5pt) .. ++(55:1.1pt) .. controls ++(135:.3pt) .. (tikzpeople@tmp);
103 }
104
105 \newcommand{\tikzpeople@conductor@definecolors}{
106 \definecolor{shirt}{rgb}{0.18,0.38,0.80}
107 \definecolor{hat}{rgb}{0.18,0.38,0.80}
108 \definecolor{hair}{rgb}{0,0,0}
109 \definecolor{badge}{rgb}{0.96,0.55,0.1}
110 \definecolor{hatbadge}{rgb}{0.96,0.55,0.1}
111 \definecolor{hatshield}{rgb}{0.031,0.09,0.19}
112 \definecolor{undershirt}{RGB}{232,232,232}
113 \definecolor{tie}{rgb}{0.04,0.15,0.37}
114 }
115 \newcommand{\tikzpeople@conductor@definestyles}{
116 \if@tikzpeople@saturated
117 \tikzset{
118 shirt/.style ={color=\tikzpeople@shirt!90,top color=\tikzpeople@shirt!90, bottom color=\tikzpeople@shirt,shading angle=45},
119 hattop/.style ={color=\tikzpeople@hat!90,top color=\tikzpeople@hat!90, bottom color=\tikzpeople@hat,shading angle=45},
120 hatbottom/.style={color=\tikzpeople@hatshield,top color=\tikzpeople@hatshield!80, bottom color=\tikzpeople@hatshield,shading angle=45},
121 badge/.style ={color=\tikzpeople@badge,top color=\tikzpeople@badge!70, bottom color=\tikzpeople@badge,shading angle=45},
122 hatbadge/.style ={color=\tikzpeople@hatbadge,top color=\tikzpeople@hatbadge!70, bottom color=\tikzpeople@hatbadge,shading angle=45},
123 tie/.style ={color=\tikzpeople@tie,top color=\tikzpeople@tie!70, bottom color=\tikzpeople@tie,shading angle=45}
124 }
125 \else
126 \tikzset{
127 shirt/.style ={color=\tikzpeople@shirt!80,top color=\tikzpeople@shirt!80, bottom color=\tikzpeople@shirt,shading angle=45},
128 hattop/.style ={color=\tikzpeople@hat!80,top color=\tikzpeople@hat!80, bottom color=\tikzpeople@hat,shading angle=45},
129 hatbottom/.style={color=\tikzpeople@hatshield!80,top color=\tikzpeople@hatshield!60, bottom color=\tikzpeople@hatshield!90,shading angle=45},
130 badge/.style ={color=\tikzpeople@badge!80,top color=\tikzpeople@badge!40, bottom color=\tikzpeople@badge!80,shading angle=45},
131 hatbadge/.style ={color=\tikzpeople@hatbadge!80,top color=\tikzpeople@hatbadge!40, bottom color=\tikzpeople@hatbadge!80,shading angle=45},
132 tie/.style ={color=\tikzpeople@tie!80,top color=\tikzpeople@tie!40, bottom color=\tikzpeople@tie!80,shading angle=45}
133 }
134 \fi
135 }
136
137 \newcommand{\tikzpeople@conductor@colors}{
138 shirt/190/{-.8/-.5}, hat/140/{-.6/1.5}, hair/175/{-.75/.8}, skin/10/{.5/.6},
139 badge/210/{-.25/-1.25}, hatshield/155/{.15/.85}, hatbadge/30/{.4/1.3},
140 undershirt/350/{.3/-.15}, tie/330/{.35/-.8}%
141 }