Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.groom.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@groom@paint}{
19 \tikzpeople@person@paintshirt
20 \tikzpeople@groom@paintshirtdetails
21 {
22 \pgftransformshift{\pgfpoint{0}{-.8pt}}
23 \tikzpeople@person@paintrighthorn
24 }
25 \tikzpeople@person@painthead
26 \tikzpeople@person@painthair
27 \tikzpeople@groom@painthat
28 \tikzpeople@person@paintgoatee
29 {
30 \pgftransformshift{\pgfpoint{0}{-1.3pt}}
31 \tikzpeople@person@paintlefthorn
32 }
33 {
34 \pgftransformshift{\pgfpoint{0}{.5pt}}
35 \tikzpeople@person@painthalo
36 }
37 }
38
39 \newcommand{\tikzpeople@groom@paintshirtdetails}{
40 \begin{scope}
41 \clip
42 (-4.0pt,-8.0pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) ..
43 ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
44 (-4.0pt,-8.0pt);
45 \draw[shirt,shading angle=-45]
46 (200:4.5pt) .. controls +(300:4pt) .. (-.2pt,-7.8pt) .. controls
47 +(320:.5pt) .. (2pt,-8.5pt) .. controls +(30:.7pt) .. (3.5pt,-7pt) ..
48 controls +(89:2pt) .. (330:3.3pt);
49 \draw[undershirt]
50 (200:3pt) .. controls +(300:4pt) .. (2pt,-8.5pt) .. controls +(85:4pt) ..
51 (310:3pt);
52 \draw[skin] (240:3pt) -- (.4pt,-3.7pt) -- (311:3pt) -- cycle;
53 \draw[tie]
54 (.4pt,-3.8pt) .. controls +(165:1pt) .. ++(-1.4pt,.2pt) .. controls
55 +(310:.5pt) .. ++(.3pt,-.8pt) .. controls +(20:.75pt) .. (.4pt,-3.8pt) ..
56 controls +(32:1.2pt) .. ++(1.3pt,.7pt) .. controls +(270:.5pt) ..
57 ++(.2pt,-.8pt) .. controls +(180:1pt) .. (.4pt,-3.8pt);
58 \draw[tie] (.4pt,-3.8pt) circle (.2pt);
59 \end{scope}
60 }
61
62 \newcommand{\tikzpeople@groom@painthat}{
63 \begin{scope}
64 \pgftransformrotate{10}
65 \path[hat]
66 (30:3pt) ++(0pt,3pt) coordinate (tikzpeople@tmp)
67 (150:3pt) to[out=85,in=275] ++(0pt,3pt) to[out=10,in=170] (tikzpeople@tmp)
68 to[out=265,in=95] (30:3pt) --cycle;
69 \begin{scope}
70 \clip
71 (30:3pt) ++(0pt,3pt) coordinate (tikzpeople@tmp) (150:3pt) to[out=85,in=275]
72 ++(0pt,3pt) to[out=10,in=170] (tikzpeople@tmp) to[out=265,in=95] (30:3pt) --cycle;
73 \path[hatwrap]
74 (30:3pt) ++(0pt,1.3pt) coordinate (tikzpeople@tmp) (150:3pt) ++(0pt,.7pt)
75 coordinate (tikzpeople@tmp2) (150:3pt) ++(0pt,1.5pt) to[out=355,in=185] (tikzpeople@tmp) --
76 ++(0pt,-.7pt) to[out=185,in=355] (tikzpeople@tmp2) --cycle;
77 \end{scope}
78 \end{scope}
79 \begin{scope}
80 \pgftransformrotate{4}
81 \begin{scope}
82 \pgftransformshift{\pgfpoint{-.05pt}{.075pt}}
83 \path[hatrim]
84 (170:3pt) ++(-.5pt,1.75pt) coordinate (tikzpeople@tmp) arc (255:291:11pt) arc
85 (111:-69:.1pt) arc (291:253:11pt) to[out=163, in= 163,in looseness=3]
86 (tikzpeople@tmp);
87 \end{scope}
88 \path[hat]
89 (25:3pt) to[out=170,in=10] (160:3pt) arc (160:170:3pt)
90 to[out=180,in=160,looseness=2] ++(-.5pt,1.75pt) arc (255:291:11pt)
91 to[out=10,in=10] (25:3pt);
92 \end{scope}
93 }
94
95 \newcommand{\tikzpeople@groom@definecolors}{
96 \definecolor{shirt}{rgb}{0,0,0}
97 \definecolor{hat}{rgb}{0,0,0}
98 \definecolor{undershirt}{RGB}{232,232,232}
99 \definecolor{tie}{RGB}{194,0,0}
100 }
101
102 \newcommand{\tikzpeople@groom@definestyles}{
103 \if@tikzpeople@saturated
104 \tikzset{
105 hatrim/.style ={color=\tikzpeople@hat!60,top color=\tikzpeople@hat!30, bottom color=\tikzpeople@hat!60,shading angle=90},
106 hatwrap/.style={color=\tikzpeople@hat!80,top color=\tikzpeople@hat!60, bottom color=\tikzpeople@hat!80,shading angle=45},
107 tie/.style ={color=\tikzpeople@tie,inner color=\tikzpeople@tie!80, outer color=\tikzpeople@tie}
108 }
109 \else
110 \tikzset{
111 hatrim/.style ={color=\tikzpeople@hat!40,top color=\tikzpeople@hat!10, bottom color=\tikzpeople@hat!40,shading angle=90},
112 hatwrap/.style={color=\tikzpeople@hat!60,top color=\tikzpeople@hat!40, bottom color=\tikzpeople@hat!60,shading angle=45},
113 shirt/.style ={color=\tikzpeople@shirt!80,top color=\tikzpeople@shirt!50, bottom color=\tikzpeople@shirt!80,shading angle=45},
114 tie/.style ={color=\tikzpeople@tie!80,inner color=\tikzpeople@tie!60, outer color=\tikzpeople@tie!80}
115 }
116 \fi
117 }
118
119 \newcommand{\tikzpeople@groom@colors}{
120 shirt/200/{-.75/-.8}, hair/160/{-.7/.9}, hat/20/{.3/2}, skin/0/{.5/.7},
121 undershirt/340/{.25/-.5},tie/180/{-.15/-.25}%
122 }