Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.guard.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{details}
17 \tikzpeople@addcolorkey{collar}
18 \tikzpeople@addcolorkey{lining}
19
20 \newcommand{\tikzpeople@guard@paint}{
21 \tikzpeople@person@paintshirt
22 \tikzpeople@person@painthead
23 \tikzpeople@guard@paintcollar
24 \tikzpeople@guard@paintshirtdetails
25 \tikzpeople@guard@painthat
26 }
27
28 \newcommand{\tikzpeople@guard@paintshirtdetails}{
29 \begin{scope}
30 \clip
31 (-4.0pt,-8.0pt) .. controls (-2pt,-10pt) and ( 3pt,-9pt) ..
32 ( 5.0pt,-7.0pt) .. controls ( 5pt, 0pt) and (-5pt, 0pt) ..
33 (-4.0pt,-8.0pt) (205:3.1pt) arc (205:335:3.1pt) to[out=200,in=340] (205:3.1pt) --cycle;
34 \draw[lining,postaction={
35 decoration={
36 markings,
37 mark=at position 0.1 with {\coordinate (tikzpeople@tmp1) at (0,\if@tikzpeople@mirrored\else-\fi.4pt*\scalingfactor);},
38 mark=at position 0.23 with {\coordinate (tikzpeople@tmp2) at (0,\if@tikzpeople@mirrored\else-\fi.4pt*\scalingfactor);},
39 mark=at position 0.50 with {\coordinate (tikzpeople@tmp3) at (0,\if@tikzpeople@mirrored\else-\fi.4pt*\scalingfactor);},
40 mark=at position 0.62 with {\coordinate (tikzpeople@tmp4) at (0,\if@tikzpeople@mirrored\else-\fi.4pt*\scalingfactor);},
41 mark=at position 0.75 with {\coordinate (tikzpeople@tmp5) at (0,\if@tikzpeople@mirrored\else-\fi.4pt*\scalingfactor);};
42 },decorate
43 }] (2pt,-8.7pt) to[out=90,in=290] (290:3.6pt) -- (300:3.4pt) -- ++(102:0.6pt);
44 \draw[details] (tikzpeople@tmp1) circle (0.2pt);
45 \draw[details] (tikzpeople@tmp2) circle (0.2pt);
46 \draw[details] (tikzpeople@tmp3) circle (0.2pt);
47 \draw[details] (tikzpeople@tmp4) circle (0.2pt);
48 \draw[details] (tikzpeople@tmp5) circle (0.2pt);
49 \end{scope}
50 }
51
52 \newcommand{\tikzpeople@guard@paintcollar}{
53 \draw[collar] (225:3pt) ++(-0.06pt,-0.5pt) arc (225:320:3.1pt and 2.5pt) -- ++(-0.06pt,0.6pt) arc (320:225:3pt and 2.5pt) -- cycle;
54 \draw[lining] (225:3pt) ++(-0.06pt,-0.5pt) arc (225:320:3.1pt and 2.5pt);
55 }
56
57 \newcommand{\tikzpeople@guard@painthat}{
58 \begin{scope}
59 \pgftransformrotate{10}
60 \draw[hat] (215:3pt) arc (200:0:2.75pt and 2.4pt) .. controls (3.5pt,0pt) ..
61 (3.2pt,4pt) .. controls (3.2pt,8pt) and (-3.2pt,8pt) .. (-3.2pt,4pt) ..
62 controls (-3.5pt,0pt) and (-3.5pt,-1pt) .. (215:3pt);
63 \begin{scope}
64 \clip (0pt,0pt) circle (3pt);
65 \draw[color=\tikzpeople@details, line width=0.2*\scalingfactor,cap=round, dash pattern=on 0.4*\scalingfactor off 0.23*\scalingfactor]
66 (205:2.8pt) to[out=-40,in=230] (-30:3pt);
67 \end{scope}
68 \end{scope}
69 }
70
71 \newcommand{\tikzpeople@guard@definecolors}{
72 \definecolor{shirt}{rgb}{0.62,0.1,0}
73 \definecolor{hat}{rgb}{0,0,0}
74 \definecolor{collar}{rgb}{0.29,0.29,0.29}
75 \definecolor{details}{rgb}{1,0.82,0}
76 \definecolor{lining}{rgb}{0.9,0.9,0.9}
77 }
78 \newcommand{\tikzpeople@guard@definestyles}{
79 \if@tikzpeople@saturated
80 \tikzset{
81 collar/.style ={color=\tikzpeople@collar,top color=\tikzpeople@collar!70, bottom color=\tikzpeople@collar,shading angle=45},
82 details/.style={color=\tikzpeople@details, top color=\tikzpeople@details!70, bottom color=\tikzpeople@details, shading angle=45},
83 lining/.style ={color=\tikzpeople@lining}
84 }
85 \else
86 \tikzset{
87 collar/.style ={color=\tikzpeople@collar!80,top color=\tikzpeople@collar!40, bottom color=\tikzpeople@collar!80,shading angle=45},
88 details/.style={color=\tikzpeople@details!80, top color=\tikzpeople@details!40, bottom color=\tikzpeople@details!80, shading angle=45},
89 lining/.style ={color=\tikzpeople@lining}
90 }
91 \fi
92 }
93
94 \newcommand{\tikzpeople@guard@colors}{
95 shirt/200/{-.75/-1}, hat/160/{-.75/1.3}, skin/20/{.5/.7}, collar/0/{.2/.1},
96 details/180/{.45/-.4,-.5/.3}, lining/340/{.4/-.8}%
97 }