Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.charlie.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{buttons}
17
18 \newcommand{\tikzpeople@charlie@paint}{
19 \tikzpeople@person@paintshirt
20 \tikzpeople@charlie@paintundershirt
21 \tikzpeople@person@paintrighthorn
22 \tikzpeople@person@painthead
23 \tikzpeople@charlie@painthair
24 \tikzpeople@person@paintgoatee
25 \tikzpeople@person@paintlefthorn
26 \tikzpeople@person@painthalo
27 }
28
29 \newcommand{\tikzpeople@charlie@definecolors}{
30 \definecolor{hair}{RGB}{107,68,35}
31 \definecolor{shirt}{RGB}{0,100,105}
32 \definecolor{buttons}{RGB}{128,70,27}
33 }
34
35 \newcommand{\tikzpeople@charlie@definestyles}{
36 \if@tikzpeople@saturated
37 \tikzset{
38 collar/.style ={color=\tikzpeople@shirt!70,inner color=\tikzpeople@shirt!50, outer color=\tikzpeople@shirt!50},
39 buttons/.style={color=\tikzpeople@buttons,inner color=\tikzpeople@buttons!80, outer color=\tikzpeople@buttons}
40 }
41 \else
42 \tikzset{
43 collar/.style ={color=\tikzpeople@shirt!30,inner color=\tikzpeople@shirt!10, outer color=\tikzpeople@shirt!30},
44 buttons/.style={color=\tikzpeople@buttons!80,inner color=\tikzpeople@buttons!60, outer color=\tikzpeople@buttons!80}
45 }
46 \fi
47 }
48
49 \newcommand{\tikzpeople@charlie@painthair}{
50 \if@tikzpeople@female
51 \draw[hair,shading angle=-45]
52 (340:3pt) arc (-20:120:3pt) -- (120:1.4pt) to [out=300,in=90,in looseness=2]
53 (340:3pt) -- cycle;
54 \draw[hair,line join=bevel]
55 (120:3pt) arc (120:230:3pt) to[out=110,in=300,out looseness=2]
56 (120:1.4pt) -- (120:3pt) -- cycle;
57 \else
58 \draw[hair,shading angle=-45]
59 (10:3pt) arc (10:120:3pt) -- (120:1.4pt) to [out=300,in=210,looseness=.5]
60 (10:3pt) -- cycle;
61 \draw[hair,line join=bevel]
62 (120:3pt) arc (120:210:3pt) to[out=90,in=300,looseness=1] (120:1.4pt) --
63 (120:3pt) -- cycle;
64 \fi
65 }
66
67 \newcommand{\tikzpeople@charlie@paintundershirt}{
68 \begin{scope}
69 \clip
70 (-4.0pt,-8.0pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) ..
71 ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
72 (-4.0pt,-8.0pt) (205:3.1pt) arc (205:335:3.1pt) to[out=200,in=340]
73 (205:3.1pt) --cycle;
74 \draw[color=\tikzpeople@shirt!80,line width=.05*\scalingfactor,cap=round]
75 (2pt,-8.7pt) to[out=90,in=290] (285:3.1pt);
76 {
77 \if@tikzpeople@female
78 \pgftransformshift{\pgfpoint{-.3pt}{0pt}}
79 \else
80 \pgftransformshift{\pgfpoint{.3pt}{0pt}}
81 \fi
82 \path[postaction={decoration={markings,
83 mark=between positions .12 and .8 step 0.16 with {
84 \draw[buttons] (0pt,0pt) circle (.15*\scalingfactor);
85 \path[fill=\tikzpeople@buttons]
86 (0:.02*\scalingfactor) circle (.01*\scalingfactor)
87 (180:.02*\scalingfactor) circle (.01*\scalingfactor);},
88 },decorate}] (2pt,-8.7pt) to[out=90,in=290] (285:3.1pt);
89 }
90 \if@tikzpeople@female
91 \draw[skin]
92 (245:2.9pt) to[out=310,in=160] (286:4pt) to[out=40,in=260]
93 (315:2.8pt) -- cycle;
94 \draw[collar]
95 (245:2.75pt) to[out=310,in=160] (286:3.9pt) to[out=40,in=260]
96 (315:2.7pt) -- (315:2.9pt) to[out=260,in=40]
97 (286:4.1pt) to[out=160,in=310] (245:3pt) --cycle;
98 \else
99 \draw[skin]
100 (245:2.9pt) to[out=300,in=280,looseness=1.3] (315:2.8pt) -- cycle;
101 \draw[collar]
102 (245:2.75pt) to[out=300,in=280,looseness=1.3] (315:2.7pt) --
103 (315:2.9pt) to[out=280,in=300,looseness=1.3] (245:3pt) -- cycle;
104 \fi
105 \begin{scope}
106 \if@tikzpeople@female
107 \clip
108 (245:2.75pt) to[out=310,in=160] (286:3.9pt) to[out=40,in=260]
109 (315:2.7pt) -- (315:2.9pt) to[out=260,in=40]
110 (286:4.1pt) to[out=160,in=310] (245:3pt) --cycle;
111 \else
112 \clip
113 (245:2.75pt) to[out=300,in=280,looseness=1.3] (315:2.7pt) --
114 (315:2.9pt) to[out=280,in=300,looseness=1.3] (245:3pt) -- cycle;
115 \fi
116 \draw[color=\tikzpeople@shirt!40,line width=.05*\scalingfactor,cap=round]
117 (2pt,-8.7pt) to[out=90,in=290] (285:3.1pt);
118 \end{scope}
119 \end{scope}
120 }
121
122 \newcommand{\tikzpeople@charlie@colors}{
123 shirt/200/{-1/-.75}, hair/160/{-.75/1}, skin/20/{.5/.8},
124 buttons/340/{.39/-.59}%
125 }