Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.bob.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{pearls}
17
18 \newcommand{\tikzpeople@bob@paint}{
19 \tikzpeople@person@paintshirt
20 \tikzpeople@bob@paintundershirt
21 \tikzpeople@person@paintrighthorn
22 \tikzpeople@person@painthead
23 \tikzpeople@bob@painthair
24 \tikzpeople@person@paintgoatee
25 \tikzpeople@person@paintlefthorn
26 \tikzpeople@person@painthalo
27 }
28
29 \newcommand{\tikzpeople@bob@definecolors}{
30 \definecolor{shirt}{RGB}{98,98,98}
31 \definecolor{pearls}{RGB}{252,137,172}
32 \definecolor{undershirt}{rgb}{0.9,0.9,0.9}
33 }
34
35 \newcommand{\tikzpeople@bob@definestyles}{
36 \if@tikzpeople@saturated
37 \tikzset{
38 pearls/.style={top color=\tikzpeople@pearls!70,bottom color=\tikzpeople@pearls,shading angle=-45}
39 }
40 \else
41 \tikzset{
42 pearls/.style={top color=\tikzpeople@pearls!40,bottom color=\tikzpeople@pearls!80,shading angle=-45}
43 }
44 \fi
45 }
46
47 \newcommand{\tikzpeople@bob@painthair}{
48 \if@tikzpeople@female
49 \draw[hair,shading angle=\if@tikzpeople@mirrored45\else-45\fi]
50 (0:3.1pt) arc (0:120:3.1pt) -- (60:.8pt) to [out=30,in=130]
51 (0:3.1pt) -- cycle;
52 \draw[hair,line join=bevel,shading angle=\if@tikzpeople@mirrored-90\else90\fi]
53 (120:3.1pt) arc (120:210:3.1pt) to[out=300,in=155,looseness=1] (235:3pt)
54 to [out=120,in=160,looseness=1.5] (60:.80pt) -- (120:3.1pt) -- cycle;
55 \else
56 \draw[hair, shading angle=\if@tikzpeople@mirrored45\else-45\fi]
57 (25:3.1pt) arc (25:120:3.1pt) -- (60:.8pt) to [out=30,in=170]
58 (25:3.1pt) -- cycle;
59 \draw[hair,line join=bevel,shading angle=\if@tikzpeople@mirrored-90\else90\fi]
60 (120:3.1pt) arc (120:190:3.1pt) to[out=283,in=210,looseness=.5]
61 (220:3pt) arc (300:405:.1pt) to[out=135,in=150,looseness=2]
62 (-1.7pt,-.6pt) to [out=90,in=180,looseness=1.5] (60:.80pt) --
63 (120:3.1pt) -- cycle;
64 \fi
65 }
66
67 \newcommand{\tikzpeople@bob@paintundershirt}{
68 \begin{scope}
69 \clip
70 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75]
71 (2pt,-7.8pt) to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
72 \draw[undershirt]
73 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75]
74 (2pt,-7.8pt) to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
75 \draw[skin]
76 (245:2.9pt) to[out=300,in=270,looseness=1.5] (311:3pt) -- cycle;
77 \draw[color=\tikzpeople@shirt\if@tikzpeople@saturated\else!80\fi]
78 (-1.9pt,-1pt) to[out=290,in=130,looseness=.75]
79 (2pt,-7.8pt) to[out=80,in=280,looseness=.75] (1.9pt,-1pt);
80 \if@tikzpeople@female
81 \path[postaction={decorate},decoration={
82 markings,
83 mark=between positions 0.04 and 1 step 0.06 with {\pgftransformscale{\scalingfactor}\fill[pearls] (0pt,0pt) circle (.1pt);}}]
84 (245:2.9pt) to[out=300,in=270,looseness=1.8] (311:3pt);
85 \fi
86 \end{scope}
87 }
88
89 \newcommand{\tikzpeople@bob@colors}{
90 shirt/200/{-1/-.6}, hair/160/{-.65/1}, skin/20/{.25/.4},
91 undershirt/340/{.15/-.4}%
92 }