Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.dave.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{tie}
17
18 \newcommand{\tikzpeople@dave@paint}{
19 \tikzpeople@person@paintshirt
20 \tikzpeople@dave@paintundershirt
21 \tikzpeople@person@paintrighthorn
22 \tikzpeople@person@painthead
23 \tikzpeople@dave@painthair
24 \tikzpeople@person@paintgoatee
25 \tikzpeople@person@paintlefthorn
26 \tikzpeople@person@painthalo
27 }
28
29 \newcommand{\tikzpeople@dave@definecolors}{
30 \definecolor{shirt}{RGB}{136,190,226}
31 \definecolor{tie}{RGB}{173,36,47}
32 \definecolor{undershirt}{rgb}{0.9,0.9,0.9}
33 \definecolor{hair}{rgb}{0,0,0}
34 }
35
36 \newcommand{\tikzpeople@dave@definestyles}{
37 \if@tikzpeople@saturated
38 \tikzset{
39 tie/.style={color=\tikzpeople@tie,top color=\tikzpeople@tie!70, bottom color=\tikzpeople@tie,shading angle=45}
40 }
41 \else
42 \tikzset{
43 tie/.style={color=\tikzpeople@tie!80,top color=\tikzpeople@tie!40, bottom color=\tikzpeople@tie!80,shading angle=45}
44 }
45 \fi
46 }
47
48 \newcommand{\tikzpeople@dave@painthair}{
49 \if@tikzpeople@female
50 \draw[hair,shading angle=-45]
51 (10:3.1pt) arc (10:175:3.1pt) to[out=265,in=170,looseness=1] (250:4pt)
52 to [out=120,in=150,out looseness=1.5] (-.5pt,.5pt) to [out=330,in=200]
53 (10:3.1pt) -- cycle;
54 \else
55 \draw[hair,line join=bevel]
56 (20:3.1pt) arc (20:190:3.1pt) to[out=283,in=210,looseness=.5]
57 (220:3pt) arc (300:405:.1pt) to[out=120,in=110,out looseness=4,in looseness=2]
58 (-1.7pt,-.7pt) -- (-1.5pt,-.7pt) to [out=90,in=160,looseness=1]
59 (-.5pt,1.2pt) to [out=340,in=200,out looseness=1.5,in looseness=.2]
60 (30:2.5pt) to [out=20,in=90,looseness=1]
61 (355:3pt) to [out=80,in=290,looseness=1] (20:3.1pt);
62 \fi
63 }
64
65 \newcommand{\tikzpeople@dave@paintundershirt}{
66 \begin{scope}
67 \clip
68 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75] (2pt,-7.8pt)
69 to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
70 \draw[undershirt]
71 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75] (2pt,-7.8pt)
72 to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
73 \if@tikzpeople@female
74 \draw[skin]
75 (250:2.9pt) to[out=300,in=280,looseness=2] (310:2.8pt) -- cycle;
76 \path[postaction={decorate},decoration={
77 markings,
78 mark=between positions 0.04 and 1 step 0.04 with {\pgftransformscale{\scalingfactor}
79 \fill[tie] (0pt,0pt) circle (.1pt);}
80 }]
81 (245:2.9pt) to[out=300,in=270,looseness=3] (311:3pt);
82 \else
83 \draw[tie]
84 (270:3pt) -- ++(.7pt,-.1pt) -- ++(.05pt,-.3pt) to[out=275,in=95]
85 ++(-.1pt,-.8pt) -- ++(1pt,-4pt) -- ++(.9pt,.25pt) -- ++(-1pt,3.8pt)
86 to[in=280,out=95] ++(-.4pt,.9pt) -- ++(-.1pt,.25pt) -- (295:3pt);
87 \draw[tie]
88 (270:3pt) ++(.7pt,-.1pt) to[out=30,in=175] ++(.35pt,.1pt)
89 to[out=300,in=90] ++(.1pt,-.35pt) to[out=210,in=350] ++(-.4pt,-.1pt)
90 to[out=110,in=270] ++(-0.05pt,.35pt)--cycle;
91 \fi
92 \end{scope}
93 \begin{scope}
94 \clip
95 (-4pt,-8pt) .. controls (-2pt,-10pt) and (3pt,-9pt) ..
96 ( 5pt,-7pt) .. controls ( 5pt, 0pt) and (-5pt,0pt) ..
97 (-4pt,-8pt);
98 \if@tikzpeople@mirrored
99 \path[postaction={decorate},decoration={
100 markings,
101 mark=between positions 0.11 and .54 step 0.02 with {\pgftransformscale{\scalingfactor}
102 \draw[shirt] (0pt,0pt) -- (0pt,.3pt) arc (360:180:.15pt) -- (-.3pt,0pt);},
103 mark=between positions 0.54 and .91 step 0.02 with {\pgftransformscale{\scalingfactor}
104 \draw[shirt] (0pt,0pt) -- (0pt,.3pt) arc (180:360:.15pt) -- (.3pt,0pt);}
105 }]
106 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75] (2pt,-7.8pt)
107 to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
108 \else
109 \path[postaction={decorate},decoration={
110 markings,
111 mark=between positions 0.11 and .54 step 0.02 with {\pgftransformscale{\scalingfactor}
112 \draw[shirt] (0pt,0pt) -- (0pt,-.3pt) arc (0:180:.15pt) -- (-.3pt,0pt);},
113 mark=between positions 0.54 and .91 step 0.02 with {\pgftransformscale{\scalingfactor}
114 \draw[shirt] (0pt,0pt) -- (0pt,-.3pt) arc (180:0:.15pt) -- (.3pt,0pt);}
115 }]
116 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75] (2pt,-7.8pt)
117 to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
118 \fi
119 \end{scope}
120 }
121
122 \newcommand{\tikzpeople@dave@colors}{
123 shirt/340/{1/-.9}, hair/160/{-.8/1}, skin/20/{.4/.6}, tie/360/{.2/-.25},
124 undershirt/200/{-.1/-.2}%
125 }