Debian Codegraph @

texmf-dist/tex/latex/tikzpeople/tikzpeople.shape.duck.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{bill}
17 \tikzpeople@addcolorkey{tongue}
18
19 \newcommand{\tikzpeople@duck@paint}{
20 \tikzpeople@person@paintshirt
21 \tikzpeople@duck@painttorso
22 \tikzpeople@person@paintrighthorn
23 \tikzpeople@person@painthead
24 \tikzpeople@duck@paintbill
25 \tikzpeople@person@painthair
26 \tikzpeople@person@paintlefthorn
27 \tikzpeople@person@painthalo
28 }
29
30 \newcommand{\tikzpeople@duck@definecolors}{
31 \definecolor{skin}{RGB}{252,167,0}
32 \definecolor{bill}{RGB}{247, 78, 19}
33 \definecolor{hair}{named}{black}
34 \definecolor{tongue}{RGB}{246,38,10}
35 }
36
37 \newcommand{\tikzpeople@duck@definestyles}{
38 \if@tikzpeople@saturated
39 \tikzset{
40 shirt/.style ={skin},
41 bill/.style ={color=\tikzpeople@bill,top color=\tikzpeople@bill!70,bottom color=\tikzpeople@bill,shading angle=45},
42 tongue/.style ={color=\tikzpeople@tongue,top color=\tikzpeople@tongue!30!\tikzpeople@bill,bottom color=\tikzpeople@tongue},
43 feathers/.style={color=\tikzpeople@skin,decoration={zigzag,segment length=\scalingfactor*.8pt,amplitude=\scalingfactor*.25pt},decorate,line width=\scalingfactor*.05pt}
44 }
45 \else
46 \tikzset{
47 shirt/.style ={skin},
48 bill/.style ={color=\tikzpeople@bill!80,top color=\tikzpeople@bill!50,bottom color=\tikzpeople@bill!80,shading angle=45},
49 tongue/.style ={color=\tikzpeople@tongue!80,outer color=\tikzpeople@tongue!20!\tikzpeople@bill!80,inner color=\tikzpeople@tongue!80},
50 feathers/.style={color=\tikzpeople@skin!80,decoration={zigzag,segment length=\scalingfactor*.8pt,amplitude=\scalingfactor*.25pt},decorate,line width=\scalingfactor*.05pt}
51 }
52 \fi
53 }
54
55 \newcommand{\tikzpeople@duck@painttorso}{
56 \begin{scope}
57 \clip
58 (-4pt,-8pt) .. controls (-2pt,-10pt) and (3pt,-9pt) ..
59 ( 5pt,-7pt) .. controls ( 5pt, 0pt) and (-5pt,0pt) ..
60 (-4pt,-8pt);
61 \draw[feathers]
62 (-3.5 pt,-4.2pt) .. controls (-2pt,-6.2pt) and (3pt,-5.2pt) ..
63 ( 4.3pt,-3.7pt);
64 \draw[feathers]
65 (-4.2pt,-5.7pt) .. controls (-2pt,-7.7pt) and (3pt,-6.7pt) ..
66 (4.7pt, -4.9pt);
67 \draw[feathers]
68 (-4.3pt,-7.2pt) .. controls (-2pt,-9.2pt) and (3pt,-8.2pt) ..
69 (5pt, -6.2pt);
70 \end{scope}
71 }
72
73 \newcommand{\tikzpeople@duck@paintbill}{
74 \path
75 (263:1.6pt) coordinate (tikzpeople@bill1) +(0,.12pt) coordinate
76 (tikzpeople@bill2) +(0,-.12pt) coordinate (tikzpeople@bill3) (340:3pt)
77 ++(350:1.5pt) coordinate (tikzpeople@bill4) +(0,.12pt) coordinate
78 (tikzpeople@bill5) +(0,-.12pt) coordinate (tikzpeople@bill6) ++(200:1.8pt)
79 coordinate (tikzpeople@bill7) +(0,.12pt) coordinate (tikzpeople@bill8)
80 +(0,-.15pt) coordinate (tikzpeople@bill9)--cycle;
81 \draw[bill]
82 (tikzpeople@bill3) to[out=320,in=190] (tikzpeople@bill6);
83 \draw[tongue]
84 (tikzpeople@bill7) to[out=5,in=215] (tikzpeople@bill4) to[out=170,in=10]
85 (tikzpeople@bill7)--cycle;
86 \draw[bill]
87 (tikzpeople@bill1) to[out=340,in=190] (tikzpeople@bill7) to[out=5,in=215]
88 (tikzpeople@bill4) to[out=0,in=0] (tikzpeople@bill6) to[out=220,in=0]
89 (tikzpeople@bill9) to[out=190,in=340] (tikzpeople@bill3) to[out=160,in=160]
90 (tikzpeople@bill1)--cycle;
91 \draw[bill]
92 (tikzpeople@bill1) to[out=340,in=190] (tikzpeople@bill7) to[out=0,in=180]
93 (tikzpeople@bill4) to[out=0,in=0] (tikzpeople@bill5) to[out=170,in=10]
94 (tikzpeople@bill8) to[out=190,in=340] (tikzpeople@bill2) to[out=160,in=160]
95 (tikzpeople@bill1)--cycle;
96 \draw[bill,line join=bevel]
97 (tikzpeople@bill2) to[out=340,in=190] (tikzpeople@bill8) to[out=10,in=170]
98 (tikzpeople@bill5) to[out=160,in=330] (340:3pt) to[out=180,in=0] (337:1.7pt)
99 to[out=180,in=0,in looseness=1.2] (tikzpeople@bill2)--cycle;
100 }
101
102 \newcommand{\tikzpeople@duck@colors}{
103 skin/200/{-1/-.6}, hair/160/{-.75/.8}, bill/20/{.6/.5}, tongue/0/{.9/.42}%
104 }