Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.builder.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{trousers}
17
18 \newcommand{\tikzpeople@builder@paint}{
19 \tikzpeople@person@paintshirt
20 \tikzpeople@builder@painttrousers
21 \tikzpeople@person@paintrighthorn
22 \tikzpeople@person@painthead
23 \tikzpeople@person@painthairstyletwo
24 \tikzpeople@builder@painthat
25 \tikzpeople@person@paintlefthorn
26 \tikzpeople@person@paintgoatee
27 \tikzpeople@person@painthalo
28 }
29
30 \newcommand{\tikzpeople@builder@painttrousers}{
31 \begin{scope}
32 \clip
33 (-4.0pt,-8.0pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) ..
34 ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
35 (-4.0pt,-8.0pt);
36 \draw[skin] (200:3.5pt) arc (200:330:4pt);
37 \draw[trousers]
38 (225:6pt) .. controls +(310:2pt) and +(250:3pt) ..
39 (320:6pt) -- ++(2pt,-6pt) -- ++(-12pt,0) -- cycle;
40 \draw[trousers]
41 (225:3pt) to[out=320,in=100] ++(300:5.5pt) -- ++(-1pt,-1pt) --
42 ++(-.9pt,.4pt) to[out=100,in=320] ++(120:5.5pt) -- cycle;
43 \end{scope}
44 \draw[trousers]
45 (280:2pt) to[out=320,in=100] ++(295:5pt) -- ++(1pt,-.4pt) --
46 ++(.6pt,1pt) to[out=100,in=320] ++(118:5.5pt) -- cycle;
47 }
48
49 \newcommand{\tikzpeople@builder@painthat}{
50 \draw[hat]
51 (160:3.5pt) to[out=320,in=170] (0,0) -- ++(1pt,-.5pt) arc(270:310:5pt) --
52 ++(-.9pt,.5pt) .. controls +(95:3pt) and +(80:4pt) .. (160:3.5pt);
53 \draw[color=\tikzpeople@hat] (0,0) arc(270:305:6pt);
54 \draw[color=\tikzpeople@hat] (1.2pt,0.2pt) arc (0:70:2.8pt) -- ++(160:1.2pt);
55 \draw[color=\tikzpeople@hat] (2.2pt,0.5pt) arc (0:70:2.8pt) -- ++(159:1.5pt);
56 \draw[color=\tikzpeople@hat] (3pt,.9pt) arc (0:70:2.8pt) -- ++(160:.5pt);
57 }
58
59 \newcommand{\tikzpeople@builder@definecolors}{
60 \definecolor{shirt}{RGB}{232,232,232}
61 \definecolor{hat}{RGB}{238,175,0}
62 \definecolor{trousers}{RGB}{33,81,171}
63 \definecolor{hair}{rgb}{0,0,0}
64 }
65 \newcommand{\tikzpeople@builder@definestyles}{
66 \if@tikzpeople@saturated
67 \tikzset{
68 trousers/.style={color=\tikzpeople@trousers,top color=\tikzpeople@trousers!70, bottom color=\tikzpeople@trousers,shading angle=45}
69 }
70 \else
71 \tikzset{
72 trousers/.style={color=\tikzpeople@trousers!80,top color=\tikzpeople@trousers!60, bottom color=\tikzpeople@trousers!80,shading angle=45}
73 }
74 \fi
75 }
76
77 \newcommand{\tikzpeople@builder@colors}{
78 trousers/200/{-.8/-.95}, hat/160/{-.35/1.4}, skin/20/{.5/.6},
79 hair/180/{-.7/.8}, shirt/340/{.3/-.3}%
80 }