% Florian Sihler, 2022
% Licensed under GNU General Public License version 3
% https://opensource.org/licenses/gpl-3.0.html
\pingu@create@extra{mask}{%
    mask/.code    	       = {\pingu@set@extra{mask}{true}\pingu@color{mask}{#1}},
    mask/.default          = pingu@white!61!gray,%
    mask band/.code        = \pingu@color{mask@band}{#1},%
    mask line width/.code  = \def\pingu@x@mask@line@width{#1},%
    mask band inner/.code  = \pingu@color{mask@band@inner}{#1},%
    mask band outer/.code  = \pingu@color{mask@band@outer}{#1}%
}{mask band=\pingu@color@body@main, mask band inner=\pingu@color@mask@band!60!\pingu@color@mask, mask band outer=\pingu@color@mask@band!82!\pingu@color@mask,mask line width=.565pt}

\def\pingu@draw@ea@mask{%
\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr)  -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
\scope
\clip[use path=\pingu@upperpingu];
\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=.2mm]@ul) to[bend left=3] ([yshift=-1.1mm]\pingu@name-wings-side-right);
\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=-.2mm]@ur) to[bend right=3]  ([yshift=-1.1mm]\pingu@name-wings-side-left);
\endscope\scope
\clip[use path=\pingu@lowerpingu];
\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=.2mm]@ll) to[bend left=3]  ([yshift=2mm]\pingu@name-wing-right-start);
\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=-.2mm]@lr) to[bend right=3] ([yshift=2mm]\pingu@name-wing-left-start);
\endscope
% TODO: fix this sloppy overwrite
\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr)  -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
\pingu@draw[very thin]{\pingu@color@mask@band@inner} ([xshift=-5mm,yshift=.75mm-4.25mm/2]\pingu@name-bill) to[bend right=1] ++(10mm,0);
\foreach \i/\b/\c in {1.6mm/very thin/\pingu@color@mask@band@inner,.8mm/very thin/\pingu@color@mask@band@inner,0mm//\pingu@color@mask@band@outer} {
\pingu@draw[\b]{\c} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm-\i]\pingu@name-bill) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) -- ++(0,-4.25mm+2*\i)[rounded corners=.8mm]  -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) -- cycle;
}
}