| 1 |
%% tikzpingus.sty |
| 2 |
%% Copyright 2026 Florian Sihler |
| 3 |
% |
| 4 |
% This work may be distributed and/or modified under the |
| 5 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 6 |
% of this license or (at your option) any later version. |
| 7 |
% The latest version of this license is in |
| 8 |
% https://www.latex-project.org/lppl.txt |
| 9 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 10 |
% version 2008 or later. |
| 11 |
% |
| 12 |
% This work has the LPPL maintenance status `maintained'. |
| 13 |
% |
| 14 |
% The Current Maintainer of this work is Florian Sihler |
| 15 |
% |
| 16 |
% This work consists of the files tikzpingus.sty and tikzpingus-doc.tex |
| 17 |
\def\tikzpingus@filename{tikzpingus} |
| 18 |
\ProvidesPackage{\tikzpingus@filename}[2026/02/27 version v1.4 Penguins in TikZ] |
| 19 |
\newif\ifpengu@setup@glows@ |
| 20 |
\DeclareOption{glows}{\pengu@setup@glows@true}\DeclareOption{noglows}{\pengu@setup@glows@false} |
| 21 |
\newif\ifpengu@setup@manual@layers@ |
| 22 |
\DeclareOption{manual-layers}{\pengu@setup@manual@layers@true}\DeclareOption{nomanual-layers}{\pengu@setup@manual@layers@false} |
| 23 |
% \newif\ifpengu@setup@bare@ |
| 24 |
% \DeclareOption{bare}{\pengu@setup@bare@true}\DeclareOption{nobare}{\pengu@setup@bare@false} |
| 25 |
\ProcessOptions* |
| 26 |
|
| 27 |
\RequirePackage{etoolbox} |
| 28 |
\RequirePackage{tikz} |
| 29 |
\usetikzlibrary{intersections,shadings,patterns.meta,decorations.pathmorphing,shapes.symbols,shapes.geometric} |
| 30 |
|
| 31 |
\pgfdeclarelayer{background}\pgfdeclarelayer{foreground}\pgfdeclarelayer{middle} |
| 32 |
\pgfdeclarelayer{very-background} |
| 33 |
\ifpengu@setup@manual@layers@\else |
| 34 |
\pgfsetlayers{very-background,background,main,middle,foreground} |
| 35 |
\fi |
| 36 |
% #region whole setup |
| 37 |
|
| 38 |
% <color definitions> |
| 39 |
\def\@pingu@color@ #1#2(#3,#4,#5){\definecolor{pingu@#1}{#2}{#3,#4,#5}} |
| 40 |
\@pingu@color@{main}RGB(3,14,29) |
| 41 |
\@pingu@color@{black}RGB(23,19,19) |
| 42 |
\@pingu@color@{silver}RGB(192,192,192) |
| 43 |
\@pingu@color@{bronze}RGB(205,127,50) |
| 44 |
\@pingu@color@{white}RGB(248,248,248) |
| 45 |
\@pingu@color@{yellow}RGB(252,187,21) |
| 46 |
\@pingu@color@{lightblue}RGB(174,229,243) |
| 47 |
\@pingu@color@{blue}RGB(48,161,247) |
| 48 |
\@pingu@color@{green}RGB(129,204,41) |
| 49 |
\@pingu@color@{red}RGB(217, 40, 28) |
| 50 |
\@pingu@color@{purple}RGB(244,48,93) |
| 51 |
\def\@pingu@none{!hide} |
| 52 |
% <@color definitions> |
| 53 |
|
| 54 |
% #region lengths and dimens |
| 55 |
\newdimen\pingu@one@eight \pingu@[email protected] % constants to save tokens |
| 56 |
\newdimen\pingu@one \pingu@one1mm |
| 57 |
|
| 58 |
\newdimen\pingu@w@half \pingu@[email protected] |
| 59 |
\newdimen\pingu@head@h@half \pingu@head@[email protected]\pingu@w@half |
| 60 |
\newdimen\pingu@side@h@half \pingu@side@[email protected] |
| 61 |
\newdimen\pingu@bend \pingu@bend\pingu@one@eight |
| 62 |
\newdimen\pingu@lower@off \pingu@[email protected] |
| 63 |
\newdimen\pingu@outer@off \pingu@[email protected] |
| 64 |
\def\basicfeetbend{45} |
| 65 |
\newdimen\pingu@foot@outer@w \pingu@foot@[email protected] |
| 66 |
\newdimen\pingu@foot@outer@h \pingu@foot@[email protected] |
| 67 |
|
| 68 |
\newdimen\pingu@headcon@x \pingu@[email protected]% .75*.525cm |
| 69 |
\newdimen\pingu@headcon@y \pingu@[email protected]%.719*.65cm |
| 70 |
|
| 71 |
\newdimen\pingu@foot@inner@w \pingu@foot@[email protected] |
| 72 |
\newdimen\pingu@foot@inner@h \pingu@foot@[email protected] |
| 73 |
\newdimen\pingu@foot@single@w \pingu@foot@[email protected] |
| 74 |
\newdimen\pingu@foot@single@h \pingu@foot@single@h2mm |
| 75 |
\def\eyebaseang{38.5} |
| 76 |
\newdimen\pingu@eye@shift \pingu@[email protected] |
| 77 |
\def\pinguanglehl{.93} |
| 78 |
\def\pinguanglehr{.07} |
| 79 |
% #endregion |
| 80 |
|
| 81 |
% #region selections |
| 82 |
\def\pingu@csappto#1#2{\expandafter\ifx\csname #1\endcsname\@empty\@namedef{#1}{#2}\else\expandafter\g@addto@macro\csname #1\endcsname{, #2}\fi} |
| 83 |
|
| 84 |
\def\pingu@create@sel@err#1#2{% |
| 85 |
\PackageError{\tikzpingus@filename}{There is no '#2' drawer for '#1'. Choose one of '\@nameuse{@pingu@#1@}'}{Or ask the package maintainer :D}% |
| 86 |
} |
| 87 |
|
| 88 |
\def\pingu@@select#1#2{\expandafter\let\csname @pingu@drawer@#2@\expandafter\endcsname\csname @pingu@drawer@#2@#1@\endcsname |
| 89 |
\expandafter\def\csname @pingu@select@#2@\expandafter\endcsname{#1}} |
| 90 |
|
| 91 |
% #1 name | none default |
| 92 |
\def\pingu@create@selection#1#2{% |
| 93 |
\expandafter\newcount\csname pc@#1@max\endcsname |
| 94 |
\expandafter\let\csname @pingu@#1@\endcsname\@empty |
| 95 |
\expandafter\long\expandafter\def\csname pingu@#1@add\endcsname##1##2{% |
| 96 |
\ifcsname @pingu@drawer@#1@##1@\endcsname\else% do not re-append! |
| 97 |
\pingu@csappto{@pingu@#1@}{"##1"} |
| 98 |
\expandafter\global\expandafter\advance\csname pc@#1@max\endcsname1\relax\fi |
| 99 |
\expandafter\long\expandafter\def\csname @pingu@drawer@#1@##1@\endcsname{##2}% |
| 100 |
} |
| 101 |
\expandafter\def\csname pingu@#1@select\endcsname##1{% |
| 102 |
\def\@tmp{##1}\ifx\@pingu@random\@tmp% if random is selected, we choose random from pack in @pingu@#1@ |
| 103 |
% we could do this with pgfmathdeclarerandomlist, but this requires more, |
| 104 |
% at the moment, i do not care about efficiency, and we do a foreach |
| 105 |
% we do not pick none for random |
| 106 |
\edef\@arr{{\csname @pingu@#1@\endcsname}}% |
| 107 |
% we use 1 as minimum, because 0 is ALWAYS 'none' by definition |
| 108 |
\pgfmathrandominteger{\@ars}{1}{\csname pc@#1@max\endcsname-1}% |
| 109 |
\pgfmathsetmacro\@sel{\@arr[\@ars]}% |
| 110 |
\expandafter\pingu@@select\expandafter{\@sel}{#1}% consolidate the choice in case of multiple |
| 111 |
\else\ifcsname @pingu@drawer@#1@##1@\endcsname |
| 112 |
\pingu@@select{##1}{#1}% |
| 113 |
\else\pingu@create@sel@err{#1}{##1}\fi\fi |
| 114 |
}% |
| 115 |
\csname pingu@#1@add\endcsname{none}{#2}% |
| 116 |
} |
| 117 |
\def\@pingu@random{!random} |
| 118 |
|
| 119 |
\long\def\pingu@create@extra#1#2#3{\expandafter\newif\csname if@pingu@x@#1@\endcsname\pgfqkeys{/pingu}{#2,extra defaults/.append style={#3}}} |
| 120 |
\def\pingu@set@extra#1#2{\csname @pingu@x@#1@#2\endcsname} |
| 121 |
|
| 122 |
% <eyes selectors> |
| 123 |
\pingu@create@selection{lefteye}{% |
| 124 |
\path ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) |
| 125 |
coordinate (\pingu@name-eye-left);% |
| 126 |
} |
| 127 |
\pingu@create@selection{righteye}{% |
| 128 |
\path ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) |
| 129 |
coordinate (\pingu@name-eye-right);% |
| 130 |
} |
| 131 |
% <@eyes selectors> |
| 132 |
|
| 133 |
\pingu@create@selection{leftwing}{% |
| 134 |
\path ([yshift=-6.5mm]\pingu@name-wings-side-left) |
| 135 |
coordinate (\pingu@name-wing-left-start) |
| 136 |
coordinate (\pingu@name-wing-left-tip) |
| 137 |
coordinate (\pingu@name-wing-left);% |
| 138 |
} |
| 139 |
\pingu@create@selection{rightwing}{% |
| 140 |
\path ([yshift=-6.5mm]\pingu@name-wings-side-right) |
| 141 |
coordinate (\pingu@name-wing-right-start) |
| 142 |
coordinate (\pingu@name-wing-right-tip) |
| 143 |
coordinate (\pingu@name-wing-right);% |
| 144 |
} |
| 145 |
\pingu@create@selection{hairstyle}{} |
| 146 |
% <bill selector> |
| 147 |
\pingu@create@selection{bill}{% |
| 148 |
\coordinate (\pingu@name-bill-bottom) at (\pingu@name-bill);% |
| 149 |
} |
| 150 |
% <@bill selector> |
| 151 |
% <feet selectors> |
| 152 |
\pingu@create@selection{leftfoot}{} |
| 153 |
\pingu@create@selection{rightfoot}{} |
| 154 |
% <@feet selectors> |
| 155 |
% <bodytype selector> |
| 156 |
\pingu@create@selection{bodytype}{\pingu@x@bodytype@none} |
| 157 |
% <@bodytype selector> |
| 158 |
% #endregion |
| 159 |
|
| 160 |
% #region key setup |
| 161 |
% <pingu@color> |
| 162 |
\def\pingu@color#1#2{% |
| 163 |
\expandafter\def\csname pingu@color@#1\endcsname{#2}% |
| 164 |
} |
| 165 |
% <@pingu@color> |
| 166 |
|
| 167 |
% HACK: store scale |
| 168 |
\pgfqkeys{/tikz}{scale/.append code={\def\pingu@default@scale{#1}}} |
| 169 |
\def\pingu@default@scale{1} |
| 170 |
|
| 171 |
\newif\if@pingu@draw@metadots |
| 172 |
\newif\if@pingu@wi@flip@left |
| 173 |
\newif\if@pingu@wi@flip@right |
| 174 |
% <feet conditional> |
| 175 |
\newif\if@pingu@feet@front |
| 176 |
\newif\if@pingu@bill@above |
| 177 |
% <@feet conditional> |
| 178 |
|
| 179 |
\pgfqkeys{/pingu}{ |
| 180 |
/pingu/.search also={/tikz,/pgf}, |
| 181 |
name/.code = \def\pingu@name{#1}, |
| 182 |
scale/.code = \def\pingu@scale{#1}, |
| 183 |
@post/.code = \def\pingu@post{#1}, |
| 184 |
@body@app/.code = \def\pingu@body@app{#1}, |
| 185 |
meta dots/.forward to = /pingu/meta-dots, |
| 186 |
meta-dots/.is if = @pingu@draw@metadots, |
| 187 |
meta-dots/.default = true, |
| 188 |
@pingu@all/.style = {}, |
| 189 |
@block/.style = {/pingu/@pingu@all=#1, fill=#1}, |
| 190 |
@draw/.style = {/pingu/@pingu@all=#1, cap=round, draw=#1}, |
| 191 |
@text/.style = {transform shape,text=\pingu@color@body@main}, |
| 192 |
@body/.style = {}, |
| 193 |
@extras/.style = {}, |
| 194 |
@extras@above/.style = {}, |
| 195 |
@extras@below/.style = {}, |
| 196 |
@eyes/.style = {}, |
| 197 |
@belly/.style = {}, |
| 198 |
@wings/.style = {}, |
| 199 |
@wingitems/.style = {}, |
| 200 |
@feet/.style = {}, |
| 201 |
@bill/.style = {}, |
| 202 |
@hair/.style = {}, |
| 203 |
@clip even odd rule/.code = {\pgfseteorule}, % Credit to Andrew Stacey |
| 204 |
@invclip/.style = {clip,insert path=[/pingu/@clip even odd rule]{[reset cm](-\maxdimen,-\maxdimen)rectangle(\maxdimen,\maxdimen)}}, |
| 205 |
@pingu/.style = {}, @pingu@main/.style = {}, |
| 206 |
% <feet keys> |
| 207 |
left foot color/.code = \pingu@color{foot@left}{#1}, |
| 208 |
left foot/.code = \pingu@leftfoot@select{#1}, |
| 209 |
right foot color/.code = \pingu@color{foot@right}{#1}, |
| 210 |
right foot/.code = \pingu@rightfoot@select{#1}, |
| 211 |
feet/.style = { |
| 212 |
/pingu/left foot={#1}, |
| 213 |
/pingu/right foot={#1} |
| 214 |
}, |
| 215 |
feet color/.style = { |
| 216 |
/pingu/left foot color={#1}, |
| 217 |
/pingu/right foot color={#1} |
| 218 |
}, |
| 219 |
feet front/.is if = @pingu@feet@front, |
| 220 |
% <@feet keys> |
| 221 |
% <bodytype keys> |
| 222 |
body type/.code = \pingu@bodytype@select{#1}, |
| 223 |
body main/.code = \pingu@color{body@main}{#1}, |
| 224 |
body head/.code = \pingu@color{body@head}{#1}, |
| 225 |
body/.style = {/pingu/body main={#1}, /pingu/body head={#1}}, |
| 226 |
body front/.code = \pingu@color{body@front}{#1}, |
| 227 |
% <@bodytype keys> |
| 228 |
% belly |
| 229 |
belly/.forward to = /pingu/belly text, |
| 230 |
belly text/.style = {/pingu/belly raw={\node[/pingu/@text,opacity=.2] {#1};}}, |
| 231 |
belly raw/.code = \def\pingu@belly@raw{#1}, |
| 232 |
% <eyes keys> |
| 233 |
left eye/.code = \pingu@lefteye@select{#1}, |
| 234 |
left eye color/.code = \pingu@color{eye@left}{#1}, |
| 235 |
left eye second color/.code = \pingu@color{eye@second@left}{#1}, |
| 236 |
right eye/.code = \pingu@righteye@select{#1}, |
| 237 |
right eye color/.code = \pingu@color{eye@right}{#1}, |
| 238 |
right eye second color/.code = \pingu@color{eye@second@right}{#1}, |
| 239 |
eyes/.style = { |
| 240 |
/pingu/left eye = {#1}, |
| 241 |
/pingu/right eye = {#1} |
| 242 |
}, |
| 243 |
eyes color/.style = { |
| 244 |
/pingu/left eye color = {#1}, |
| 245 |
/pingu/right eye color = {#1} |
| 246 |
}, |
| 247 |
eyes second color/.style = { |
| 248 |
/pingu/left eye second color = {#1}, |
| 249 |
/pingu/right eye second color = {#1} |
| 250 |
}, |
| 251 |
% <@eyes keys> |
| 252 |
% wings |
| 253 |
left wing color/.code = \pingu@color{left@wing}{#1}, |
| 254 |
left wing/.code = \pingu@leftwing@select{#1}, |
| 255 |
right wing color/.code = \pingu@color{right@wing}{#1}, |
| 256 |
right wing/.code = \pingu@rightwing@select{#1}, |
| 257 |
wings/.style = {/pingu/left wing={#1}, /pingu/right wing={#1}}, |
| 258 |
wings color/.style = {/pingu/left wing color={#1}, |
| 259 |
/pingu/right wing color={#1}}, |
| 260 |
left item angle/.forward to = /pingu/left wing item angle, |
| 261 |
left wing item angle/.code = {\def\pingu@wing@left@item@angle@user{#1}},% |
| 262 |
left item flip/.forward to = /pingu/left wing item flip, |
| 263 |
left wing item flip/.is if = @pingu@wi@flip@left, |
| 264 |
right item angle/.forward to = /pingu/right wing item angle, |
| 265 |
right item flip/.forward to = /pingu/right wing item flip, |
| 266 |
right wing item angle/.code = {\def\pingu@wing@right@item@angle@user{#1}},% |
| 267 |
right wing item flip/.is if = @pingu@wi@flip@right, |
| 268 |
% <bill keys> |
| 269 |
bill/.code = \pingu@bill@select{#1}, |
| 270 |
bill above/.is if = @pingu@bill@above, |
| 271 |
bill color/.code = \pingu@color{bill}{#1}, |
| 272 |
% <@bill keys> |
| 273 |
% hair color TODO: other colors |
| 274 |
hair/.forward to = /pingu/hairs color, |
| 275 |
hairs/.forward to = /pingu/hairs color, |
| 276 |
hair 1 color/.code = \pingu@color{hair@a}{#1}, hair 1/.forward to = /pingu/hair 1 color, |
| 277 |
hair 2 color/.code = \pingu@color{hair@b}{#1}, hair 2/.forward to = /pingu/hair 2 color, |
| 278 |
hair 3 color/.code = \pingu@color{hair@c}{#1}, hair 3/.forward to = /pingu/hair 3 color, |
| 279 |
hair 4 color/.code = \pingu@color{hair@d}{#1}, hair 4/.forward to = /pingu/hair 4 color, |
| 280 |
hair 5 color/.code = \pingu@color{hair@e}{#1}, hair 5/.forward to = /pingu/hair 5 color, |
| 281 |
hairs color/.style = {/pingu/hair 1 color={#1}, /pingu/hair 2 color={#1}, /pingu/hair 3 color={#1}, |
| 282 |
/pingu/hair 4 color={#1}, /pingu/hair 5 color={#1}}, |
| 283 |
hair style/.forward to = /pingu/hairstyle, |
| 284 |
hairstyle/.code = \pingu@hairstyle@select{#1}, |
| 285 |
% size |
| 286 |
height/.code = \setlength{\pingu@side@h@half}{#1},% |
| 287 |
small height/.forward to = /pingu/small size, small/.forward to = /pingu/small size, |
| 288 |
small size/.style = {/pingu/height=11mm}, |
| 289 |
normal height/.forward to = /pingu/normal size, normal/.forward to = /pingu/normal size, |
| 290 |
normal size/.style = {/pingu/height=1.275cm}, |
| 291 |
large height/.forward to = /pingu/large size, large/.forward to = /pingu/large size, |
| 292 |
large size/.style = {/pingu/height=15mm}, |
| 293 |
random from/.code = {\pgfmathdeclarerandomlist{@tmp}{#1}\pgfmathrandomitem{\@tmp}{@tmp}\edef\tmp{\noexpand\@pingu@set{\@tmp}}\tmp}, |
| 294 |
defaults/.style = {% |
| 295 |
name=pingu, feet=normal, feet color=pingu@yellow, body=pingu@main, |
| 296 |
body type=normal,@post={},@body@app={}, |
| 297 |
body front=pingu@white,% |
| 298 |
eyes=normal, eyes color=pingu@black, eyes second color=pingu@white, |
| 299 |
bill=normal, bill color=pingu@yellow, |
| 300 |
wings=normal, wings color=\pingu@color@body@main, |
| 301 |
hairstyle=normal, hairs color=\pingu@color@body@main, |
| 302 |
belly raw={}, scale=\pingu@default@scale, |
| 303 |
left wing item angle=0,right wing item angle=0,extra defaults,user defaults,% |
| 304 |
feet front=false% |
| 305 |
}, |
| 306 |
user defaults/.style = {}, |
| 307 |
% will be set individually |
| 308 |
extra defaults/.style = {} |
| 309 |
} |
| 310 |
\def\@pingu@set#1{\pgfqkeys{/pingu}{#1}} |
| 311 |
\def\pingudefaults#1{\pgfqkeys{/pingu}{user defaults/.style={#1}}} |
| 312 |
\def\pingudefaultsappend#1{\pgfqkeys{/pingu}{user defaults/.append style={#1}}} |
| 313 |
% #endregion |
| 314 |
|
| 315 |
% #region subenvs |
| 316 |
\def\pingu@layer#1[#2]{\pgfonlayer{#1}\scope[/pingu/@pingu,#2]} |
| 317 |
\def\endpingu@layer{\endscope\endpgfonlayer} |
| 318 |
% #endregion |
| 319 |
|
| 320 |
% colorname | mix with |
| 321 |
\def\@pingu@color@mixwith#1#2{\protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else\expandafter\def\expandafter#1\expandafter{#1!#2}\fi} |
| 322 |
|
| 323 |
% #region complete sets and styles |
| 324 |
\newif\if@pingu@do@back@ |
| 325 |
\pgfqkeys{/pingu}{ |
| 326 |
:line/.style = {/pingu/@block/.append style={fill=none,draw=##1!80!black,shade=none,path fading=none}}, |
| 327 |
:fill/.style = {/pingu/body=#1,/pingu/body front=#1,/pingu/feet color=#1, /pingu/bill color=#1, /pingu/eyes color=#1, /pingu/eyes second color=#1}, |
| 328 |
:fill/.default = pingu@main, |
| 329 |
:pingu/.style = {/pingu/@body/.style={#1},/pingu/@wings/.style={#1},/pingu/@eyes/.style={#1},/pingu/@bill/.style={#1},/pingu/@hair/.style={#1},/pingu/@feet/.style={#1}}, |
| 330 |
:toast/.style = {/pingu/left wing=none,/pingu/right wing=none,/pingu/feet=none,/pingu/hair=\@pingu@none}, |
| 331 |
:mix-draw/.style = {:pingu={/pingu/@block/.append style={/pingu/@pingu@all={####1!#1}, fill={####1!#1}}}}, |
| 332 |
:mix-draw/.default = 50!white, |
| 333 |
:mix-all/.style = {/pingu/@block/.append style={/pingu/@pingu@all={##1!#1}, fill={##1!#1}},/pingu/@draw/.append style={/pingu/@pingu@all={##1!#1}, draw={##1!#1}}}, |
| 334 |
:mix-all/.default = 50!white, |
| 335 |
:mix/.style = { |
| 336 |
/pingu/@body/.code={\@pingu@color@mixwith\pingu@color@body@main{#1}\@pingu@color@mixwith\pingu@color@body@head{#1}}, |
| 337 |
/pingu/@wings/.code={\@pingu@color@mixwith\pingu@color@left@wing{#1}\@pingu@color@mixwith\pingu@color@right@wing{#1}}, |
| 338 |
/pingu/@eyes/.code={\@pingu@color@mixwith\pingu@color@eye@left{#1}\@pingu@color@mixwith\pingu@color@eye@right{#1}\@pingu@color@mixwith\pingu@color@eye@second@left{#1}\@pingu@color@mixwith\pingu@color@eye@second@right{#1}}, |
| 339 |
/pingu/@bill/.code={\@pingu@color@mixwith\pingu@color@bill{#1}}, |
| 340 |
/pingu/@hair/.code={\@pingu@color@mixwith\pingu@color@hair@a{#1}\@pingu@color@mixwith\pingu@color@hair@b{#1}\@pingu@color@mixwith\pingu@color@hair@c{#1}\@pingu@color@mixwith\pingu@color@hair@d{#1}\@pingu@color@mixwith\pingu@color@hair@e{#1}}, |
| 341 |
/pingu/@feet/.code={\@pingu@color@mixwith\pingu@color@foot@left{#1}\@pingu@color@mixwith\pingu@color@foot@right{#1}} |
| 342 |
}, |
| 343 |
:mix/.default = 50!white, |
| 344 |
:ghost parts/.style = {/pingu/@pingu@all/.append style={opacity={#1}}}, |
| 345 |
:ghost parts/.default = {.5}, |
| 346 |
:ghost/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group}}, |
| 347 |
:ghost/.default = {.5}, |
| 348 |
:ghost glow/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group},/pingu/@block/.append style={/pingu/@glow}}, |
| 349 |
:ghost glow/.default = {.5}, |
| 350 |
:devil/.style = {/pingu/devil horns=#1,/pingu/eyes devil=#1}, |
| 351 |
:devil/.default = pingu@purple, |
| 352 |
:hide/.style = {/pingu/body type=none,/pingu/hair=\@pingu@none,/pingu/feet=none,/pingu/wings=none,/pingu/bill=none,/pingu/eyes=none}, |
| 353 |
:back/.code = {\pgfqkeys{/pingu}{eyes=none,bill=none,body front=\pingu@color@body@main,@pingu@main/.append style={xshift=2\pingu@w@half,xscale=-1},feet back}\gdef\pingu@back@init@call{\pgfsetlayers{foreground,middle,main,background}\gdef\pingu@back@init@call{}}\@pingu@do@back@true}% TODO: back foot clipping? |
| 354 |
}% TODO: draw another penguin that is then drawn above with only back |
| 355 |
\let\pingu@back@init@call\@empty |
| 356 |
% #endregion |
| 357 |
|
| 358 |
% #region glows |
| 359 |
\ifpengu@setup@glows@ |
| 360 |
\usetikzlibrary{fadings}% |
| 361 |
\tikzfading[name=pingu@halo fade out,inner color=transparent!39,outer color=transparent!100] |
| 362 |
\pgfqkeys{/pingu}{@glow/.style={path fading={pingu@halo fade out},#1}} |
| 363 |
\else |
| 364 |
\pgfqkeys{/pingu}{@glow/.style={}} |
| 365 |
\fi |
| 366 |
% #endregion |
| 367 |
% #endregion |
| 368 |
|
| 369 |
% #region core |
| 370 |
% #region path commands |
| 371 |
\long\def\pingu@path{\@dblarg\pingu@path@} |
| 372 |
\def\pingu@path@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,#2] #3;\fi} |
| 373 |
\long\def\pingu@block{\@dblarg\pingu@block@} |
| 374 |
\def\pingu@block@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,/pingu/@block=#2] #3;\fi} |
| 375 |
\long\def\pingu@draw{\@dblarg\pingu@draw@} |
| 376 |
\def\pingu@draw@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,/pingu/@draw=#2] #3;\fi} |
| 377 |
% #endregion |
| 378 |
|
| 379 |
\newcommand*\pingu[1][]{% |
| 380 |
\ifpengu@setup@manual@layers@\pgfsetlayers{background,main,middle,foreground}\fi\begingroup |
| 381 |
\@pingu@do@back@false |
| 382 |
\pgfqkeys{/pingu}{defaults, #1}% |
| 383 |
\let\pingu@path@lowerpingu\pingu@default@path@lowerpingu\relax |
| 384 |
\let\pingu@path@upperpingu\pingu@default@path@upperpingu\relax |
| 385 |
\ifdim\pingu@side@h@half<10.33mm \PackageWarning{\tikzpingus@filename}{Penguins with a height below 10.33mm may have unwanted artifacts.}\fi |
| 386 |
\scope[/pingu/@pingu,/pingu/@pingu@main] |
| 387 |
\scope[/pingu/@body] |
| 388 |
\@pingu@drawer@bodytype@ |
| 389 |
\pingu@body@app |
| 390 |
\endscope |
| 391 |
\path(\pingu@name-head-center)++(0,-.05mm-\pingu@outer@off) coordinate (\pingu@name-bill); |
| 392 |
\scope[shift=(\pingu@name-belly-center),/pingu/@belly] |
| 393 |
\clip[use path=\pingu@whitepingu]; \pingu@belly@raw |
| 394 |
\endscope |
| 395 |
\coordinate(\pingu@name-head) at (\pingu@w@half,.7375cm); |
| 396 |
\scope[/pingu/@eyes] |
| 397 |
\@pingu@drawer@lefteye@ \@pingu@drawer@righteye@ |
| 398 |
\endscope |
| 399 |
\pingu@layer{background}[]\pingu@draw@clothing@behind\endpingu@layer |
| 400 |
\pingu@draw@clothing@middle |
| 401 |
\scope[/pingu/@extras,/pingu/@extras@below] |
| 402 |
\pingu@draw@extras@below |
| 403 |
\endscope |
| 404 |
|
| 405 |
\scope[/pingu/@hair] |
| 406 |
\@pingu@drawer@hairstyle@ |
| 407 |
\endscope |
| 408 |
|
| 409 |
\if@pingu@feet@front\else\pingu@layer{background}[]\fi |
| 410 |
\scope[/pingu/@feet] |
| 411 |
\@pingu@drawer@leftfoot@ \@pingu@drawer@rightfoot@ |
| 412 |
\endscope |
| 413 |
\if@pingu@feet@front\else\endpingu@layer\fi |
| 414 |
|
| 415 |
\scope[/pingu/@wings] |
| 416 |
\@pingu@drawer@leftwing@ \@pingu@drawer@rightwing@ |
| 417 |
\endscope |
| 418 |
|
| 419 |
\path (\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- |
| 420 |
([turn]\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname:2.45mm) |
| 421 |
coordinate (\pingu@name-wing-left-low) -- ([turn]180:4.9mm) |
| 422 |
coordinate (\pingu@name-wing-left-up); |
| 423 |
\path (\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- |
| 424 |
(\pingu@name-wing-left-start) -- |
| 425 |
([turn]-180+\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname:3.45mm) |
| 426 |
coordinate (\pingu@name-wing-left-start-low) -- ([turn]180:6.9mm) |
| 427 |
coordinate (\pingu@name-wing-left-start-up); |
| 428 |
\path (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- |
| 429 |
([turn]-\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname:2.45mm) |
| 430 |
coordinate (\pingu@name-wing-right-low) -- ([turn]180:4.9mm) |
| 431 |
coordinate (\pingu@name-wing-right-up); |
| 432 |
% double path to fix turn |
| 433 |
\path (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- |
| 434 |
(\pingu@name-wing-right-start) -- |
| 435 |
([turn]180-\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname:3.45mm) |
| 436 |
coordinate (\pingu@name-wing-right-start-low) -- ([turn]180:6.9mm) |
| 437 |
coordinate (\pingu@name-wing-right-start-up); |
| 438 |
\pingu@draw@clothing@main |
| 439 |
|
| 440 |
\if@pingu@bill@above\pgfonlayer{foreground}\fi |
| 441 |
\scope[/pingu/@bill] |
| 442 |
\@pingu@drawer@bill@ |
| 443 |
\endscope |
| 444 |
\if@pingu@bill@above\endpgfonlayer\fi |
| 445 |
|
| 446 |
\scope[/pingu/@extras,/pingu/@extras@above] |
| 447 |
\pingu@draw@extras@above |
| 448 |
\endscope |
| 449 |
\scope[/pingu/@wingitems] |
| 450 |
\pingu@draw@wing@items |
| 451 |
\endscope |
| 452 |
\endscope |
| 453 |
\if@pingu@draw@metadots \@pingu@draw@dots \fi |
| 454 |
\pingu@post |
| 455 |
\endgroup |
| 456 |
\pingu@back@init@call |
| 457 |
} |
| 458 |
\let\pengu\pingu% as an alias |
| 459 |
|
| 460 |
% #region lower-pingu |
| 461 |
% Note: to be used in clippies |
| 462 |
\def\pingu@default@path@lowerpingu{(0,\pingu@outer@off) |
| 463 |
% left side |
| 464 |
to[bend right=\pingu@bend] ++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 465 |
% feety stuff |
| 466 |
arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) |
| 467 |
arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% |
| 468 |
% right side |
| 469 |
to[bend right=\pingu@bend] ++(0,\pingu@side@h@half+\pingu@outer@off) |
| 470 |
arc(0:180:\pingu@w@half{} and \pingu@head@h@half) -- cycle}% arc clip to secure wings |
| 471 |
\def\pingu@default@path@upperpingu{(\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@h@half]} |
| 472 |
\let\pingu@path@lowerpingu\pingu@default@path@lowerpingu |
| 473 |
\let\pingu@path@upperpingu\pingu@default@path@upperpingu |
| 474 |
% #endregion |
| 475 |
% #endregion |
| 476 |
|
| 477 |
% #region main body parts |
| 478 |
% #region body front |
| 479 |
% #region normal |
| 480 |
\pingu@bodytype@add{normal}{% |
| 481 |
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) |
| 482 |
% left side |
| 483 |
to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 484 |
% feety stuff |
| 485 |
arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) coordinate (\pingu@name-foot-right) |
| 486 |
arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) |
| 487 |
coordinate (\pingu@name-bottom-center) |
| 488 |
arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) coordinate (\pingu@name-foot-left) |
| 489 |
arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% |
| 490 |
% right side |
| 491 |
to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) |
| 492 |
% coordinate |
| 493 |
coordinate (\pingu@name-wings-side-left) |
| 494 |
-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; |
| 495 |
|
| 496 |
\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) |
| 497 |
++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) |
| 498 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 499 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 500 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 501 |
|
| 502 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); |
| 503 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); |
| 504 |
\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(0,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:4mm and 2mm) arc (270:331:5mm and .85mm) arc (207:270:5mm and .85mm) arc (270:360:4mm and 2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@[email protected]+\pingu@lower@off) arc (0:180:\pingu@[email protected] and \pingu@w@half-\pingu@one) -- cycle; |
| 505 |
|
| 506 |
\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 507 |
\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 508 |
|
| 509 |
\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 510 |
\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 511 |
|
| 512 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 513 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 514 |
} |
| 515 |
% #endregion |
| 516 |
% #region none |
| 517 |
% <pingu@x@bodytype@none> |
| 518 |
\def\pingu@x@bodytype@none{% |
| 519 |
% set the lower half |
| 520 |
\path[save path=\pingu@lowerpingu] (0,\pingu@outer@off) |
| 521 |
% left side |
| 522 |
to[bend right=\pingu@bend] |
| 523 |
coordinate[pos=.775] (\pingu@name-waist-right) |
| 524 |
++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 525 |
% feety stuff |
| 526 |
arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) |
| 527 |
coordinate (\pingu@name-foot-right) |
| 528 |
arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) |
| 529 |
coordinate (\pingu@name-bottom-center) |
| 530 |
arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) |
| 531 |
coordinate (\pingu@name-foot-left) |
| 532 |
arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h) |
| 533 |
% right side |
| 534 |
to[bend right=\pingu@bend] |
| 535 |
coordinate[pos=.225] (\pingu@name-waist-left) |
| 536 |
++(0,\pingu@side@h@half+\pingu@outer@off) |
| 537 |
% switch to left |
| 538 |
coordinate (\pingu@name-wings-side-left) |
| 539 |
-- (0,\pingu@outer@off) |
| 540 |
coordinate[pos=.5] (\pingu@name-head-center) |
| 541 |
coordinate (\pingu@name-wings-side-right) |
| 542 |
-- cycle; |
| 543 |
% set the upper half |
| 544 |
\path[save path=\pingu@upperpingu] (\pingu@name-head-center) |
| 545 |
++(0,\pingu@head@h@half) |
| 546 |
coordinate (\pingu@name-head-top) |
| 547 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 548 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 549 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 550 |
|
| 551 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); |
| 552 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); |
| 553 |
|
| 554 |
% set the white above |
| 555 |
\path[save path=\pingu@whitepingu] (\pingu@name-belly-back) |
| 556 |
++(-\pingu@w@half+\pingu@one,\pingu@lower@off) |
| 557 |
to[bend right=.8\pingu@bend] |
| 558 |
++(0,1.05cm-\pingu@side@h@half-\pingu@lower@off) |
| 559 |
arc (180:270:4mm and 2mm) |
| 560 |
arc (270:331:5mm and .85mm) |
| 561 |
arc (207:270:5mm and .85mm) |
| 562 |
arc (270:360:4mm and 2mm) |
| 563 |
to[bend right=.8\pingu@bend] |
| 564 |
++(0,\pingu@side@[email protected]+\pingu@lower@off) |
| 565 |
arc (0:180:\pingu@[email protected] and \pingu@w@half-\pingu@one) |
| 566 |
-- cycle; |
| 567 |
|
| 568 |
\coordinate (\pingu@name-eye-back-right) |
| 569 |
at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 570 |
\coordinate (\pingu@name-eye-back-left) |
| 571 |
at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 572 |
|
| 573 |
\coordinate (\pingu@name-head-back-con-right) |
| 574 |
at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 575 |
\coordinate (\pingu@name-head-back-con-left) |
| 576 |
at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 577 |
} |
| 578 |
% <@pingu@x@bodytype@none> |
| 579 |
|
| 580 |
% #endregion |
| 581 |
% #region chubby |
| 582 |
\pingu@bodytype@add{chubby}{% |
| 583 |
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) |
| 584 |
% left side |
| 585 |
to[bend right=1.65*\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 586 |
% feety stuff |
| 587 |
arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@[email protected]) coordinate (\pingu@name-foot-right) |
| 588 |
arc (270:332:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) |
| 589 |
coordinate (\pingu@name-bottom-center) |
| 590 |
arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate (\pingu@name-foot-left) |
| 591 |
arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@[email protected])% |
| 592 |
% right side |
| 593 |
to[bend right=1.65*\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) |
| 594 |
% coordinate |
| 595 |
coordinate (\pingu@name-wings-side-left) |
| 596 |
-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; |
| 597 |
|
| 598 |
\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) |
| 599 |
++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) |
| 600 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 601 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 602 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 603 |
|
| 604 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-.97cm); |
| 605 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.65\pingu@side@h@half); |
| 606 |
\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-head-center)++(-\pingu@w@half+2.5\pingu@one,-4.25mm) coordinate (@) to[bend right=19] ([xshift=-1.25mm,yshift=1.5\pingu@one]@|-\pingu@name-bottom-center) arc (180:270:4.675mm and 1mm) arc (270:331:4mm and 1.15mm) arc (207:270:4mm and 1.15mm) arc (270:360:4.675mm and 1mm) to[bend right=19] ([xshift=\pingu@[email protected]\pingu@one,yshift=-4.25mm]\pingu@name-head-center) ; |
| 607 |
|
| 608 |
\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 609 |
\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 610 |
|
| 611 |
\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 612 |
\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 613 |
|
| 614 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; |
| 615 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; |
| 616 |
} |
| 617 |
% #endregion |
| 618 |
% #region legacy |
| 619 |
\pingu@bodytype@add{legacy}{% |
| 620 |
\gdef\pingu@path@lowerpingu{% |
| 621 |
(0,\pingu@outer@off) |
| 622 |
% left side |
| 623 |
to[bend right=1.25*\pingu@bend] ++(0,-.95\pingu@side@h@half-\pingu@outer@off+.65\pingu@one)% |
| 624 |
% feety stuff |
| 625 |
to[out=270,in=270] |
| 626 |
++(2*\pingu@w@half,0) |
| 627 |
% right side |
| 628 |
to[bend right=1.25*\pingu@bend] ++(0,.95\pingu@side@h@half+\pingu@[email protected]\pingu@one) |
| 629 |
arc(0:180:\pingu@w@half{} and \pingu@head@h@half) -- cycle |
| 630 |
} |
| 631 |
\gdef\pingu@path@upperpingu{(\pingu@name-head-center) |
| 632 |
++(0,\pingu@head@h@half) |
| 633 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half); |
| 634 |
} |
| 635 |
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) |
| 636 |
% left side |
| 637 |
to[bend right=1.25*\pingu@bend] coordinate[pos=.77] (\pingu@name-waist-right) ++(0,-.95\pingu@side@h@half-\pingu@outer@off+.65\pingu@one) coordinate (@b) % for bottom clip |
| 638 |
% feety stuff |
| 639 |
to[out=270,in=270] |
| 640 |
coordinate[pos=.3,yshift=-.25mm] (\pingu@name-foot-right) |
| 641 |
coordinate[pos=.5,yshift=.875\pingu@one] (\pingu@name-bottom-center) |
| 642 |
coordinate[pos=.7,yshift=-.25mm] (\pingu@name-foot-left) |
| 643 |
++(2*\pingu@w@half,0) |
| 644 |
% right side |
| 645 |
to[bend right=1.25*\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,.95\pingu@side@h@half+\pingu@[email protected]\pingu@one) |
| 646 |
% coordinate |
| 647 |
coordinate (\pingu@name-wings-side-left) |
| 648 |
-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; |
| 649 |
|
| 650 |
\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) |
| 651 |
++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) |
| 652 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 653 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 654 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 655 |
|
| 656 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-.97cm); |
| 657 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.75\pingu@side@h@half+.325\pingu@one); |
| 658 |
\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-head-center)++(-\pingu@w@half+2.5\pingu@one,-4.25mm) coordinate (@) to[bend right=14] ([xshift=-1.25mm,yshift=.33\pingu@one]@|-@b) to[out=272,in=268] ++(2*\pingu@[email protected]\pingu@one,0) to[bend right=14] ([xshift=\pingu@[email protected]\pingu@one,yshift=-4.25mm]\pingu@name-head-center) ; |
| 659 |
|
| 660 |
\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 661 |
\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 662 |
|
| 663 |
\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 664 |
\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 665 |
|
| 666 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; |
| 667 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; |
| 668 |
} |
| 669 |
% #endregion |
| 670 |
% #endregion |
| 671 |
% #region eyes |
| 672 |
% name core | left | right |
| 673 |
% <pingu@eyes@s> |
| 674 |
\long\def\pingu@eyes@s#1#2#3{% |
| 675 |
\@ifnextchar[% |
| 676 |
{\pingu@eyes@s@{#1}{#2}{#3}}% |
| 677 |
{\pingu@eyes@s@{#1}{#2}{#3}[pingu@black]}% |
| 678 |
} |
| 679 |
\long\def\pingu@eyes@s@#1#2#3[#4]{% |
| 680 |
\pgfqkeys{/pingu}{% |
| 681 |
left eye #1/.style = {/pingu/left eye={#1}, /pingu/left eye color={##1}}, |
| 682 |
left eye #1/.default = {#4}, |
| 683 |
right eye #1/.style = {/pingu/right eye={#1}, /pingu/right eye color={##1}}, |
| 684 |
right eye #1/.default = {#4}, |
| 685 |
eyes #1/.style = {/pingu/eyes={#1}, /pingu/eyes color={##1}}, |
| 686 |
eyes #1/.default = {#4} |
| 687 |
}% |
| 688 |
\pingu@lefteye@add{#1}{#2}\pingu@righteye@add{#1}{#3}% |
| 689 |
} |
| 690 |
% <@pingu@eyes@s> |
| 691 |
\pgfqkeys{/pingu}{% |
| 692 |
eyes none/.style = {eyes=none}, |
| 693 |
left eye none/.style = {left eye=none}, |
| 694 |
right eye none/.style = {right eye=none} |
| 695 |
} % adding the alias |
| 696 |
|
| 697 |
% <eyes normal> |
| 698 |
\pingu@eyes@s{normal}{% |
| 699 |
\pingu@block{\pingu@color@eye@left} |
| 700 |
([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) |
| 701 |
coordinate (\pingu@name-eye-left) |
| 702 |
ellipse [x radius=.1225cm, y radius=.1365cm]; |
| 703 |
}{% |
| 704 |
\pingu@block{\pingu@color@eye@right} |
| 705 |
([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) |
| 706 |
coordinate(\pingu@name-eye-right) |
| 707 |
ellipse [x radius=.1225cm, y radius=.1365cm]; |
| 708 |
} |
| 709 |
% <@eyes normal> |
| 710 |
|
| 711 |
\pingu@eyes@s{vertical}{% |
| 712 |
\pingu@block{\pingu@color@eye@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=1.13mm, y radius=.145cm]; |
| 713 |
}{% |
| 714 |
\pingu@block{\pingu@color@eye@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=1.13mm, y radius=.145cm]; |
| 715 |
} |
| 716 |
|
| 717 |
% <eyes shiny> |
| 718 |
\pingu@eyes@s{shiny}{% |
| 719 |
\pingu@block{\pingu@color@eye@left} |
| 720 |
([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) |
| 721 |
coordinate(\pingu@name-eye-left) |
| 722 |
ellipse [x radius=.22cm, y radius=.26cm]; |
| 723 |
\pingu@block{\pingu@color@eye@second@left} |
| 724 |
(\pingu@name-eye-left)++(\eyebaseang:.85mm and \pingu@one) |
| 725 |
ellipse [x radius=.8mm, y radius=\pingu@one]; |
| 726 |
\pingu@block{\pingu@color@eye@second@left} |
| 727 |
(\pingu@name-eye-left)++(\eyebaseang+180:.12cm and .14cm) |
| 728 |
ellipse [x radius=.25mm, y radius=.35mm]; |
| 729 |
}{% |
| 730 |
\pingu@block{\pingu@color@eye@right} |
| 731 |
([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) |
| 732 |
coordinate(\pingu@name-eye-right) |
| 733 |
ellipse [x radius=.22cm, y radius=.26cm]; |
| 734 |
\pingu@block{\pingu@color@eye@second@right} |
| 735 |
(\pingu@name-eye-right)++(\eyebaseang:.85mm and \pingu@one) |
| 736 |
ellipse [x radius=.8mm, y radius=\pingu@one]; |
| 737 |
\pingu@block{\pingu@color@eye@second@right} |
| 738 |
(\pingu@name-eye-right)++(\eyebaseang+180:.12cm and .14cm) |
| 739 |
ellipse [x radius=.25mm, y radius=.35mm]; |
| 740 |
} |
| 741 |
% <@eyes shiny> |
| 742 |
|
| 743 |
\pingu@eyes@s{wink}{% |
| 744 |
\coordinate (\pingu@name-eye-left) at ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left); |
| 745 |
\pingu@block[rotate around={-4:(\pingu@name-eye-left)}]{\pingu@color@eye@left} (\pingu@name-eye-left)++(174:.14cm and .14cm)++(0,-.065cm) arc (174:6:.14cm and .14cm) arc (-6:-174:.1mm and .08mm) arc (6:174:.12cm and .065cm) arc (-6:-174:.1mm and .08mm) -- cycle; |
| 746 |
}{% |
| 747 |
\coordinate (\pingu@name-eye-right) at ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right); |
| 748 |
\pingu@block[rotate around={4:(\pingu@name-eye-right)}]{\pingu@color@eye@right} (\pingu@name-eye-right)++(174:.14cm and .14cm)++(0,-.065cm) arc (174:6:.14cm and .14cm) arc (-6:-174:.1mm and .08mm) arc (6:174:.12cm and .065cm) arc (-6:-174:.1mm and .08mm) -- cycle; |
| 749 |
} |
| 750 |
|
| 751 |
\pingu@eyes@s{shock}{% |
| 752 |
\pingu@block{\pingu@color@eye@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1535cm, y radius=.1575cm]; |
| 753 |
\pingu@block{\pingu@color@eye@second@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1325cm, y radius=.1375cm]; |
| 754 |
}{% |
| 755 |
\pingu@block{\pingu@color@eye@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=.1535cm, y radius=.1575cm]; |
| 756 |
\pingu@block{\pingu@color@eye@second@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=.1325cm, y radius=.1375cm]; |
| 757 |
} |
| 758 |
|
| 759 |
% \let\pingu@eyes@s\relax |
| 760 |
% #endregion |
| 761 |
|
| 762 |
% #region wings |
| 763 |
% every wing has to define 1) a base element angle and 2) a marker if before or after the wing |
| 764 |
\let\pingu@wi@above\iftrue |
| 765 |
\let\pingu@wi@below\iffalse |
| 766 |
% name core | left | right | above: \iftrue | angle for items | wing down [left] |
| 767 |
\long\def\@pingu@wings@s#1#2#3#4#5#6{% |
| 768 |
\pgfqkeys{/pingu}{% |
| 769 |
left wing #1/.style = {/pingu/left wing={#1}, /pingu/left wing color={##1}},% |
| 770 |
left wing #1/.default = \pingu@color@body@main,% |
| 771 |
right wing #1/.style = {/pingu/right wing={#1}, /pingu/right wing color={##1}},% |
| 772 |
right wing #1/.default = \pingu@color@body@main,% |
| 773 |
wings #1/.style = {/pingu/wings={#1}, /pingu/wings color={##1}},% |
| 774 |
wings #1/.default = \pingu@color@body@main% |
| 775 |
}% |
| 776 |
\expandafter\def\csname @pingu@wing@str@#1@\endcsname{#1}% |
| 777 |
\pingu@leftwing@add{#1}{#2}\pingu@rightwing@add{#1}{#3}% |
| 778 |
\expandafter\let\csname @pingu@wingitem@#1@\endcsname#4\relax |
| 779 |
\expandafter\def\csname @pingu@wingangle@items@#1@\endcsname{#5}% |
| 780 |
\expandafter\def\csname @pingu@wingdown@#1@\endcsname{#6}% |
| 781 |
} |
| 782 |
\pgfqkeys{/pingu}{wings none/.style={/pingu/wings=none},left wing none/.style={/pingu/left wing=none},right wing none/.style={/pingu/right wing=none}} % adding the alias |
| 783 |
\let\@pingu@wingitem@none@\pingu@wi@above |
| 784 |
\def\@pingu@wingangle@items@none@{90} |
| 785 |
\def\@pingu@wingdown@none@{90} |
| 786 |
|
| 787 |
% to hide it with the glow |
| 788 |
\def\pingu@wing@compensator#1{#1} |
| 789 |
|
| 790 |
% #region wings-normal |
| 791 |
\@pingu@wings@s{normal}{% |
| 792 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.5mm]\pingu@name-wings-side-left); |
| 793 |
\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers |
| 794 |
\pgfinterruptboundingbox |
| 795 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 796 |
\endpgfinterruptboundingbox |
| 797 |
\pingu@block[rotate around={15:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.195cm, y radius=9mm] +(-90:.195cm and 9mm) coordinate (\pingu@name-wing-left-tip) +(-90:.145cm and .75cm) coordinate (\pingu@name-wing-left); |
| 798 |
\endscope}{% |
| 799 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.5mm]\pingu@name-wings-side-right); |
| 800 |
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers |
| 801 |
\pgfinterruptboundingbox |
| 802 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 803 |
\endpgfinterruptboundingbox |
| 804 |
\pingu@block[rotate around={-15:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.195cm, y radius=9mm] +(-90:.195cm and 9mm) coordinate (\pingu@name-wing-right-tip) +(-90:.145cm and .75cm) coordinate (\pingu@name-wing-right); |
| 805 |
\endscope}{\pingu@wi@above}{-5}{-70} |
| 806 |
% #endregion |
| 807 |
% #region wings-wave |
| 808 |
\@pingu@wings@s{wave}{% |
| 809 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-5.85mm]\pingu@name-wings-side-left); |
| 810 |
\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers |
| 811 |
\pgfinterruptboundingbox |
| 812 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 813 |
\endpgfinterruptboundingbox |
| 814 |
\pingu@block[rotate around={-39:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=2.2mm, y radius=9.35mm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-left-tip) +(150:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-up) +(-3:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-down) +(90:.175cm and .75cm) coordinate (\pingu@name-wing-left); |
| 815 |
\pingu@wing@compensator{\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=220] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle; |
| 816 |
\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=80,in=-131] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;} |
| 817 |
\endscope}{% |
| 818 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-5.85mm]\pingu@name-wings-side-right); |
| 819 |
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers |
| 820 |
\pgfinterruptboundingbox |
| 821 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 822 |
\endpgfinterruptboundingbox |
| 823 |
\pingu@block[rotate around={39:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.22cm, y radius=.935cm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-right-tip) +(30:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-up) +(177:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-right); |
| 824 |
\pingu@wing@compensator{\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=-45] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle; |
| 825 |
\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.1mm,-4.4mm) to[out=100,in=-50] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;} |
| 826 |
\endscope}{\pingu@wi@above}{-10}{-110} |
| 827 |
% #endregion |
| 828 |
% #region wings-raise |
| 829 |
\@pingu@wings@s{raise}{% |
| 830 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.25mm]\pingu@name-wings-side-left); |
| 831 |
\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers |
| 832 |
\pgfinterruptboundingbox |
| 833 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 834 |
\endpgfinterruptboundingbox |
| 835 |
\pingu@block[rotate around={-17:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.195cm, y radius=.925cm] +(90:.195cm and .925cm) coordinate (\pingu@name-wing-left-tip) +(90:.145cm and .775cm) coordinate (\pingu@name-wing-left); |
| 836 |
\endscope}{% |
| 837 |
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers |
| 838 |
\pgfinterruptboundingbox |
| 839 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 840 |
\endpgfinterruptboundingbox |
| 841 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.25mm]\pingu@name-wings-side-right); |
| 842 |
\pingu@block[rotate around={17:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.195cm, y radius=.925cm] +(90:.195cm and .925cm) coordinate (\pingu@name-wing-right-tip) +(90:.145cm and .775cm) coordinate (\pingu@name-wing-right); |
| 843 |
\endscope}% |
| 844 |
{\pingu@wi@above}{0}{-126} |
| 845 |
% #endregion |
| 846 |
% #region wings-grab |
| 847 |
\@pingu@wings@s{grab}{% |
| 848 |
\pingu@layer{foreground}[] |
| 849 |
\clip[use path=\pingu@lowerpingu]; |
| 850 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-4.5mm]\pingu@name-wings-side-left); |
| 851 |
\pingu@block[rotate around={-42:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.225cm, y radius=1.05cm] +(-90:.225cm and 1.05cm) coordinate (\pingu@name-wing-left-tip) +(-90:.175cm and 9mm) coordinate (\pingu@name-wing-left); |
| 852 |
\endpingu@layer}{% |
| 853 |
\pingu@layer{foreground}[] |
| 854 |
\clip[use path=\pingu@lowerpingu]; |
| 855 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-4.5mm]\pingu@name-wings-side-right); |
| 856 |
\pingu@block[rotate around={42:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.225cm, y radius=1.05cm] +(-90:.225cm and 1.05cm) coordinate (\pingu@name-wing-right-tip) +(-90:.175cm and 9mm) coordinate (\pingu@name-wing-right); |
| 857 |
\endpingu@layer}% |
| 858 |
{\pingu@wi@below}{12}{60} |
| 859 |
% #endregion |
| 860 |
% #region wings-shock |
| 861 |
\@pingu@wings@s{shock}{% |
| 862 |
\pingu@layer{foreground}[] |
| 863 |
\clip[use path=\pingu@lowerpingu]; |
| 864 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.5mm]\pingu@name-wings-side-left); |
| 865 |
\pingu@block[rotate around={64:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.235cm, y radius=.85cm] +(90:.235cm and .85cm) coordinate (\pingu@name-wing-left-tip) +(90:.185cm and .7cm) coordinate (\pingu@name-wing-left); |
| 866 |
\endpingu@layer}{% |
| 867 |
\pingu@layer{foreground}[] |
| 868 |
\clip[use path=\pingu@lowerpingu]; |
| 869 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.5mm]\pingu@name-wings-side-right); |
| 870 |
\pingu@block[rotate around={-64:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.235cm, y radius=.85cm] +(90:.235cm and .85cm) coordinate (\pingu@name-wing-right-tip) +(90:.185cm and .7cm) coordinate (\pingu@name-wing-right); |
| 871 |
\endpingu@layer}% |
| 872 |
{\pingu@wi@below}{-180}{116} |
| 873 |
% #endregion |
| 874 |
% #region wings-hug |
| 875 |
\@pingu@wings@s{hug}{% |
| 876 |
\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.25mm]\pingu@name-wings-side-left); |
| 877 |
\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers |
| 878 |
\pgfinterruptboundingbox |
| 879 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 880 |
\endpgfinterruptboundingbox |
| 881 |
\pingu@block[rotate around={-128:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.235cm, y radius=.925cm] +(90:.235cm and .935cm) coordinate (\pingu@name-wing-left-tip) +(175:.235cm and .935cm) coordinate (\pingu@name-wing-left-cap-up) +(22:.235cm and .935cm) coordinate (\pingu@name-wing-left-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-left); |
| 882 |
\pingu@wing@compensator{\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=140] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle; |
| 883 |
\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=82,in=155] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;} |
| 884 |
\endscope}{% |
| 885 |
\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.25mm]\pingu@name-wings-side-right); |
| 886 |
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers |
| 887 |
\pgfinterruptboundingbox |
| 888 |
\path[/pingu/@invclip] \pingu@path@lowerpingu; |
| 889 |
\endpgfinterruptboundingbox |
| 890 |
\pingu@block[rotate around={128:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.235cm, y radius=.935cm] +(90:.235cm and .935cm) coordinate (\pingu@name-wing-right-tip) +(5:.235cm and .935cm) coordinate (\pingu@name-wing-right-cap-up) +(160:.235cm and .935cm) coordinate (\pingu@name-wing-right-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-right); |
| 891 |
\pingu@wing@compensator{\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=40] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle; |
| 892 |
\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.085mm,-4.4mm) to[out=92,in=20] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;} |
| 893 |
\endscope}{\pingu@wi@above}{-30}{-62} |
| 894 |
\let\@pingu@wings@s\relax |
| 895 |
% #endregion |
| 896 |
% #endregion |
| 897 |
|
| 898 |
% #region hairstyle |
| 899 |
\pgfqkeys{/pingu}{hairstyle none/.style={/pingu/hairstyle=none}} |
| 900 |
\pingu@hairstyle@add{normal}{% |
| 901 |
\scope\pgfinterruptboundingbox |
| 902 |
\clip[/pingu/@invclip] (\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@[email protected]]; |
| 903 |
\endpgfinterruptboundingbox |
| 904 |
\scope[rounded corners=.08mm] |
| 905 |
\pingu@block{\pingu@color@hair@a} ([yshift=-\pingu@one]\pingu@name-head-top) -- ++(.15mm,0) arc (0:90:\pingu@one@eight{} and .135cm) arc (90:0:.35mm and .75mm); |
| 906 |
\pingu@block{\pingu@color@hair@b} ([yshift=-\pingu@one]\pingu@name-head-top) -- ++(.33mm,0) arc (0:90:\pingu@one@eight{} and .175cm) arc (90:0:.35mm and \pingu@one); |
| 907 |
\pingu@block{\pingu@color@hair@c} ([yshift=-\pingu@one]\pingu@name-head-top) -- ++(-.33mm,0) arc (180:90:.17cm and .215cm) arc (90:180:.75mm and .18cm); |
| 908 |
\pingu@block{\pingu@color@hair@d} ([yshift=-\pingu@one]\pingu@name-head-top) -- ++(.25mm,0) arc (180:90:\pingu@one@eight{} and .175cm) arc (90:180:.35mm and \pingu@one@eight); |
| 909 |
\pingu@block{\pingu@color@hair@e} ([yshift=-\pingu@one]\pingu@name-head-top) -- ++(.44mm,0) arc (180:90:\pingu@one@eight{} and .135cm) arc (90:180:.35mm and .75mm); |
| 910 |
\endscope\endscope} |
| 911 |
% #endregion |
| 912 |
|
| 913 |
% #region feet |
| 914 |
% <pingu@feet@s> |
| 915 |
\long\def\pingu@feet@s#1#2#3{% |
| 916 |
\@ifnextchar[% |
| 917 |
{\pingu@feet@s@{#1}{#2}{#3}}% |
| 918 |
{\pingu@feet@s@{#1}{#2}{#3}[pingu@yellow]}% |
| 919 |
} |
| 920 |
\long\def\pingu@feet@s@#1#2#3[#4]{% |
| 921 |
\pgfqkeys{/pingu}{% |
| 922 |
left foot #1/.style = {/pingu/left foot={#1}, /pingu/left foot color={##1}},% |
| 923 |
left foot #1/.default = {#4},% |
| 924 |
right foot #1/.style = {/pingu/right foot={#1}, /pingu/right foot color={##1}},% |
| 925 |
right foot #1/.default = {#4},% |
| 926 |
feet #1/.style = {/pingu/feet={#1}, /pingu/feet color={##1}},% |
| 927 |
feet #1/.default = {#4}% |
| 928 |
}% |
| 929 |
\pingu@leftfoot@add{#1}{#2}\pingu@rightfoot@add{#1}{#3}% |
| 930 |
} |
| 931 |
% <@pingu@feet@s> |
| 932 |
\pgfqkeys{/pingu}{% |
| 933 |
feet none/.style={/pingu/feet=none}, |
| 934 |
left foot none/.style={/pingu/left foot=none}, |
| 935 |
right foot none/.style={/pingu/right foot=none} |
| 936 |
} |
| 937 |
|
| 938 |
% <feet normal> |
| 939 |
\pingu@feet@s{normal}{% |
| 940 |
\coordinate (@tmp) at ([xshift=-.5\pingu@foot@single@h]\pingu@name-foot-left); |
| 941 |
\pingu@block[rotate around={-25+\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} |
| 942 |
(@tmp) ellipse [ |
| 943 |
x radius=\pingu@foot@single@w, |
| 944 |
y radius=\pingu@foot@single@h |
| 945 |
]; |
| 946 |
\pingu@block[rotate around={\basicfeetbend:(\pingu@name-foot-left)}] |
| 947 |
{\pingu@color@foot@left} (\pingu@name-foot-left) ellipse [ |
| 948 |
x radius=\pingu@foot@single@w, |
| 949 |
y radius=\pingu@foot@single@h |
| 950 |
]; |
| 951 |
|
| 952 |
\coordinate (@tmp) at ([xshift= .5\pingu@foot@single@h]\pingu@name-foot-left); |
| 953 |
\pingu@block[rotate around={25+\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} |
| 954 |
(@tmp) ellipse [ |
| 955 |
x radius=\pingu@foot@single@w, |
| 956 |
y radius=\pingu@foot@single@h |
| 957 |
]; |
| 958 |
}{% |
| 959 |
\coordinate (@tmp) at ([xshift=-.5\pingu@foot@single@h]\pingu@name-foot-right); |
| 960 |
\pingu@block[rotate around={-25-\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} |
| 961 |
(@tmp) ellipse [ |
| 962 |
x radius=\pingu@foot@single@w, |
| 963 |
y radius=\pingu@foot@single@h |
| 964 |
]; |
| 965 |
\pingu@block[rotate around={-\basicfeetbend:(\pingu@name-foot-right)}] |
| 966 |
{\pingu@color@foot@right} (\pingu@name-foot-right) ellipse [ |
| 967 |
x radius=\pingu@foot@single@w, |
| 968 |
y radius=\pingu@foot@single@h |
| 969 |
]; |
| 970 |
\coordinate (@tmp) at ([xshift= .5\pingu@foot@single@h]\pingu@name-foot-right); |
| 971 |
\pingu@block[rotate around={25-\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} |
| 972 |
(@tmp) ellipse [ |
| 973 |
x radius=\pingu@foot@single@w, |
| 974 |
y radius=\pingu@foot@single@h |
| 975 |
]; |
| 976 |
} |
| 977 |
% <@feet normal> |
| 978 |
|
| 979 |
|
| 980 |
\pingu@feet@s{sit}{% |
| 981 |
\pingu@layer{foreground}[] |
| 982 |
\coordinate (@tmp) at ([xshift=-.35\pingu@foot@single@h,yshift=-.4mm]\pingu@name-foot-left); |
| 983 |
\pingu@block[rotate around={\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} (@tmp) |
| 984 |
arc(180:90:1.33mm and 4mm) arc (90:0:1.33mm and .9mm) to[bend left=50] ++(1.33mm,-1.3mm) to[bend left=66] ++(.7mm,-1.8mm) arc(0-50:-90-20:4.13mm and 4.2mm) to[bend left] cycle; |
| 985 |
\endpingu@layer |
| 986 |
}{% |
| 987 |
\pingu@layer{foreground}[xscale=-1] |
| 988 |
\coordinate (@tmp) at ([xshift=-.35\pingu@foot@single@h,yshift=-.5mm]\pingu@name-foot-right); |
| 989 |
\pingu@block[rotate around={\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} (@tmp) |
| 990 |
arc(180:90:1.33mm and 4mm) arc (90:0:1.33mm and .9mm) to[bend left=50] ++(1.33mm,-1.3mm) to[bend left=66] ++(.7mm,-1.8mm) arc(0-50:-90-20:4.13mm and 4.2mm) to[bend left] cycle; |
| 991 |
\endpingu@layer |
| 992 |
} |
| 993 |
|
| 994 |
% <feet simple> |
| 995 |
\pingu@feet@s{simple}{% |
| 996 |
\pingu@block[rotate around={-\basicfeetbend:(\pingu@name-foot-left)}] |
| 997 |
{\pingu@color@foot@left} (\pingu@name-foot-left) ellipse [ |
| 998 |
x radius=2.66\pingu@foot@single@w, |
| 999 |
y radius=\pingu@foot@single@h |
| 1000 |
]; |
| 1001 |
}{% |
| 1002 |
\pingu@block[rotate around={\basicfeetbend:(\pingu@name-foot-right)}] |
| 1003 |
{\pingu@color@foot@right} (\pingu@name-foot-right) ellipse [ |
| 1004 |
x radius=2.66\pingu@foot@single@w, |
| 1005 |
y radius=\pingu@foot@single@h |
| 1006 |
]; |
| 1007 |
} |
| 1008 |
% <@feet simple> |
| 1009 |
|
| 1010 |
\pingu@feet@s{back}{% |
| 1011 |
\pingu@block{\pingu@color@foot@left} ([yshift=.2\pingu@foot@single@h]\pingu@name-foot-left) ellipse [x radius=2.5\pingu@foot@single@w,y radius=.435\pingu@foot@single@h]; |
| 1012 |
}{% |
| 1013 |
\pingu@block{\pingu@color@foot@right} ([yshift=.2\pingu@foot@single@h]\pingu@name-foot-right) ellipse [x radius=2.5\pingu@foot@single@w,y radius=.435\pingu@foot@single@h]; |
| 1014 |
} |
| 1015 |
|
| 1016 |
\pingu@feet@s{chubby}{% |
| 1017 |
\pingu@layer{foreground}[rotate around={-\basicfeetbend+45:(\pingu@name-foot-left)}] |
| 1018 |
\pingu@block\pingu@color@foot@left ([xshift=-3mm,yshift=-1.65mm]\pingu@name-foot-left) to[bend right=3] ++(5mm,0) -- ++(.05mm,.6mm) to[out=83,in=129,looseness=1.125] cycle; |
| 1019 |
\ifx\pingu@color@foot@left\@pingu@none\else |
| 1020 |
\colorlet{@}{\pingu@color@foot@left!80!\pingu@color@body@main} |
| 1021 |
\pingu@draw{@} ([xshift=-3mm,yshift=-1.65mm]\pingu@name-foot-left) to[bend right=5] coordinate[pos=.29] (@) coordinate[pos=.69] (@b) ++(5mm,0) -- ++(.05mm,.6mm) to[out=83,in=119,looseness=1.125] cycle; |
| 1022 |
\pingu@draw{@} (@) to[bend right=4] ++(.125mm,.75mm); |
| 1023 |
\pingu@draw{@} (@b) to[bend right=9] ++(.15mm,1.15mm); |
| 1024 |
\fi |
| 1025 |
\endpingu@layer |
| 1026 |
}{% |
| 1027 |
\pingu@layer{foreground}[rotate around={-\basicfeetbend+45:(\pingu@name-foot-right)}] |
| 1028 |
\pingu@block\pingu@color@foot@right ([xshift=3mm,yshift=-1.65mm]\pingu@name-foot-right) to[bend left=3] ++(-5mm,0) -- ++(-.05mm,.6mm) to[out=97,in=76,looseness=1.125] cycle; |
| 1029 |
\ifx\pingu@color@foot@right\@pingu@none\else |
| 1030 |
\colorlet{@}{\pingu@color@foot@right!80!\pingu@color@body@main} |
| 1031 |
\pingu@draw{@} ([xshift=3mm,yshift=-1.65mm]\pingu@name-foot-right) to[bend left=5] coordinate[pos=.29] (@) coordinate[pos=.69] (@b) ++(-5mm,0) -- ++(-.05mm,.475mm) to[out=97,in=81,looseness=1.125] cycle; |
| 1032 |
\pingu@draw{@} (@) to[bend left=4] ++(-.125mm,.75mm); |
| 1033 |
\pingu@draw{@} (@b) to[bend left=9] ++(-.15mm,1.15mm); |
| 1034 |
\fi |
| 1035 |
\endpingu@layer |
| 1036 |
} |
| 1037 |
% #endregion |
| 1038 |
|
| 1039 |
% #region bill |
| 1040 |
% name core | main |
| 1041 |
% <pingu@bill@s> |
| 1042 |
\long\def\pingu@bill@s#1#2{% |
| 1043 |
\pgfqkeys{/pingu}{% |
| 1044 |
bill #1/.style = {/pingu/bill={#1}, /pingu/bill color={##1}},% |
| 1045 |
bill #1/.default = pingu@yellow% TODO: defaults |
| 1046 |
}% |
| 1047 |
\pingu@bill@add{#1}{#2}% |
| 1048 |
} |
| 1049 |
\pgfqkeys{/pingu}{bill none/.style={/pingu/bill=none}} |
| 1050 |
% <@pingu@bill@s> |
| 1051 |
|
| 1052 |
% <bill normal> |
| 1053 |
\pingu@bill@s{normal}{% |
| 1054 |
\pingu@block[rounded corners=.1mm]{\pingu@color@bill} |
| 1055 |
(\pingu@name-bill)++(-.19cm,0) arc (180:360:.19cm and .225cm) |
| 1056 |
coordinate[pos=.5] (\pingu@name-bill-bottom) -- ++(-.2mm,.05mm) |
| 1057 |
to[bend right=10] ([xshift=-.17cm,yshift=.05mm]\pingu@name-bill) |
| 1058 |
-- cycle; |
| 1059 |
} |
| 1060 |
% <@bill normal> |
| 1061 |
|
| 1062 |
\pingu@bill@s{foreground}{% |
| 1063 |
\pingu@layer{foreground}[] |
| 1064 |
\pingu@block{\pingu@color@bill} [rounded corners=.1mm] (\pingu@name-bill)++(-.19cm,0) |
| 1065 |
arc (180:360:.19cm and .225cm) |
| 1066 |
coordinate[pos=.5] (\pingu@name-bill-bottom) |
| 1067 |
-- ++(-.2mm,.05mm) to[bend right=10] ([xshift=-.17cm,yshift=.05mm]\pingu@name-bill)--cycle; |
| 1068 |
\endpingu@layer |
| 1069 |
} |
| 1070 |
|
| 1071 |
% <bill flat> |
| 1072 |
\pingu@bill@s{flat}{% |
| 1073 |
\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) |
| 1074 |
arc (180:360:.19cm and .225cm) |
| 1075 |
coordinate[pos=.5] (\pingu@name-bill-bottom) |
| 1076 |
-- cycle; |
| 1077 |
} |
| 1078 |
% <@bill flat> |
| 1079 |
|
| 1080 |
% <bill open> |
| 1081 |
\pingu@bill@s{open}{% |
| 1082 |
\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) |
| 1083 |
arc (180:360:.19cm and .245cm) |
| 1084 |
coordinate[pos=.5] (\pingu@name-bill-bottom) |
| 1085 |
-- cycle; |
| 1086 |
\pingu@block{\pingu@color@bill!90!pingu@black} (\pingu@name-bill)++(-.189cm,0) |
| 1087 |
arc (180:360:.19cm and .233cm) |
| 1088 |
-- cycle; |
| 1089 |
\pingu@block{\pingu@color@bill!40!pingu@white} (\pingu@name-bill)++(-.189cm,0) |
| 1090 |
arc (180:360:.19cm and .177cm) |
| 1091 |
-- cycle; |
| 1092 |
\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) |
| 1093 |
arc (180:360:.19cm and .175cm) |
| 1094 |
to[bend right=10] ([xshift=-.17cm,yshift=.05mm]\pingu@name-bill)--cycle; |
| 1095 |
} |
| 1096 |
% <@bill open> |
| 1097 |
% #endregion |
| 1098 |
% #endregion |
| 1099 |
|
| 1100 |
% #region dots |
| 1101 |
\def\@pingu@draw@dots{% |
| 1102 |
\pingu@layer{foreground}[] |
| 1103 |
% mark wing outer |
| 1104 |
\path[draw,pink,thick] (\pingu@name-wing-left-start-low) --(\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- (\pingu@name-wing-left-low); |
| 1105 |
\path[draw,pink,thick] (\pingu@name-wing-right-start-low) -- (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- (\pingu@name-wing-right-low); |
| 1106 |
\@for\@pingu@elem:={belly-center,head,head-top,foot-left,foot-right,eye-right,eye-left,bill,bill-bottom,wings-side-left,wings-side-right,wing-left-start,wing-left-tip,wing-right-start,wing-right-tip,head-right,head-left,head-center,head-back-con-left,head-back-con-right,bottom-center,waist-left,waist-right}\do{ |
| 1107 |
\path[fill=green] (\pingu@name-\@pingu@elem) circle[radius=1.125\p@]; |
| 1108 |
} |
| 1109 |
\@for\@pingu@elem:={wing-left,wing-right,wing-left-low,wing-right-low,wing-left-up,wing-right-up,wing-left-start-low,wing-right-start-low,wing-left-start-up,wing-right-start-up}\do{ |
| 1110 |
\path[fill=yellow] (\pingu@name-\@pingu@elem) circle[radius=1.125\p@]; |
| 1111 |
} |
| 1112 |
% mark wing items |
| 1113 |
\csname @pingu@wingitem@\@pingu@select@leftwing@ @\endcsname \colorlet{@wmark}{magenta} \else \colorlet{@wmark}{teal} \fi |
| 1114 |
\pingu@block[/pingu/@draw=@wmark,thick,rotate around={\csname @pingu@wingangle@items@\@pingu@select@leftwing@ @\endcsname:(\pingu@name-wing-left)}]{@wmark} |
| 1115 |
(\pingu@name-wing-left)++(0,3mm) circle [radius=\pingu@one] -- ++(0,-6mm); |
| 1116 |
\csname @pingu@wingitem@\@pingu@select@rightwing@ @\endcsname \colorlet{@wmark}{magenta} \else \colorlet{@wmark}{teal} \fi |
| 1117 |
\pingu@block[/pingu/@draw=@wmark,thick,rotate around={-\csname @pingu@wingangle@items@\@pingu@select@rightwing@ @\endcsname:(\pingu@name-wing-right)}]{@wmark} |
| 1118 |
(\pingu@name-wing-right)++(0,3mm) circle [radius=\pingu@one] -- ++(0,-6mm); |
| 1119 |
\endpingu@layer} |
| 1120 |
% endregion |
| 1121 |
% #region extras |
| 1122 |
% #region extras below |
| 1123 |
\def\pingu@@xif@eb#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@eb@#2\endcsname\fi} |
| 1124 |
\def\pingu@xif@eb#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@eb{#1}{#2}}\fi} |
| 1125 |
\def\pingu@draw@extras@below{% |
| 1126 |
\pingu@xif@eb{flipflop}{flipflop}% |
| 1127 |
\pingu@xif@eb{shoes}{shoes}% |
| 1128 |
\pingu@xif@eb{sneaker}{sneaker}% |
| 1129 |
\pingu@xif@eb{heart}{heart}% |
| 1130 |
\pingu@xif@eb{devilwings}{devilwings}% |
| 1131 |
\pingu@xif@eb{glow}{glow}% |
| 1132 |
\pingu@xif@eb{belt}{belt}% |
| 1133 |
\pingu@xif@eb{santabeard}{santabeard}% |
| 1134 |
\pingu@xif@eb{tie}{tie}% |
| 1135 |
\pingu@xif@eb{pants}{pants}% |
| 1136 |
\pingu@xif@eb{medal}{medal}% |
| 1137 |
\pingu@xif@eb{bowtie}{bowtie}% |
| 1138 |
\pingu@xif@eb{cup}{cup}% |
| 1139 |
\pingu@xif@eb{vampireteeth}{vampireteeth}% |
| 1140 |
\pingu@xif@eb{blush}{blush}% |
| 1141 |
\pingu@xif@eb{eyepatchleft}{eyepatch@l}% |
| 1142 |
\pingu@xif@eb{eyepatchright}{eyepatch@r}% |
| 1143 |
\pingu@xif@eb{monocleleft}{monocle@l}% |
| 1144 |
\pingu@xif@eb{monocleright}{monocle@r}% |
| 1145 |
\pingu@xif@eb{horseon}{horseon}% |
| 1146 |
} |
| 1147 |
% #region cup |
| 1148 |
\pingu@create@extra{cup}{% |
| 1149 |
cup/.code = {\pingu@set@extra{cup}{true}\pingu@color{cup}{#1}}, |
| 1150 |
cup/.default = pingu@green, |
| 1151 |
cup steam/.code = \pingu@color{cup@steam}{#1},% |
| 1152 |
cup steam/.default = lightgray!90!orange,% |
| 1153 |
cup steam shift/.code = \def\pingu@x@cup@steam@shift{#1},% |
| 1154 |
cup straw/.code = \pingu@color{cup@straw}{#1}% |
| 1155 |
}{cup straw=\pingu@color@cup,cup steam=\@pingu@none,cup steam shift=0mm} |
| 1156 |
|
| 1157 |
\def\pingu@draw@eb@cup{% |
| 1158 |
\pingu@block[rounded corners=.25mm]{\pingu@color@cup} (\pingu@name-belly-center)++(-.325cm,.275cm) to[bend right=2] ++(.5mm,-.675cm) to[bend right=8] ++(.55cm,\z@) to[bend right=2] ++(.5mm,.675cm); |
| 1159 |
\path (\pingu@name-belly-center)++(0,.275cm) -- (\pingu@name-bill) coordinate[pos=.5,xshift=-2mm] (\pingu@name-cup-straw-outer-angle); |
| 1160 |
\path (\pingu@name-belly-center)++(-.115cm,.275cm) coordinate (\pingu@name-straw-outer-start); |
| 1161 |
\pingu@block[rounded corners=.15mm]{\pingu@color@cup@straw} (\pingu@name-straw-outer-start) -- (\pingu@name-cup-straw-outer-angle) -- (\pingu@name-bill) -- ++(.5mm,0) -- ([xshift=.5mm]\pingu@name-cup-straw-outer-angle) -- ([xshift=.5mm]\pingu@name-straw-outer-start) -- cycle; |
| 1162 |
\pingu@block{\pingu@color@cup} (\pingu@name-belly-center)++(0,.275cm) ellipse [x radius=.325cm,y radius=.5mm]; |
| 1163 |
|
| 1164 |
% TODO: configure opacity |
| 1165 |
\pgfonlayer{foreground} |
| 1166 |
\pingu@block[rounded corners=.05mm,opacity=.55]{\pingu@color@cup@steam} (\pingu@name-belly-center)++(1.5mm+\pingu@x@cup@steam@shift,4mm) coordinate(@) to[out=100,in=260] ++(.3mm,3.75mm) -- ++(.1mm,0) to[out=280,in=80] ([xshift=.1mm]@) -- cycle; |
| 1167 |
\pingu@block[rounded corners=.05mm,opacity=.55]{\pingu@color@cup@steam} (\pingu@name-belly-center)++(0mm+\pingu@x@cup@steam@shift,3.33mm) coordinate(@) to[out=100,in=260] ++(.2mm,2.75mm) -- ++(.1mm,0) to[out=280,in=80] ([xshift=.1mm]@) -- cycle; |
| 1168 |
\pingu@block[rounded corners=.05mm,opacity=.55]{\pingu@color@cup@steam} (\pingu@name-belly-center)++(-1.25mm++\pingu@x@cup@steam@shift,3.65mm) coordinate(@) to[out=100,in=260] ++(.3mm,3.75mm) -- ++(.1mm,0) to[out=280,in=80] ([xshift=.1mm]@) -- cycle; |
| 1169 |
\endpgfonlayer |
| 1170 |
} |
| 1171 |
% #endregion |
| 1172 |
|
| 1173 |
% #region eye patch |
| 1174 |
% #region eye patch left |
| 1175 |
\pingu@create@extra{eyepatchleft}{% |
| 1176 |
eyepatch left/.forward to = /pingu/eye patch left, |
| 1177 |
eye-patch left/.forward to = /pingu/eye patch left, |
| 1178 |
eye patch left/.code = \pingu@set@extra{eyepatchleft}{true}\pingu@color{eyepatchleft}{#1}, |
| 1179 |
eye patch left/.default = \pingu@color@body@main, |
| 1180 |
}{} |
| 1181 |
|
| 1182 |
\newlength\pingu@patchw \pingu@patchw=6.5pt |
| 1183 |
\def\pingu@draw@eb@eyepatch@l{% |
| 1184 |
\pingu@draw[line width=1.25pt,line cap=round]{\pingu@color@eyepatchleft} (\pingu@name-head-right)++(-2.75mm,-2.5mm) to[bend right=10] coordinate[pos=.71] (\pingu@name-eye-left-patch) ([xshift=-.85mm,yshift=1.25mm]\pingu@name-wings-side-left); |
| 1185 |
\pingu@block[rotate around={-9:(\pingu@name-eye-left-patch)}]{\pingu@color@eyepatchleft} (\pingu@name-eye-left-patch)++(0,.5pt) ellipse [x radius=\pingu@patchw, y radius=.65pt]; |
| 1186 |
\pingu@block[rotate around={-9:(\pingu@name-eye-left-patch)}]{\pingu@color@eyepatchleft} (\pingu@name-eye-left-patch) ++(-\pingu@patchw,.5pt) arc(180:360:\pingu@patchw{} and 8.9pt); |
| 1187 |
} |
| 1188 |
% #endregion |
| 1189 |
% #region eye patch right |
| 1190 |
\pingu@create@extra{eyepatchright}{% |
| 1191 |
eyepatch right/.forward to = /pingu/eye patch right, |
| 1192 |
eye-patch right/.forward to = /pingu/eye patch right, |
| 1193 |
eye patch right/.code = \pingu@set@extra{eyepatchright}{true}\pingu@color{eyepatchright}{#1}, |
| 1194 |
eye patch right/.default = \pingu@color@body@main, |
| 1195 |
}{} |
| 1196 |
|
| 1197 |
\def\pingu@draw@eb@eyepatch@r{% |
| 1198 |
\pingu@draw[line width=1.25pt,line cap=round]{\pingu@color@eyepatchright} (\pingu@name-head-left)++(2.75mm,-2.5mm) to[bend left=10] coordinate[pos=.71] (\pingu@name-eye-right-patch) ([xshift=.85mm,yshift=1.25mm]\pingu@name-wings-side-right); |
| 1199 |
\pingu@block[rotate around={9:(\pingu@name-eye-right-patch)}]{\pingu@color@eyepatchright} (\pingu@name-eye-right-patch)++(0,.5pt) ellipse [x radius=\pingu@patchw, y radius=.65pt]; |
| 1200 |
\pingu@block[rotate around={9:(\pingu@name-eye-right-patch)}]{\pingu@color@eyepatchright} (\pingu@name-eye-right-patch) ++(-\pingu@patchw,.5pt) arc(180:360:\pingu@patchw{} and 8.9pt); |
| 1201 |
} |
| 1202 |
% #endregion |
| 1203 |
% #endregion |
| 1204 |
|
| 1205 |
% #region glow |
| 1206 |
\pingu@create@extra{glow}{% |
| 1207 |
glow/.code = \pingu@set@extra{glow}{true}\pingu@color{glow}{#1}, |
| 1208 |
glow/.default = pingu@white, |
| 1209 |
glow thick/.style = {/pingu/glow={#1}, /pingu/glow width function={3.5mm-1.25*\i mm}}, |
| 1210 |
glow steps/.code = \def\pingu@x@extra@glow@steps{#1}, |
| 1211 |
glow function/.code = \def\pingu@x@extra@glow@func{#1}, |
| 1212 |
glow width function/.code = \def\pingu@x@extra@glow@width@func{#1}, |
| 1213 |
glow solid/.style = {/pingu/glow={#1},/pingu/glow function={1},/pingu/glow steps={1.2,1.3}} |
| 1214 |
}{glow steps={1,1.1,1.2,1.3,1.4,1.5},glow function={.1/\i},glow width function={2.85mm-1.65*\i mm}} |
| 1215 |
|
| 1216 |
\def\pingu@draw@eb@glow{% |
| 1217 |
\pingu@layer{background}[] |
| 1218 |
\@for\i:={\pingu@x@extra@glow@steps}\do{ |
| 1219 |
\scope[/pingu/@block/.append style={draw=\pingu@color@glow,line width=\pingu@x@extra@glow@width@func},/pingu/@draw/.append style={draw=\pingu@color@glow,line width=\pingu@x@extra@glow@width@func},opacity=\pingu@x@extra@glow@func,transparency group] |
| 1220 |
\pingu@draw[sharp corners]{\pingu@color@glow} \pingu@path@lowerpingu; |
| 1221 |
\pingu@draw[sharp corners]{\pingu@color@glow} \pingu@path@upperpingu; |
| 1222 |
% todo: disable re set of coordinates |
| 1223 |
% only draw, if not offset |
| 1224 |
\tikzset{rounded corners/.style={}}\def\pingu@wing@compensator##1{}% |
| 1225 |
\csname @pingu@wingitem@\@pingu@select@leftwing@ @\endcsname\@pingu@drawer@leftwing@\fi |
| 1226 |
\csname @pingu@wingitem@\@pingu@select@rightwing@ @\endcsname\@pingu@drawer@rightwing@\fi |
| 1227 |
\endscope |
| 1228 |
} |
| 1229 |
\endpingu@layer |
| 1230 |
} |
| 1231 |
% #endregion |
| 1232 |
% #endregion |
| 1233 |
|
| 1234 |
% #region extras above |
| 1235 |
% NOTE: No auto append to allow easy order change |
| 1236 |
\def\pingu@@xif@ea#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@ea@#2\endcsname\fi} |
| 1237 |
\def\pingu@xif@ea#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@ea{#1}{#2}}\fi} |
| 1238 |
\def\pingu@draw@extras@above{% |
| 1239 |
\pingu@xif@ea{cap}{cap}% |
| 1240 |
\pingu@xif@ea{eyeframe}{eyeframe}% |
| 1241 |
\pingu@xif@ea{mask}{mask}% |
| 1242 |
\pingu@xif@ea{glasses}{glasses}% |
| 1243 |
\pingu@xif@ea{glassesround}{glassesround}% |
| 1244 |
\pingu@xif@ea{devilhorns}{devilhorns}% |
| 1245 |
\pingu@xif@ea{bunnyears}{bunnyears}% |
| 1246 |
\pingu@xif@ea{headband}{headband}% |
| 1247 |
\pingu@xif@ea{vrheadset}{vrheadset}% |
| 1248 |
\pingu@xif@ea{strawhat}{strawhat}% |
| 1249 |
\pingu@xif@ea{graduate}{graduate}% |
| 1250 |
\pingu@xif@ea{hat}{hat}% |
| 1251 |
\pingu@xif@ea{spacehelmet}{spacehelmet}% |
| 1252 |
\pingu@xif@ea{mitra}{mitra}% |
| 1253 |
\pingu@xif@ea{witchhat}{witchhat}% |
| 1254 |
\pingu@xif@ea{constructionhelmet}{constructionhelmet}% |
| 1255 |
\pingu@xif@ea{detectivecap}{detectivecap}% |
| 1256 |
\pingu@xif@ea{conicalhat}{conicalhat}% |
| 1257 |
\pingu@xif@ea{crown}{crown}% |
| 1258 |
\pingu@xif@ea{cakehat}{cakehat}% |
| 1259 |
\pingu@xif@ea{pumpkinhat}{pumpkinhat}% |
| 1260 |
\pingu@xif@ea{jackolantern}{jackolantern}% |
| 1261 |
\pingu@xif@ea{princesscrown}{princesscrown}% |
| 1262 |
\pingu@xif@ea{rook}{rook}% |
| 1263 |
\pingu@xif@ea{halo}{halo}% |
| 1264 |
\pingu@xif@ea{headphone}{headphone}% |
| 1265 |
\pingu@xif@ea{sheriffstar}{sheriffstar}% |
| 1266 |
\pingu@xif@ea{santahat}{santahat}% |
| 1267 |
\pingu@xif@ea{woolhat}{woolhat}% |
| 1268 |
\pingu@xif@ea{deerhat}{deerhat}% |
| 1269 |
\pingu@xif@ea{banner}{banner}% |
| 1270 |
\pingu@xif@ea{bee}{bee}% |
| 1271 |
\pingu@xif@ea{drums}{drums}% |
| 1272 |
} |
| 1273 |
% #region halo |
| 1274 |
\newif\if@pingu@x@halo@glow |
| 1275 |
\newif\if@pingu@x@halo@above |
| 1276 |
\pingu@create@extra{halo}{% |
| 1277 |
halo/.code = \pingu@set@extra{halo}{true}\pingu@color{halo}{#1}, |
| 1278 |
halo/.default = pingu@lightblue, |
| 1279 |
halo raise/.code = \def\pingu@x@halo@raise{#1}, |
| 1280 |
halo above/.is if = @pingu@x@halo@above, |
| 1281 |
halo glow/.is if = @pingu@x@halo@glow% only active if glows loaded |
| 1282 |
}{halo glow=\ifpengu@setup@glows@ true\else false\fi,halo raise=0mm,halo above=false} |
| 1283 |
|
| 1284 |
\def\pingu@draw@ea@halo{% |
| 1285 |
\if@pingu@x@halo@above\pingu@layer{foreground}[]\fi |
| 1286 |
\pingu@block[even odd rule]{\pingu@color@halo} ([yshift=\pingu@x@halo@raise]\pingu@name-head-top) ellipse [x radius=\pingu@w@half-\pingu@one,y radius=2.5mm] ellipse [x radius=\pingu@[email protected],y radius=1.55mm]; |
| 1287 |
\if@pingu@x@halo@glow |
| 1288 |
\pingu@block[even odd rule,/pingu/@glow]{\pingu@color@halo} ([yshift=\pingu@x@halo@raise]\pingu@name-head-top) ellipse [x radius=(\pingu@[email protected])*1.7,y radius=1.55mm*2.35] ellipse [x radius=\pingu@[email protected],y radius=1.55mm]; |
| 1289 |
\fi |
| 1290 |
\if@pingu@x@halo@above\endpingu@layer{foreground}\fi |
| 1291 |
} |
| 1292 |
% #endregion |
| 1293 |
|
| 1294 |
% #region eye frame |
| 1295 |
\pingu@create@extra{eyeframe}{% |
| 1296 |
% extra halo |
| 1297 |
eyeframe/.forward to = /pingu/eye frame, |
| 1298 |
eye-frame/.forward to = /pingu/eye frame, |
| 1299 |
eye frame/.code = \pingu@set@extra{eyeframe}{true}\pingu@color{eyeframe}{#1}, |
| 1300 |
eye frame/.default = pingu@black, |
| 1301 |
}{} |
| 1302 |
|
| 1303 |
\def\pingu@draw@ea@eyeframe{% |
| 1304 |
\pingu@draw{\pingu@color@eyeframe} [rounded corners=.25mm](\pingu@name-eye-left)++(-2mm,1.5mm) to[bend left=8] ++(4.2mm,0) to[out=-80,in=70] ++(-.2mm,-2.75mm) to[bend left=32.5] ++(-3.65mm,0mm) to[out=135,in=-90] ++(-.8mm,2.7mm) -- cycle; |
| 1305 |
\pingu@draw{\pingu@color@eyeframe} [rounded corners=.25mm](\pingu@name-eye-right)++(2mm,1.5mm) to[bend right=8] ++(-4.2mm,0) to[out=-100,in=110] ++(.2mm,-2.75mm) to[bend right=32.5] ++(3.65mm,0mm) to[out=45,in=-90] ++(.8mm,2.7mm) -- cycle; |
| 1306 |
} |
| 1307 |
% #endregion |
| 1308 |
|
| 1309 |
% #region sheriff star |
| 1310 |
\pingu@create@extra{sheriffstar}{% |
| 1311 |
sheriff star/.code = \pingu@set@extra{sheriffstar}{true}\pingu@color{sheriffstar}{#1}, |
| 1312 |
sheriff star/.default = pingu@yellow, |
| 1313 |
sheriff star content/.code = \def\pingu@x@sheriff@star@content{#1}, |
| 1314 |
sheriff star lines/.code = \pingu@color{sheriffstar@lines}{#1}, |
| 1315 |
}{sheriff star content={\resizebox{2.25mm}!{\textsf{\bfseries Sheriff}}},sheriff star lines=pingu@black!92!\pingu@color@sheriffstar} |
| 1316 |
|
| 1317 |
\def\pingu@draw@ea@sheriffstar{% |
| 1318 |
\pingu@layer{middle}[] |
| 1319 |
\path (\pingu@name-belly-center) -- (\pingu@name-head-back-con-left) node[pos=.6, star, star points=7, fill=\pingu@color@sheriffstar,minimum size=1.75mm,scale=.9,rotate=-5] (@) {}; |
| 1320 |
\foreach \i in {1,...,7} { |
| 1321 |
\pingu@block{\pingu@color@sheriffstar!98!pingu@black} (@.outer point \i) circle [radius=.2mm]; |
| 1322 |
} |
| 1323 |
|
| 1324 |
\node[outer sep=0pt,inner xsep=0pt,inner ysep=.25mm] (@s) at (@) {\ifx\pingu@color@sheriffstar@lines\@pingu@none\else\color{\pingu@color@sheriffstar@lines}\fi\pingu@x@sheriff@star@content}; |
| 1325 |
\pingu@draw[line width=.002mm]{\pingu@color@sheriffstar@lines} (@s.north east) -- (@s.north west); |
| 1326 |
\pingu@draw[line width=.002mm]{\pingu@color@sheriffstar@lines} (@s.south east) -- (@s.south west); |
| 1327 |
\endpingu@layer} |
| 1328 |
% #endregion |
| 1329 |
|
| 1330 |
% #endregion |
| 1331 |
% #endregion |
| 1332 |
|
| 1333 |
% #region wingitems |
| 1334 |
% #region wingitems-setup |
| 1335 |
\def\pingu@may@draw@wing#1#2{\csname if@pingu@x@#1#2@\endcsname \csname pingu@draw@wi@#1\endcsname{#2}\fi} |
| 1336 |
\edef\pingu@str@wing@left{left} |
| 1337 |
\let\@pingu@wingitems@\@empty |
| 1338 |
\newif\if@pingu@wing@item@side@left@ |
| 1339 |
\def\pingu@setup@wing#1#2{% |
| 1340 |
\edef\@tmpa{#2}% minus on left |
| 1341 |
\ifx\pingu@str@wing@left\@tmpa |
| 1342 |
\expandafter\def\expandafter\@angle{\csname @pingu@wingangle@items@\csname @pingu@select@#2wing@\endcsname @\endcsname+\pingu@wing@left@item@angle@user}% |
| 1343 |
\def\@sidesign{1}% |
| 1344 |
\if@pingu@wi@flip@left \@pingu@wing@item@side@left@false \else \@pingu@wing@item@side@left@true\fi |
| 1345 |
\else |
| 1346 |
\expandafter\def\expandafter\@angle{-(\csname @pingu@wingangle@items@\csname @pingu@select@#2wing@\endcsname @\endcsname+\pingu@wing@right@item@angle@user)}% |
| 1347 |
\def\@sidesign{-1}% |
| 1348 |
\if@pingu@wi@flip@right \@pingu@wing@item@side@left@true \else \@pingu@wing@item@side@left@false\fi |
| 1349 |
\fi |
| 1350 |
\expandafter\def\expandafter\@col{\csname pingu@color@#1#2\endcsname}% |
| 1351 |
} |
| 1352 |
|
| 1353 |
\def\pingu@draw@wing@items{% |
| 1354 |
\pingu@layer{middle}[]\@pingu@draw@wing@items@left\endpingu@layer |
| 1355 |
\pingu@layer{middle}[]\@pingu@draw@wing@items@right\endpingu@layer |
| 1356 |
} |
| 1357 |
|
| 1358 |
\let\@pingu@draw@wing@items@left\@empty |
| 1359 |
\let\@pingu@draw@wing@items@right\@empty |
| 1360 |
|
| 1361 |
\def\pingu@create@wing@extra#1#2#3{% |
| 1362 |
\pingu@csappto{@pingu@wingitems@}{#1}% |
| 1363 |
\expandafter\def\expandafter\@pingu@draw@wing@items@left\expandafter{\@pingu@draw@wing@items@left\pingu@may@draw@wing{#1}{left}}% |
| 1364 |
\expandafter\def\expandafter\@pingu@draw@wing@items@right\expandafter{\@pingu@draw@wing@items@right\pingu@may@draw@wing{#1}{right}}% |
| 1365 |
\def\@lr{left}% |
| 1366 |
\protected@edef\@tmp{\expandafter\expandafter\expandafter\expandafter\expandafter\unexpanded{{#1left}{#2}{#3}}}% |
| 1367 |
\expandafter\pingu@create@extra\@tmp |
| 1368 |
\def\@lr{right}% |
| 1369 |
\protected@edef\@tmp{\expandafter\expandafter\expandafter\expandafter\expandafter\unexpanded{{#1right}{#2}{#3}}}% |
| 1370 |
\expandafter\pingu@create@extra\@tmp} |
| 1371 |
% #endregion |
| 1372 |
|
| 1373 |
% #region cane |
| 1374 |
\pingu@create@wing@extra{cane}{% |
| 1375 |
cane \@lr/.code = {\pingu@set@extra{cane\@lr}{true}\pingu@color{cane\@lr}{##1}}, |
| 1376 |
cane \@lr/.default = pingu@bronze, |
| 1377 |
cane \@lr\space raise/.code = {\@namedef{pinug@x@cane@raise@\@lr}{##1}}, |
| 1378 |
cane \@lr\space length/.code = {\@namedef{pinug@x@cane@length@\@lr}{##1}}, |
| 1379 |
}{cane \@lr\space raise=0mm,cane \@lr\space length=15mm} |
| 1380 |
|
| 1381 |
% #1 wing |
| 1382 |
\def\pingu@draw@wi@cane#1{% |
| 1383 |
\pingu@setup@wing{cane}{#1}% |
| 1384 |
\if@pingu@wing@item@side@left@ |
| 1385 |
\pingu@block[thick,rotate around={\@angle+5:(\pingu@name-wing-#1)}]{\@col}(\pingu@name-wing-#1)++(0,-7mm+\pinug@x@cane@raise@left) -- ++(0,\csname pinug@x@cane@length@#1\endcsname) arc(180:0:2.25mm and 2.2mm) arc(360:180:.3mm and .275mm) arc(0:180:1.65mm and 1.65mm) -- ++(0,-\csname pinug@x@cane@length@#1\endcsname) arc(360:180:.3mm and .275mm) -- cycle; |
| 1386 |
\else |
| 1387 |
\pingu@block[thick,rotate around={\@angle-5:(\pingu@name-wing-#1)}]{\@col}(\pingu@name-wing-#1)++(0,-7mm+\pinug@x@cane@raise@right) -- ++(0,\csname pinug@x@cane@length@#1\endcsname) arc(0:180:2.25mm and 2.2mm) arc(180:360:.3mm and .275mm) arc(180:0:1.65mm and 1.65mm) -- ++(0,-\csname pinug@x@cane@length@#1\endcsname) arc(180:360:.3mm and .275mm) -- cycle; |
| 1388 |
\fi |
| 1389 |
} |
| 1390 |
% #endregion |
| 1391 |
|
| 1392 |
% #region staff |
| 1393 |
\pingu@create@wing@extra{staff}{% |
| 1394 |
staff \@lr/.code = {\pingu@set@extra{staff\@lr}{true}\pingu@color{staff\@lr}{##1}}, |
| 1395 |
staff \@lr/.default = pingu@bronze, |
| 1396 |
staff \@lr\space length/.code = \expandafter\def\csname pingu@staff@\@lr @length\endcsname{##1}, |
| 1397 |
staff \@lr\space raise/.code = \expandafter\def\csname pingu@staff@\@lr @raise\endcsname{##1}, |
| 1398 |
staff \@lr\space code app/.code = \expandafter\appto\csname pingu@staff@\@lr @code\endcsname{##1}, |
| 1399 |
staff \@lr\space code pre/.code = \expandafter\preto\csname pingu@staff@\@lr @code\endcsname{##1}, |
| 1400 |
staff \@lr\space code/.code = \expandafter\def\csname pingu@staff@\@lr @code\endcsname{##1}, |
| 1401 |
spear \@lr/.style = {staff \@lr, staff \@lr\space code app={ |
| 1402 |
\noexpand\pgfonlayer{background} |
| 1403 |
\fill[##1,rounded corners=1pt] ([yshift=-1.5mm]\noexpand\pingu@name-staff-\@lr-top) -- ++(1mm,1.5mm) -- ++(-1mm,4mm) -- ++(-1mm,-4mm) -- cycle; |
| 1404 |
\noexpand\endpgfonlayer |
| 1405 |
}}, |
| 1406 |
spear \@lr/.default=gray, |
| 1407 |
cross \@lr/.style = {staff \@lr=##1, staff \@lr\space code app={ |
| 1408 |
\noexpand\pgfonlayer{foreground} |
| 1409 |
\fill[##1,rounded corners=1pt] ([yshift=-4.5mm,xshift=-4mm]\noexpand\pingu@name-staff-\@lr-top) rectangle ++(8mm,1mm); |
| 1410 |
\noexpand\endpgfonlayer |
| 1411 |
}}, |
| 1412 |
cross \@lr/.default=pingu@bronze |
| 1413 |
}{staff \@lr\space length=28mm,staff \@lr\space raise=-11mm,staff \@lr\space code={}} |
| 1414 |
\def\pingu@draw@wi@staff#1{% |
| 1415 |
\pingu@setup@wing{staff}{#1}% |
| 1416 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 1417 |
\pingu@block{\csname pingu@color@staff#1\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@staff@#1@raise\endcsname) -- ++(0,\csname pingu@staff@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-staff-#1-top) -- ++(0,-\csname pingu@staff@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 1418 |
\csname pingu@staff@#1@code\endcsname |
| 1419 |
\endscope |
| 1420 |
} |
| 1421 |
% #endregion |
| 1422 |
% #endregion |
| 1423 |
|
| 1424 |
% #region clothes |
| 1425 |
\def\pingu@@xif@cloth#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@cloth@#2\endcsname\fi} |
| 1426 |
\def\pingu@xif@cloth#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@cloth{#1}{#2}}\fi} |
| 1427 |
\def\pingu@draw@clothing@behind{% |
| 1428 |
\pingu@xif@cloth{secondshirt}{secondshirt@behind}% |
| 1429 |
\pingu@xif@cloth{shirt}{shirt@behind}% |
| 1430 |
\pingu@xif@cloth{cloak}{cloak@behind}% |
| 1431 |
} |
| 1432 |
|
| 1433 |
\def\pingu@draw@clothing@middle{% |
| 1434 |
\pingu@xif@cloth{secondshirt}{secondshirt@middle}% |
| 1435 |
\pingu@xif@cloth{shirt}{shirt@middle}% |
| 1436 |
\pingu@xif@cloth{cloak}{cloak@middle}% |
| 1437 |
} |
| 1438 |
|
| 1439 |
\def\pingu@draw@clothing@main{% |
| 1440 |
\pingu@xif@cloth{secondshirt}{secondshirt}% |
| 1441 |
\pingu@xif@cloth{shirt}{shirt}% |
| 1442 |
\pingu@xif@cloth{cloak}{cloak}% |
| 1443 |
} |
| 1444 |
% #endregion |
| 1445 |
|
| 1446 |
|
| 1447 |
% #region bee-lib |
| 1448 |
\pingu@create@extra{bee}{% |
| 1449 |
bee/.code = {\pingu@set@extra{bee}{true}\pingu@color{bee}{#1}}, |
| 1450 |
bee/.default = pingu@yellow!60!pingu@white,% |
| 1451 |
bee body/.code = \pingu@color{bee@body}{#1}, |
| 1452 |
bee eyes/.code = \pingu@color{bee@eyes}{#1}, |
| 1453 |
bee wings/.code = \pingu@color{bee@wings}{#1}, |
| 1454 |
bee mouth/.code = \pingu@color{bee@mouth}{#1}, |
| 1455 |
bee blush/.code = \pingu@color{bee@blush}{#1}, |
| 1456 |
bee position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@bee@angle{#1}\def\pingu@x@bee@xshift{#2}\def\pingu@x@bee@yshift{#3}\def\pingu@x@bee@scale{#4}}, |
| 1457 |
}{bee body=pingu@black!82!gray,bee wings=pingu@blue!8!pingu@white,bee mouth=\pingu@color@bee@body,bee eyes=\pingu@color@bee@body,bee blush=pingu@red!21!\pingu@color@bee,bee position={-27.5:(8mm,15mm){.875}}} |
| 1458 |
|
| 1459 |
\def\pingu@bee@x@lbody{ (left) to[out=270,in=150] (0,-.725) to[out=30,in=270] (right)} |
| 1460 |
|
| 1461 |
\def\pingu@draw@ea@bee{% |
| 1462 |
\scope[very path/.append style={line join=round},rotate around={\pingu@x@bee@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@bee@xshift,\pingu@x@bee@yshift)},scale=\pingu@x@bee@scale] |
| 1463 |
% wings |
| 1464 |
\coordinate (wl) at(20:2.55mm); |
| 1465 |
\coordinate (wr) at(160:2.55mm); |
| 1466 |
\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=-32:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.15mm, y radius=2.75mm]; |
| 1467 |
\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=32:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.15mm, y radius=2.75mm]; |
| 1468 |
\pingu@draw[fill=\pingu@color@bee@wings,rotate around=19:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.55mm, y radius=3.125mm]; |
| 1469 |
\pingu@draw[fill=\pingu@color@bee@wings,rotate around=-19:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.55mm, y radius=3.125mm]; |
| 1470 |
% body |
| 1471 |
\path (-.375,0) coordinate (left) -- (.375,0) coordinate (right); |
| 1472 |
% TODO: block draw? |
| 1473 |
\pingu@block[draw=\pingu@color@bee@body]{\pingu@color@bee@body} \pingu@bee@x@lbody; |
| 1474 |
\scope\clip\pingu@bee@x@lbody; |
| 1475 |
\foreach \angl in {30,1} { |
| 1476 |
\pingu@block{\pingu@color@bee} (-\angl:.75) to[bend left=14] (180+\angl:.75) -- ++(0,-1.75mm) |
| 1477 |
to[bend right=14] (-\angl-14:.75) -- cycle; |
| 1478 |
}\endscope |
| 1479 |
% left and right arm |
| 1480 |
\foreach\m/\s/\k in {right/-2.45/95,left/-.75/80} { |
| 1481 |
\scope[shift=(\m),yshift=\s,rotate around=\k:(\m),scale=.166] |
| 1482 |
\pingu@block{\pingu@color@bee@body} (-.965,0) arc(270:90:.29) -- ++(1.233,0) arc (90:-90:.29) -- cycle; |
| 1483 |
\endscope} |
| 1484 |
% sting |
| 1485 |
\pingu@draw[line cap=round,thick]{\pingu@color@bee@body} (0,-.725) -- ++(0,-.035); |
| 1486 |
% head |
| 1487 |
\pingu@draw[fill=\pingu@color@bee,rounded corners=1.5pt]{\pingu@color@bee@body} (.85mm,-.55mm) to[bend right=30,looseness=.9] ([xshift=1.45mm,yshift=1.35mm]right) arc(0:180:{(.75cm+2*1.45mm)/2} and {(.75cm+2*1.45mm)/2.05}) to[bend right=30,looseness=.9] (-.85mm,-.55mm) -- cycle; |
| 1488 |
% eyes [intersect with left and right] |
| 1489 |
\pingu@block{\pingu@color@bee@eyes} (left|-0,2.265mm)++(.6mm,0) coordinate (el) circle[radius=.6mm]; |
| 1490 |
\coordinate (ell) at ([yshift=-.8mm]el); |
| 1491 |
\pingu@block[rotate around=3:(ell)]{\pingu@color@bee@blush} ([yshift=-.8mm]el) ellipse[x radius=.412mm, y radius=.165mm]; |
| 1492 |
\pingu@block{\pingu@color@bee@eyes} (right|-0,2.265mm)++(-.6mm,0) coordinate (er) circle[radius=.6mm]; |
| 1493 |
\coordinate (err) at ([yshift=-.8mm]er); |
| 1494 |
\pingu@block[rotate around=-1:(err)]{\pingu@color@bee@blush} ([yshift=-.8mm]er) ellipse[x radius=.4mm, y radius=.155mm]; |
| 1495 |
% mouth |
| 1496 |
\scope[yshift=1mm] |
| 1497 |
\pingu@draw[semithick,line cap=round]{\pingu@color@bee@mouth} (-.6mm,0) arc (180:360:.6mm and .415mm); |
| 1498 |
% antenna |
| 1499 |
\pingu@draw[line cap=round]{\pingu@color@bee@body} (123:4mm) to[out=110,in=-41] ++(-1mm,3mm) coordinate (@); |
| 1500 |
\pingu@block[rotate around=-41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.185mm]@) ellipse[x radius=.55mm,y radius=.35mm]; |
| 1501 |
\pingu@draw[line cap=round]{\pingu@color@bee@body} (57:4mm) to[out=70,in=180+41] ++(1mm,3mm) coordinate (@); |
| 1502 |
\pingu@block[rotate around=41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.2mm]@) ellipse[x radius=.55mm,y radius=.35mm]; |
| 1503 |
\endscope |
| 1504 |
\endscope |
| 1505 |
} |
| 1506 |
|
| 1507 |
\pingu@create@wing@extra{flower}{% |
| 1508 |
flower \@lr/.code = {\pingu@set@extra{flower\@lr}{true}\pingu@color{flower\@lr}{##1}}, |
| 1509 |
flower \@lr/.default = pingu@purple!80!pingu@yellow, |
| 1510 |
flower \@lr\space center/.code = \pingu@color{flower@\@lr @center}{##1}, |
| 1511 |
flower \@lr\space center size/.code = \expandafter\def\csname pingu@flower@\@lr @center@size\endcsname{##1}, |
| 1512 |
flower \@lr\space stem/.code = \pingu@color{flower@\@lr @stem}{##1}, |
| 1513 |
flower \@lr\space stem length/.code = \expandafter\def\csname pingu@flower@\@lr @stem@length\endcsname{##1}, |
| 1514 |
flower \@lr\space stem width/.code = \expandafter\def\csname pingu@flower@\@lr @stem@width\endcsname{##1}, |
| 1515 |
flower \@lr\space stem tilt/.code = \expandafter\def\csname pingu@flower@\@lr @stem@tilt\endcsname{##1}, |
| 1516 |
flower \@lr\space size/.code = \expandafter\def\csname pingu@flower@\@lr @size\endcsname{##1}, |
| 1517 |
flower \@lr\space petal count/.code = \expandafter\def\csname pingu@flower@\@lr @petals\endcsname{##1}, |
| 1518 |
flower \@lr\space petal width/.code = \expandafter\def\csname pingu@flower@\@lr @petals@width\endcsname{##1}, |
| 1519 |
flower \@lr\space petal start angle/.code = \expandafter\def\csname pingu@flower@\@lr @petals@start@angle\endcsname{##1}, |
| 1520 |
flower \@lr\space petal peak/.code = \expandafter\def\csname pingu@flower@\@lr @petals@peak\endcsname{##1}, |
| 1521 |
}{flower \@lr\space size=.3mm, flower \@lr\space center=brown!50!pingu@yellow, flower \@lr\space center size=.65mm, flower \@lr\space stem=green!90!pingu@yellow!70!pingu@black, flower \@lr\space stem length=6mm,flower \@lr\space stem width=.15mm,flower \@lr\space stem tilt=-.5mm, flower \@lr\space petal count=5, flower \@lr\space petal start angle=27, flower \@lr\space petal width=4.5pt, flower \@lr\space petal peak=2} |
| 1522 |
|
| 1523 |
% #1 wing |
| 1524 |
\def\pingu@draw@wi@flower#1{% |
| 1525 |
\pingu@setup@wing{flower}{#1}% |
| 1526 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 1527 |
\pingu@draw[line width=\csname pingu@flower@#1@stem@width\endcsname]{\csname pingu@color@flower@#1@stem\endcsname} ([yshift=-.5mm]\pingu@name-wing-#1) to[out=80,in=-20] ++(\csname pingu@flower@#1@stem@tilt\endcsname,\csname pingu@flower@#1@stem@length\endcsname) coordinate (\pingu@name-flower-center-#1) coordinate (@); |
| 1528 |
\pgfmathsetmacro\AnglePerPetal{360/\csname pingu@flower@#1@petals\endcsname} |
| 1529 |
\edef\@currwidth{\csname pingu@flower@#1@petals@width\endcsname}% |
| 1530 |
\foreach \i in {1,...,\csname pingu@flower@#1@petals\endcsname} { |
| 1531 |
\pgfmathsetmacro{\@currrot}{\i*\AnglePerPetal+\csname pingu@flower@#1@petals@start@angle\endcsname}% |
| 1532 |
\scope[rotate around={\@currrot:(@)}] |
| 1533 |
\pingu@block{\@col} (@) to[bend right=4] ++(\@currwidth,.5*\csname pingu@flower@#1@size\endcsname) arc(-9:189:\@currwidth\space and \@currwidth*\csname pingu@flower@#1@petals@peak\endcsname) to[bend right=4] ++(\@currwidth,-.5*\csname pingu@flower@#1@size\endcsname) -- cycle; |
| 1534 |
\endscope |
| 1535 |
\pingu@block{\csname pingu@color@flower@#1@center\endcsname} (\pingu@name-flower-center-#1) circle[radius=\csname pingu@flower@#1@center@size\endcsname]; |
| 1536 |
} |
| 1537 |
\endscope |
| 1538 |
} |
| 1539 |
% #endregion |
| 1540 |
% #endregion |
| 1541 |
|
| 1542 |
% #region christmas-lib |
| 1543 |
\pingu@create@extra{santahat}{% |
| 1544 |
santa hat/.code = \pingu@set@extra{santahat}{true}\pingu@color{santahat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none}, |
| 1545 |
santa hat/.default = pingu@red!87!pingu@black, |
| 1546 |
santa hat second/.code = \pingu@color{santahat@second}{#1}, |
| 1547 |
santa hat bobble/.code = \pingu@color{santahat@bobble}{#1} |
| 1548 |
}{santa hat second={pingu@white!97!\pingu@color@santahat},santa hat bobble={\pingu@color@santahat@second}} |
| 1549 |
\def\pingu@draw@ea@santahat{% |
| 1550 |
\path (\pingu@name-head-center)+(152:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-right); |
| 1551 |
\path (\pingu@name-head-center)+(5:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-left); |
| 1552 |
\pingu@layer{middle}[] |
| 1553 |
\pingu@block{\pingu@color@santahat@second} (\pingu@name-santa-right) to[out=48,in=132] (\pingu@name-santa-left) to[out=30,in=-45,looseness=1.325] ++(0,3.2mm) |
| 1554 |
to[out=135,in=47,looseness=1.025] coordinate[pos=.915] (\pingu@name-santa-ur) coordinate[pos=.055] (\pingu@name-santa-ul) ([yshift=2mm]\pingu@name-santa-right) to[out=240,in=140] cycle; |
| 1555 |
\endpingu@layer |
| 1556 |
\pingu@layer{background}[] |
| 1557 |
\pingu@block{\pingu@color@santahat} (\pingu@name-santa-ur) arc(145:-25:11.85mm and 14.915mm) |
| 1558 |
to[bend right=7] coordinate[pos=.5] (\pingu@name-santa-lc) ++(-1.11mm,.375mm) to[bend right=11] (\pingu@name-santa-ul) to[bend right=15] cycle; |
| 1559 |
\pingu@block{\pingu@color@santahat@bobble} (\pingu@name-santa-lc) circle[radius=2.625mm]; |
| 1560 |
\endpingu@layer |
| 1561 |
} |
| 1562 |
\pingu@create@extra{santabeard}{% |
| 1563 |
santa beard/.code = \pingu@set@extra{santabeard}{true}\pingu@color{santabeard}{#1}, |
| 1564 |
santa beard/.default = pingu@white!96!pingu@red!98!pingu@black!92!gray, |
| 1565 |
santa beard string/.code = \pingu@color{santabeard@string}{#1} |
| 1566 |
}{santa beard string=\pingu@color@body@main!85!pingu@black} |
| 1567 |
\def\pingu@draw@eb@santabeard{% |
| 1568 |
% \coordinate (\pingu@name-santa-beard-center) at ([yshift=1.25mm]\pingu@name-belly-center); |
| 1569 |
\pingu@block{\pingu@color@santabeard@string} ([xshift=-.35mm,yshift=.575mm]\pingu@name-head-back-con-right) to[bend right=28,edge node={foreach[count=\i] \l in {0.03,0.085,...,0.992} {coordinate[pos=\l-rand*.015,yshift=-.85pt] (\pingu@name-santa-beard-\i)}}] |
| 1570 |
([yshift=.575mm,xshift=.35mm]\pingu@name-head-back-con-left) arc(20:110:.05mm and .15mm) to[bend left=26] ([yshift=.575mm+.15mm,xshift=-.35mm]\pingu@name-head-back-con-right) to[bend right] cycle; |
| 1571 |
\ifx\pingu@color@santabeard\@pingu@none\else% to allow for random |
| 1572 |
\xdef\@pmaxY{18}\xdef\@pmaxYI{17}% |
| 1573 |
\foreach[evaluate=\j as \maxj using int(\@pmaxY-\j),evaluate=\j as \widthred using \j/23pt] \j in {0,...,\@pmaxYI} { |
| 1574 |
\foreach[remember=\i as \li (initially 0)] \i in {1,...,\maxj} { |
| 1575 |
\pgfmathsetmacro\@ptmp{94+rand*2.6} |
| 1576 |
\pingu@block{\pingu@color@santabeard!\@ptmp!pingu@black} (\pingu@name-santa-beard-\i) circle [radius=1.85pt-\widthred pt+rand*.35pt]; |
| 1577 |
\ifnum\li>0 % make middle of last |
| 1578 |
\path (\pingu@name-santa-beard-\li) -- (\pingu@name-santa-beard-\i) coordinate[pos=.5,yshift=-1.1pt,xshift=.133pt] (\pingu@name-santa-beard-\li); % smoll shift |
| 1579 |
\fi |
| 1580 |
}}\fi |
| 1581 |
} |
| 1582 |
|
| 1583 |
\pingu@create@extra{woolhat}{% |
| 1584 |
wool hat/.code = \pingu@set@extra{woolhat}{true}\pingu@color{woolhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none}, |
| 1585 |
wool hat/.default = pingu@blue!57!pingu@black, |
| 1586 |
wool hat second/.code = \pingu@color{woolhat@second}{#1}, |
| 1587 |
wool hat bobble/.code = \pingu@color{woolhat@bobble}{#1} |
| 1588 |
}{wool hat second={\pingu@color@woolhat!55!pingu@white},wool hat bobble={\pingu@color@woolhat@second}} |
| 1589 |
\def\pingu@draw@ea@woolhat{% |
| 1590 |
\path ([yshift=.5mm,xshift=.165mm]\pingu@name-head-center)+(165:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-right); |
| 1591 |
\path ([yshift=.5mm,xshift=-.045mm]\pingu@name-head-center)+(4:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-left); |
| 1592 |
\pingu@layer{middle}[] |
| 1593 |
\pingu@block{\pingu@color@woolhat@second} (\pingu@name-wool-right) to[out=37,in=170] (\pingu@name-wool-left) to[out=50,in=-55] ++(0,1.52mm) coordinate (\pingu@name-wool-left-up) |
| 1594 |
to[out=167,in=38] coordinate[pos=.915] (\pingu@name-wool-ur) coordinate[pos=.055] (\pingu@name-wool-ul) ([yshift=1.5mm]\pingu@name-wool-right) coordinate (\pingu@name-wool-right-up) to[out=240,in=140] cycle; |
| 1595 |
\endpingu@layer |
| 1596 |
\path (\pingu@name-wool-left-up) -- (\pingu@name-wool-right-up) coordinate[pos=.455,yshift=9.75mm] (@mid); |
| 1597 |
\pingu@block{\pingu@color@woolhat} (\pingu@name-wool-right-up) to[out=71,in=203] [rounded corners=2pt] (@mid) to[out=-34,in=100] [sharp corners] (\pingu@name-wool-left-up) to[in=37,out=172] cycle; |
| 1598 |
\pingu@layer{background}[] |
| 1599 |
\pingu@block{\pingu@color@woolhat@bobble} (@mid) circle [radius=1.25mm]; |
| 1600 |
\endpingu@layer |
| 1601 |
} |
| 1602 |
|
| 1603 |
|
| 1604 |
\pingu@create@extra{deerhat}{% |
| 1605 |
deer hat/.code = \pingu@set@extra{deerhat}{true}\pingu@color{deerhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none}, |
| 1606 |
deer hat/.default = pingu@bronze!57!pingu@black, |
| 1607 |
deer hat b/.code = \pingu@color{deerhat@b}{#1}, |
| 1608 |
deer hat band/.code = \pingu@color{deerhat@band}{#1}, |
| 1609 |
}{deer hat band={\pingu@color@deerhat!85!pingu@black},deer hat b=\pingu@color@deerhat} |
| 1610 |
\pgfmathsetmacro\pingu@deerhat@baseang@l{90-360*(1-\pinguanglehl)} |
| 1611 |
\pgfmathsetmacro\pingu@deerhat@baseang@r{90-360*(1-\pinguanglehr)} |
| 1612 |
\def\pingu@deerhat@baseoff{47} |
| 1613 |
\def\pingu@deerhat@yshift{.15mm} |
| 1614 |
\def\pingu@deerhat@linewidth{1.32mm} |
| 1615 |
\def\pingu@deerhat@headoff@l{22} |
| 1616 |
\def\pingu@deerhat@headoff@r{19} |
| 1617 |
\def\pingu@draw@ea@deerhat{% |
| 1618 |
\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-left) arc (\pingu@deerhat@baseang@l:\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate[yshift=.05mm] (@target); |
| 1619 |
\pingu@draw[line width=.7mm]{\pingu@color@deerhat@band} ([xshift=-.8mm]@target) arc (\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:360+\pingu@deerhat@baseang@r+\pingu@deerhat@baseoff:\pingu@w@half{}-.8mm and \pingu@head@h@half); |
| 1620 |
|
| 1621 |
\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90-\pingu@deerhat@headoff@l:\pingu@w@half{} and \pingu@head@h@half) coordinate (@left); |
| 1622 |
\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90+\pingu@deerhat@headoff@r:\pingu@w@half{} and \pingu@head@h@half) coordinate (@right); |
| 1623 |
|
| 1624 |
\pgfonlayer{background} |
| 1625 |
\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} (@left) to[bend right=4] ++(.85mm,1.5mm) coordinate (@a) -- ++(3.15mm,.5mm) coordinate (@b) -- ++(4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend right=10] ++(-.75mm,2.55mm); |
| 1626 |
\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} ([xshift=-.135mm,yshift=-.425mm]@a) to[bend left=3] ++(1mm,3.9mm) ([xshift=-.4mm,yshift=-.05mm]@b) to[bend right=2] ++(3.75mm,.1mm) (@c) to[bend left=12] ++(-1mm,3.5mm); |
| 1627 |
\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} (@right) to[bend left=4] ++(-.85mm,1.5mm) coordinate (@a) -- ++(-3.15mm,.5mm) coordinate (@b) -- ++(-4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend left=10] ++(.75mm,2.55mm); |
| 1628 |
\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} ([yshift=-.425mm,xshift=.135mm]@a) to[bend right=3] ++(-1mm,3.9mm) ([xshift=.4mm,yshift=-.05mm]@b) to[bend right=2] ++(-3.75mm,.1mm) (@c) to[bend right=12] ++(1mm,3.5mm); |
| 1629 |
\endpgfonlayer |
| 1630 |
} |
| 1631 |
|
| 1632 |
\pingu@create@wing@extra{present}{% |
| 1633 |
present \@lr/.code = {\pingu@set@extra{present\@lr}{true}\pingu@color{present\@lr}{##1}}, |
| 1634 |
present \@lr/.default = pingu@red!50!pingu@black!60!red, |
| 1635 |
present \@lr\space width/.code = \@namedef{pingu@present@\@lr @width}{##1}, |
| 1636 |
present \@lr\space height/.code = \@namedef{pingu@present@\@lr @height}{##1}, |
| 1637 |
present \@lr\space ribbon/.code = \pingu@color{present\@lr @ribbon}{##1},% |
| 1638 |
present \@lr\space band/.code = \pingu@color{present\@lr @band}{##1},% |
| 1639 |
present \@lr\space band width/.code = \@namedef{pingu@present@\@lr @band@width}{##1}, |
| 1640 |
present \@lr\space xshift/.code = \@namedef{pingu@present@\@lr @xshift}{##1}, |
| 1641 |
present \@lr\space yshift/.code = \@namedef{pingu@present@\@lr @yshift}{##1}, |
| 1642 |
present \@lr\space band second height/.code = \@namedef{pingu@present@\@lr @band@second@height}{##1}, |
| 1643 |
present \@lr\space band second yshift/.code = \@namedef{pingu@present@\@lr @band@second@yshift}{##1}, |
| 1644 |
present \@lr\space lid/.code = \pingu@color{present\@lr @lid}{##1},% |
| 1645 |
present \@lr\space lid height/.code = \@namedef{pingu@present@\@lr @lid@height}{##1}, |
| 1646 |
present \@lr\space lid overhang/.code = \@namedef{pingu@present@\@lr @lid@overhang}{##1}, |
| 1647 |
present \@lr\space lid yshift/.code = \@namedef{pingu@present@\@lr @lid@yshift}{##1}, |
| 1648 |
present \@lr\space lid band/.code = \pingu@color{present\@lr @lid@band}{##1},% |
| 1649 |
}{present \@lr\space band=pingu@green!70!pingu@black!90!pingu@white,present \@lr\space width=7.75mm,present \@lr\space band width=1.75mm,present \@lr\space height=7mm,present \@lr\space yshift=-.25*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space band second height=\csname pingu@present@\@lr @band@width\endcsname, present \@lr\space band second yshift=.5*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space xshift=-.25*(\csname pingu@present@\@lr @width\endcsname),present \@lr\space lid=\csname pingu@color@present\@lr\endcsname!92!pingu@black,present \@lr\space lid height=1.33mm,present \@lr\space lid overhang=.125mm,present \@lr\space lid yshift=0,present \@lr\space lid band=\csname pingu@color@present\@lr @band\endcsname!98!pingu@black,present \@lr\space ribbon=\csname pingu@color@present\@lr @band\endcsname!97!pingu@black} |
| 1650 |
|
| 1651 |
% TODO: more ribbon color control |
| 1652 |
% #1 wing |
| 1653 |
\def\pingu@draw@wi@present#1{% |
| 1654 |
\pingu@setup@wing{present}{#1}% |
| 1655 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 1656 |
\pingu@block[rounded corners=2pt]{\@col}(\pingu@name-wing-#1)++(-{0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@#1@xshift\endcsname},{\csname pingu@present@#1@yshift\endcsname}) coordinate (@ll) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@height\endcsname}) coordinate (@ur); |
| 1657 |
% vert band |
| 1658 |
\pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@height\endcsname}); |
| 1659 |
% horiz band |
| 1660 |
\pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++(0,{\csname pingu@present@#1@band@second@yshift\endcsname-0.5*(\csname pingu@present@#1@band@second@height\endcsname)}) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@band@second@height\endcsname}); |
| 1661 |
% lid |
| 1662 |
\pingu@block[rounded corners=.75pt]{\csname pingu@color@present#1@lid\endcsname} ([yshift={\csname pingu@present@\@lr @lid@yshift\endcsname},xshift=\csname pingu@present@\@lr @lid@overhang\endcsname]@ur) rectangle ++({-\csname pingu@present@#1@width\endcsname-2*(\csname pingu@present@\@lr @lid@overhang\endcsname)},-\csname pingu@present@#1@lid@height\endcsname) coordinate (@ll); |
| 1663 |
% upper lid band |
| 1664 |
\pingu@block{\csname pingu@color@present#1@lid@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@lid@height\endcsname}); |
| 1665 |
% ribbon |
| 1666 |
\path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname+0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top); |
| 1667 |
\pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=40,in=110] ++(4mm,1mm) |
| 1668 |
to[out=-70,in=-20] ++(-4mm,-1.5mm) to[bend left=55] cycle ([xshift=.5mm]@top) to[out=40,in=110] ++(2.55mm,.5mm) |
| 1669 |
to[out=-70,in=-20] [rounded corners=1pt] ++(-2.85mm,-.835mm) -- cycle; |
| 1670 |
\path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname-0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top); |
| 1671 |
\pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=180-40,in=180-110] ++(-3.6mm,1mm) |
| 1672 |
to[out=-110,in=-160] ++(3.6mm,-1.5mm) to[bend right=55] cycle ([xshift=-.5mm]@top) to[out=140,in=70] ++(-2.55mm,.5mm) |
| 1673 |
to[out=-110,in=-160] [rounded corners=1pt] ++(2.55mm,-.75mm) -- cycle; |
| 1674 |
\pingu@block[rounded corners=.5pt]{\csname pingu@color@present#1@ribbon\endcsname} (@top)++(-.3mm,-.65mm) rectangle ++(1.3mm,.65mm); % TODO: make that round? (i.e., bend edges) |
| 1675 |
\endscope |
| 1676 |
} |
| 1677 |
|
| 1678 |
\pingu@create@wing@extra{snowball}{% |
| 1679 |
snowball \@lr/.code = {\pingu@set@extra{snowball\@lr}{true}\pingu@color{snowball\@lr}{##1}}, |
| 1680 |
snowball \@lr/.default = pingu@white!90!pingu@black, |
| 1681 |
snowball \@lr\space size/.code = \expandafter\def\csname pingu@snowball@\@lr @size\endcsname{##1}, |
| 1682 |
snowball \@lr\space xshift/.code = \expandafter\def\csname pingu@snowball@\@lr @xshift\endcsname{##1}, |
| 1683 |
snowball \@lr\space yshift/.code = \expandafter\def\csname pingu@snowball@\@lr @yshift\endcsname{##1} |
| 1684 |
}{snowball \@lr\space size=2.33mm, snowball \@lr\space xshift=0pt, snowball \@lr\space yshift=0pt} |
| 1685 |
|
| 1686 |
% #1 wing |
| 1687 |
% TODO: shifts |
| 1688 |
\def\pingu@draw@wi@snowball#1{% |
| 1689 |
\pingu@setup@wing{snowball}{#1}% |
| 1690 |
\pingu@draw[opacity=.35]{\@col} ([xshift=\csname pingu@snowball@#1@xshift\endcsname,yshift=\csname pingu@snowball@#1@yshift\endcsname]\pingu@name-wing-#1) coordinate (@) circle[radius=\csname pingu@snowball@#1@size\endcsname]; |
| 1691 |
\pingu@block[rotate around={\@angle-1:(\pingu@name-wing-#1)},decoration={random steps,segment length=1pt,amplitude=.075pt},decorate,rounded corners=.35pt,save path=\snowball@outer]{\@col}(@) circle[radius=\csname pingu@snowball@#1@size\endcsname]; |
| 1692 |
} |
| 1693 |
% #endregion |
| 1694 |
|
| 1695 |
|
| 1696 |
\pingu@create@wing@extra{basket}{% |
| 1697 |
basket \@lr/.code = {\pingu@set@extra{basket\@lr}{true}\pingu@color{basket\@lr}{##1}}, |
| 1698 |
basket \@lr/.default = brown!95!pingu@main!90!yellow!90!white, |
| 1699 |
basket \@lr\space egg a/.code = \pingu@color{basket\@lr @egg@a}{##1}, |
| 1700 |
basket \@lr\space egg b/.code = \pingu@color{basket\@lr @egg@b}{##1}, |
| 1701 |
basket \@lr\space egg c/.code = \pingu@color{basket\@lr @egg@c}{##1}, |
| 1702 |
basket \@lr\space back/.code = \pingu@color{basket\@lr @back}{##1}, |
| 1703 |
basket \@lr\space xshift/.code = \expandafter\def\csname pingu@basket@\@lr @xshift\endcsname{##1}, |
| 1704 |
basket \@lr\space yshift/.code = \expandafter\def\csname pingu@basket@\@lr @yshift\endcsname{##1} |
| 1705 |
}{basket \@lr\space xshift=0pt, basket \@lr\space yshift=0pt,basket \@lr\space egg a=pingu@basket@eggA,basket \@lr\space egg b=pingu@basket@eggB,basket \@lr\space egg c=pingu@basket@eggC!90!black,basket \@lr\space back=\csname pingu@color@basket\@lr\endcsname!90!pingu@black} |
| 1706 |
\definecolor{pingu@basket@eggA}{HTML}{FDBD5F} |
| 1707 |
\definecolor{pingu@basket@eggB}{HTML}{5FDCED} |
| 1708 |
\definecolor{pingu@basket@eggC}{HTML}{B5D333} |
| 1709 |
% #1 wing |
| 1710 |
% TODO: shifts |
| 1711 |
\def\pingu@basket@eggheight{1.5mm} |
| 1712 |
\def\pingu@draw@wi@basket#1{% |
| 1713 |
\pingu@setup@wing{basket}{#1}% |
| 1714 |
\scope[rotate around={\@angle-1:(\pingu@name-wing-#1)}] |
| 1715 |
\path ([xshift=-4mm,yshift=-3.25mm,xshift=\csname pingu@basket@#1@xshift\endcsname,yshift=\csname pingu@basket@#1@yshift\endcsname]\pingu@name-wing-#1) coordinate (@l) -- ++(8mm,0) coordinate (@r); |
| 1716 |
% back |
| 1717 |
\pingu@block{\csname pingu@color@basket#1@back\endcsname} ([xshift=-.4mm]@l) to[bend left=6] coordinate[pos=.22] (@eggA) coordinate[pos=.5] (@eggB) coordinate[pos=.75] (@eggC) ([xshift=.4mm]@r) arc(0:-180:4.4mm and 3.25mm) -- cycle; |
| 1718 |
\pingu@draw[line width=.8mm]{\@col} (@l) to[bend left=83,looseness=1.65] (@r); |
| 1719 |
% egg a - based on https://tex.stackexchange.com/a/79398 |
| 1720 |
\scope[shift=(@eggA),rotate around={30:(@eggA)}] |
| 1721 |
\pingu@block{\csname pingu@color@basket#1@egg@a\endcsname} plot[domain=-pi:pi,samples=100] |
| 1722 |
({.78*\pingu@basket@eggheight*cos(\x/4 r)*sin(\x r)},{-\pingu@basket@eggheight*(cos(\x r))}); |
| 1723 |
\endscope |
| 1724 |
\scope[shift=(@eggB),rotate around={10:(@eggB)},yshift=-.1mm] |
| 1725 |
\pingu@block{\csname pingu@color@basket#1@egg@b\endcsname} plot[domain=-pi:pi,samples=100] |
| 1726 |
({.78*1.1*\pingu@basket@eggheight*cos(\x/4 r)*sin(\x r)},{-1.1*\pingu@basket@eggheight*(cos(\x r))}); |
| 1727 |
\endscope |
| 1728 |
\scope[shift=(@eggC),rotate around={-20:(@eggC)},yshift=.3mm] |
| 1729 |
\pingu@block{\csname pingu@color@basket#1@egg@c\endcsname} plot[domain=-pi:pi,samples=100] |
| 1730 |
({.78*\pingu@basket@eggheight*cos(\x/4 r)*sin(\x r)},{-\pingu@basket@eggheight*(cos(\x r))}); |
| 1731 |
\endscope |
| 1732 |
% front |
| 1733 |
\pingu@block{\@col} ([xshift=-.4mm]@l) to[bend right=2]([xshift=.4mm]@r) arc(0:-180:4.4mm and 3.25mm) -- cycle; |
| 1734 |
\endscope |
| 1735 |
} |
| 1736 |
|
| 1737 |
% #region cloak-lib |
| 1738 |
\newif\if@pingu@x@cloak@wings |
| 1739 |
\pingu@create@extra{cloak}{% |
| 1740 |
cloak/.code = \pingu@set@extra{cloak}{true}\pingu@color{cloak}{#1}, |
| 1741 |
cloak/.default = pingu@bronze, |
| 1742 |
cloak cap/.code = \pingu@color{cloak@cap}{#1}, |
| 1743 |
cloak wings color/.code = \pingu@color{cloak@wings}{#1}, |
| 1744 |
cloak bottom color/.code = \pingu@color{cloak@bottom}{#1}, |
| 1745 |
cloak front color/.code = \pingu@color{cloak@front}{#1}, |
| 1746 |
cloak padding/.code = \def\pingu@x@cloak@padding{#1}, |
| 1747 |
cloak wings/.is if = @pingu@x@cloak@wings, |
| 1748 |
cape/.style = {/pingu/cloak=#1, /pingu/cloak wings=false,/pingu/cloak front color=\@pingu@none, /pingu/cloak cap=\@pingu@none,/pingu/cloak front color=\@pingu@none}, |
| 1749 |
cape/.default = pingu@bronze, |
| 1750 |
}{cloak padding=1.95mm,cloak bottom color=\pingu@color@cloak!90!black,cloak cap=\pingu@color@cloak!98!pingu@black,cloak front color=\pingu@color@cloak!90!white,cloak wings color=\pingu@color@cloak@front!94!pingu@black,cloak wings=true} |
| 1751 |
\def\pingu@draw@cloth@cloak@behind{% |
| 1752 |
\pingu@block[bottom color=\pingu@color@cloak@bottom,top color=\pingu@color@cloak]{\pingu@color@cloak} (\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:0:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=1] (\pingu@name-wings-side-left) arc(0:180:\pingu@w@half{} and .75mm) to[bend left=1] cycle; |
| 1753 |
} |
| 1754 |
|
| 1755 |
\def\pingu@draw@cloth@cloak@middle{\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front} |
| 1756 |
(\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:250:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend right=6] |
| 1757 |
([xshift=1.3mm,yshift=.4mm]\pingu@name-wings-side-right) to[bend right=3] ([yshift=.65mm]\pingu@name-wings-side-right); |
| 1758 |
\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front} |
| 1759 |
(\pingu@name-bottom-center)++(\pingu@x@cloak@padding+\pingu@w@half,-.5mm) arc (0:-70:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=6] |
| 1760 |
([xshift=-1.3mm,yshift=.4mm]\pingu@name-wings-side-left) to[bend left=3] ([yshift=.65mm]\pingu@name-wings-side-left);} |
| 1761 |
|
| 1762 |
% TODO: if flags to draw parts |
| 1763 |
\def\pingu@draw@cloth@cloak{% |
| 1764 |
\scope[rounded corners=.6\p@] |
| 1765 |
% wings |
| 1766 |
\if@pingu@x@cloak@wings |
| 1767 |
\edef\@la{\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname} |
| 1768 |
\ifnum\@la>0 % wing is going inverted up or down / \ => left |
| 1769 |
\pingu@layer{foreground}[] |
| 1770 |
\ifnum\@la>70 |
| 1771 |
\pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] (\pingu@name-wing-left-start-up) to[bend left] ([xshift=.35mm,yshift=1mm]\pingu@name-wing-left-start); |
| 1772 |
\else % down |
| 1773 |
\pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] ([xshift=1mm,yshift=1mm]\pingu@name-wing-left-start-up) to[bend left=4.5] ([xshift=.5mm,yshift=-3.5mm]\pingu@name-wing-left-start); |
| 1774 |
\fi |
| 1775 |
\endpingu@layer |
| 1776 |
\else |
| 1777 |
\ifnum\@la<-90% normal up \ / => left side |
| 1778 |
\pingu@block[upper right=\pingu@color@cloak@wings,lower right=\pingu@color@cloak@front,lower left=\pingu@color@cloak@front,upper left=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-left-start-low) to[bend right=14] (\pingu@name-wing-left-low) to[bend left=8] ([yshift=-.5mm]\pingu@name-wing-left-up) to[bend right=17] ([yshift=1.6mm]\pingu@name-wing-left-start-up) to[bend right=13] ([xshift=-.15mm,yshift=.15mm]\pingu@name-waist-left) -- cycle; |
| 1779 |
\else % normal and hugging down => right |
| 1780 |
\pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=-1.38mm]\pingu@name-wings-side-left) (\pingu@name-wing-left-start-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-up) ([xshift=.68mm]\pingu@name-wings-side-left) ([xshift=-1.38mm]\pingu@name-wings-side-left)}; |
| 1781 |
\fi |
| 1782 |
\fi |
| 1783 |
\edef\@ra{\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname} |
| 1784 |
\ifnum\@ra>0 % wing is going inverted up or down => right |
| 1785 |
\pingu@layer{foreground}[] |
| 1786 |
\ifnum\@ra>70 |
| 1787 |
\pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] (\pingu@name-wing-right-start-up) -- ++(-.25mm,0mm) to[bend right=11] cycle; |
| 1788 |
\else |
| 1789 |
\pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} ([xshift=1mm,yshift=-1mm]\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] ([xshift=-1mm,yshift=1mm]\pingu@name-wing-right-start-up) to[bend right=4.5] ([xshift=-.5mm,yshift=-3.5mm]\pingu@name-wing-right-start); |
| 1790 |
\fi |
| 1791 |
\endpingu@layer |
| 1792 |
\else |
| 1793 |
\ifnum\@ra<-90% normal up => right side |
| 1794 |
\pingu@block[upper left=\pingu@color@cloak@wings,lower left=\pingu@color@cloak@front,lower right=\pingu@color@cloak@front,upper right=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-right-start-low) to[bend left=14] (\pingu@name-wing-right-low) to[bend right=8] ([yshift=-.5mm]\pingu@name-wing-right-up) to[bend left=17] ([yshift=1.6mm]\pingu@name-wing-right-start-up) to[bend left=13] ([xshift=.15mm,yshift=.15mm]\pingu@name-waist-right) -- cycle; |
| 1795 |
\else % normal and hugging down => left |
| 1796 |
\pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=1.38mm]\pingu@name-wings-side-right) (\pingu@name-wing-right-start-low) ([yshift=.85mm,xshift=-.35mm]\pingu@name-wing-right-low) ([yshift=.85mm,xshift=.35mm]\pingu@name-wing-right-up) ([xshift=-.68mm]\pingu@name-wings-side-right) ([xshift=1.38mm]\pingu@name-wings-side-right)}; |
| 1797 |
\fi |
| 1798 |
\fi |
| 1799 |
\fi |
| 1800 |
% cape |
| 1801 |
\pingu@block[rounded corners=.8mm]{\pingu@color@cloak@cap} ([xshift=.85mm,yshift=-2.75mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-.45mm,yshift=-.65mm]\pingu@name-wings-side-left) to[bend right=3] |
| 1802 |
(\pingu@name-head) |
| 1803 |
to[bend right=3] |
| 1804 |
([xshift=.4mm,yshift=-.65mm]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=3] ([xshift=-.85mm,yshift=-2.75mm]\pingu@name-wing-right-start) |
| 1805 |
to[bend left=8] |
| 1806 |
([xshift=-.66mm]\pingu@name-wings-side-right) |
| 1807 |
[rounded corners=.15mm] |
| 1808 |
to[bend left=32] ++(\pingu@w@half+.66mm,\pingu@w@half+1.2\pingu@one) |
| 1809 |
to[bend left=32] ++(\pingu@w@half+.66mm,-\pingu@[email protected]\pingu@one) |
| 1810 |
to[bend left=8] cycle; |
| 1811 |
\endscope |
| 1812 |
} |
| 1813 |
% #endregion |
| 1814 |
|
| 1815 |
\pingu@create@extra{bunnyears}{% |
| 1816 |
bunnyears/.forward to = /pingu/bunny ears, |
| 1817 |
bunny-ears/.forward to = /pingu/bunny ears, |
| 1818 |
bunny ears/.code = \pingu@set@extra{bunnyears}{true}\pingu@color{bunnyears}{#1}, |
| 1819 |
bunny ears/.default = brown!95!pingu@main, |
| 1820 |
bunnyears band/.forward to = /pingu/bunny ears band, |
| 1821 |
bunny-ears band/.forward to = /pingu/bunny ears band, |
| 1822 |
bunny ears band/.code = \pingu@color{bunnyears@band}{#1}, |
| 1823 |
bunny ears b/.code = \pingu@color{bunnyears@b}{#1}, |
| 1824 |
bunnyears b/.forward to = /pingu/bunny ears b, |
| 1825 |
bunny-ears b/.forward to = /pingu/bunny ears b |
| 1826 |
}{bunny ears b=\pingu@color@bunnyears!90!yellow!90!white,bunny ears band=\pingu@color@bunnyears} |
| 1827 |
|
| 1828 |
\pgfmathsetmacro\pingu@bunnyears@baseang@l{90-360*(1-\pinguanglehl)} |
| 1829 |
\pgfmathsetmacro\pingu@bunnyears@baseang@r{90-360*(1-\pinguanglehr)} |
| 1830 |
\def\pingu@bunnyears@baseoff{12} |
| 1831 |
\def\pingu@bunnyears@yshift{.65mm} |
| 1832 |
\def\pingu@draw@ea@bunnyears{% |
| 1833 |
% 90 - 360*.06 |
| 1834 |
\path ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-left) arc (\pingu@bunnyears@baseang@l:\pingu@bunnyears@baseang@l-\pingu@bunnyears@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate[yshift=.05mm] (@target); |
| 1835 |
\pingu@draw[line width=.7mm]{\pingu@color@bunnyears@band} ([xshift=.733mm,yshift=-.65mm]@target) arc (\pingu@bunnyears@baseang@l-\pingu@bunnyears@baseoff-11:360+\pingu@bunnyears@baseang@r+\pingu@bunnyears@baseoff+10:\pingu@w@half{}-.8mm and \pingu@head@h@half); |
| 1836 |
\pingu@block{\pingu@color@bunnyears} ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-left) arc (\pingu@bunnyears@baseang@l:\pingu@bunnyears@baseang@l-\pingu@bunnyears@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-bunnyears-left-goal) to[out=62,in=-62,looseness=1.1] ++(2.5mm,9.55mm) to[bend right=17] ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-left) -- cycle; |
| 1837 |
|
| 1838 |
\pingu@block[sharp corners]{\pingu@color@bunnyears@b} ([yshift=-\pingu@bunnyears@yshift+.325mm,xshift=.6mm]\pingu@name-head-left) arc (\pingu@bunnyears@baseang@l:\pingu@bunnyears@[email protected]*\pingu@bunnyears@baseoff:\pingu@w@half{} and 1.5*\pingu@head@h@half) to[out=62,in=-62,looseness=1.1] ++(2.5mm,8mm) to[bend right=17] ([yshift=-\pingu@bunnyears@yshift+.325mm,xshift=.6mm]\pingu@name-head-left) to[bend left] cycle; |
| 1839 |
|
| 1840 |
\pingu@block{\pingu@color@bunnyears} ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) arc (\pingu@bunnyears@baseang@r:\pingu@bunnyears@baseang@r+\pingu@bunnyears@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-bunnyears-right-goal) to[out=180-62,in=-180+62,looseness=1.1] ++(-2.4mm,9.75mm) to[bend left=17] ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) -- cycle; |
| 1841 |
\pingu@block[sharp corners]{\pingu@color@bunnyears@b} ([yshift=-\pingu@bunnyears@yshift+.325mm,xshift=-.6mm]\pingu@name-head-right) arc (\pingu@bunnyears@baseang@r:\pingu@bunnyears@baseang@r+.5*\pingu@bunnyears@baseoff:\pingu@w@half{} and 1.5*\pingu@head@h@half) to[out=180-62,in=-180+62,looseness=1.1] ++(-2.4mm,8.2mm) to[bend left=17] ([yshift=-\pingu@bunnyears@yshift+.325mm,xshift=-.6mm]\pingu@name-head-right) to[bend left] cycle; |
| 1842 |
|
| 1843 |
% \pingu@block{\pingu@color@bunnyears@b} ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) arc (\pingu@bunnyears@baseang@r:\pingu@bunnyears@baseang@r+\pingu@bunnyears@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-bunnyears-right-goal) to[out=148,in=-148,looseness=.9] ++(-.3mm,2.65mm) to[bend right=17] ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) -- cycle; |
| 1844 |
% \pingu@block{\pingu@color@bunnyears@b} ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) to [bend left=38] (\pingu@name-bunnyears-right-goal) to[bend left=30] ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-right) -- cycle; |
| 1845 |
} |
| 1846 |
|
| 1847 |
% #region devil-lib |
| 1848 |
\pingu@create@extra{devilhorns}{% |
| 1849 |
devilhorns/.forward to = /pingu/devil horns, |
| 1850 |
devil-horns/.forward to = /pingu/devil horns, |
| 1851 |
devil horns/.code = \pingu@set@extra{devilhorns}{true}\pingu@color{devilhorns}{#1}, |
| 1852 |
devil horns/.default = pingu@purple, |
| 1853 |
devil horns b/.code = \pingu@color{devilhorns@b}{#1}, |
| 1854 |
devilhorns b/.forward to = /pingu/devil horns b, |
| 1855 |
devil-horns b/.forward to = /pingu/devil horns b |
| 1856 |
}{devil horns b=\pingu@color@devilhorns} |
| 1857 |
|
| 1858 |
\pgfmathsetmacro\pingu@devilhorns@baseang@l{90-360*(1-\pinguanglehl)} |
| 1859 |
\pgfmathsetmacro\pingu@devilhorns@baseang@r{90-360*(1-\pinguanglehr)} |
| 1860 |
\def\pingu@devilhorns@baseoff{12} |
| 1861 |
\def\pingu@devilhorns@yshift{.65mm} |
| 1862 |
\def\pingu@draw@ea@devilhorns{% |
| 1863 |
% longform: \pingu@block{\pingu@color@bunnyears} ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-left) arc (\pingu@bunnyears@baseang@l:\pingu@bunnyears@baseang@l-\pingu@bunnyears@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-bunnyears-left-goal) to[out=62,in=-62,looseness=.9] ++(1.5mm,9.65mm) to[bend left=17] ([yshift=-\pingu@bunnyears@yshift]\pingu@name-head-left) -- cycle; |
| 1864 |
% 90 - 360*.06 |
| 1865 |
\pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) arc (\pingu@devilhorns@baseang@l:\pingu@devilhorns@baseang@l-\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-left-goal) to[out=32,in=-32,looseness=.9] ++(.3mm,2.65mm) to[bend left=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle; |
| 1866 |
\pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) to [bend right=38] (\pingu@name-devilhorns-left-goal) to[bend right=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle; |
| 1867 |
\pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) arc (\pingu@devilhorns@baseang@r:\pingu@devilhorns@baseang@r+\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-right-goal) to[out=148,in=-148,looseness=.9] ++(-.3mm,2.65mm) to[bend right=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle; |
| 1868 |
\pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) to [bend left=38] (\pingu@name-devilhorns-right-goal) to[bend left=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle; |
| 1869 |
} |
| 1870 |
|
| 1871 |
% wip hack |
| 1872 |
\colorlet{pingu@devil@ring}{pingu@black} |
| 1873 |
\def\pingu@devil@x@opacity{.75} |
| 1874 |
\pingu@eyes@s{devil}{% |
| 1875 |
\pingu@layer{foreground}[] |
| 1876 |
\pingu@block{pingu@devil@ring} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1535cm, y radius=.1575cm]; |
| 1877 |
\pingu@block{\pingu@color@eye@second@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1325cm, y radius=.1375cm]; |
| 1878 |
\fill[\pingu@color@eye@left,/pingu/@glow] (\pingu@name-eye-left) circle [radius=1.325mm]; |
| 1879 |
\pingu@block[fill opacity=\pingu@devil@x@opacity]{\pingu@color@eye@left} (\pingu@name-eye-left)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle; |
| 1880 |
\fill[/pingu/@glow,fill=\pingu@color@eye@left!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-left)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle; |
| 1881 |
\fill[\pingu@color@eye@left!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-left) circle [radius=.5pt]; % |
| 1882 |
\pingu@block{pingu@white} (\pingu@name-eye-left) circle [radius=.15pt]; |
| 1883 |
\endpingu@layer |
| 1884 |
}{% |
| 1885 |
\pingu@layer{foreground}[] |
| 1886 |
\pingu@block{pingu@black} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1535cm, y radius=.1575cm]; |
| 1887 |
\pingu@block{\pingu@color@eye@second@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1325cm, y radius=.1375cm]; |
| 1888 |
\fill[\pingu@color@eye@right,/pingu/@glow] (\pingu@name-eye-right) circle [radius=1.325mm]; |
| 1889 |
\pingu@block[fill opacity=.75]{\pingu@color@eye@right} (\pingu@name-eye-right)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle; |
| 1890 |
\fill[/pingu/@glow,fill=\pingu@color@eye@right!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-right)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle; |
| 1891 |
\fill[\pingu@color@eye@right!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-right) circle [radius=.5pt]; % |
| 1892 |
\pingu@block{pingu@white} (\pingu@name-eye-right) circle [radius=.15pt]; |
| 1893 |
\endpingu@layer |
| 1894 |
}[pingu@purple] |
| 1895 |
|
| 1896 |
\pingu@create@wing@extra{devilfork}{% |
| 1897 |
devil fork \@lr/.code = {\pingu@set@extra{devilfork\@lr}{true}\pingu@color{devilfork\@lr}{##1}}, |
| 1898 |
devil fork \@lr/.default = pingu@red, |
| 1899 |
devil fork \@lr\space second/.code= \pingu@color{devilfork\@lr @second}{##1}, |
| 1900 |
devil fork \@lr\space length/.code =\expandafter\def\csname pingu@devilfork@\@lr @length\endcsname{##1} |
| 1901 |
}{devil fork \@lr\space length=20mm,devil fork \@lr\space second=pingu@bronze!10!black} |
| 1902 |
\def\pingu@draw@wi@devilfork#1{% |
| 1903 |
\pingu@setup@wing{devilfork}{#1}% |
| 1904 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 1905 |
\pingu@block{\csname pingu@color@devilfork#1@second\endcsname} (\pingu@name-wing-#1)++(\@sidesign*-.2mm,-7mm) -- ++(0,\csname pingu@devilfork@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-devilfork-#1-top) -- ++(0,-\csname pingu@devilfork@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 1906 |
\pingu@block{\@col} ([yshift=4mm]\pingu@name-devilfork-#1-top) to[out=240,in=90] ++(-.65mm,-4mm) to[out=180,in=-60] ++(-1mm,5.5mm) to[out=240,in=90] ++(-.65mm,-5.9mm) to[bend right] ++(4.4mm,0) to[out=90,in=-60] ++(-.65mm,5.9mm) to[out=240,in=0] ++(-1mm,-5.5mm) to[out=90,in=-60] cycle; |
| 1907 |
\endscope |
| 1908 |
} |
| 1909 |
|
| 1910 |
\pingu@create@extra{devilwings}{% |
| 1911 |
devilwings/.forward to = /pingu/devil wings, |
| 1912 |
devil-wings/.forward to = /pingu/devil wings, |
| 1913 |
devil wings/.code = \pingu@set@extra{devilwings}{true}\pingu@color{devilwings}{#1}, |
| 1914 |
devil wings/.default = pingu@black, |
| 1915 |
devil wings b/.code = \pingu@color{devilwings@b}{#1}, |
| 1916 |
devilwings b/.forward to = /pingu/devil wings b, |
| 1917 |
devil-wings b/.forward to = /pingu/devil wings b |
| 1918 |
}{devil wings b=\pingu@color@devilwings} |
| 1919 |
|
| 1920 |
% taken over and adapted from the old penguins |
| 1921 |
% lower wing based on https://tex.stackexchange.com/a/464828 |
| 1922 |
\def\@pingu@devilwings@lower@wing@code{(0,0.2) -- (0,1.4) -- (-2,1.4) .. controls (-4,0.8) .. (-4.3,0.2) .. controls (-4.48,0.08) .. (-4.5,-0.15) .. controls (-4.9,-0.5) and (-4.9,-0.7) .. (-4.7,-0.9) .. controls (-4.7,-1) .. (-4.6,-1.1) .. controls (-4.9,-1.8) .. (-4.2,-2) -- (-4,-2.4) .. controls (-4.1,-3) .. (-3.6,-3.1) -- (-3.25,-3.7) .. controls (-3.5,-4.5) .. (-4.1,-5.4) .. controls (-4.2,-5.9) and (-3.6,-5.9) .. (-3.5,-5.4) .. controls (-3.55,-5.1) and (-3.4,-4.8) .. (-3,-4.1) -- (-2.6,-4.1) .. controls (-2.35,-4.35) .. (-2,-4.2) .. controls (-1.75,-4.6) and (-1.25,-4.6) .. (-1.25,-3.90) .. controls (-0.9,-4) .. (-0.6,-2.8) -- (-0.3,-1) -- (0,0.2)} |
| 1923 |
|
| 1924 |
\def\pingu@draw@eb@devilwings{% |
| 1925 |
\pgfonlayer{background} |
| 1926 |
\scope[scale=0.225,shift={(\pingu@name-head-back-con-right)}] |
| 1927 |
\pingu@block[thick,rounded corners=.75mm]{\pingu@color@devilwings} \@pingu@devilwings@lower@wing@code; |
| 1928 |
\pingu@block[thick]{\pingu@color@devilwings} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1); |
| 1929 |
\endscope |
| 1930 |
\scope[scale=0.225,shift={(\pingu@name-head-back-con-left)},xscale=-1] |
| 1931 |
\pingu@block[thick,rounded corners=0.75mm]{\pingu@color@devilwings@b} \@pingu@devilwings@lower@wing@code; |
| 1932 |
\pingu@block[thick]{\pingu@color@devilwings@b} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1); |
| 1933 |
\endscope |
| 1934 |
\endpgfonlayer |
| 1935 |
} |
| 1936 |
% #endregion |
| 1937 |
|
| 1938 |
% #region emotions-lib |
| 1939 |
\pingu@eyes@s{sad}{% |
| 1940 |
\path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); |
| 1941 |
\pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left)++(15:.1225cm and .1275cm) arc (15:-245:.1225cm and .1275cm) to[out=-45,in=175] cycle; |
| 1942 |
}{% |
| 1943 |
\path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); |
| 1944 |
\pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right)++(165:.1225cm and .1275cm) arc (165:425:.1225cm and .1275cm) to[out=225,in=5] cycle; |
| 1945 |
} |
| 1946 |
|
| 1947 |
\pingu@eyes@s{angry}{% |
| 1948 |
\path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); |
| 1949 |
\pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left) ellipse [x radius=.1225cm, y radius=.1275cm]; |
| 1950 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-left) ++(120:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm]; |
| 1951 |
}{% |
| 1952 |
\path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); |
| 1953 |
\pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right) ellipse [x radius=.1225cm, y radius=.1275cm]; |
| 1954 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-right) ++(60:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm]; |
| 1955 |
} |
| 1956 |
|
| 1957 |
\pingu@bill@s{angry}{% |
| 1958 |
\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) |
| 1959 |
to[out=-90,in=170] ++(1.9mm,-2.25mm) coordinate (\pingu@name-bill-bottom) |
| 1960 |
to[out=10,in=-90] ++(1.9mm,2.25mm) |
| 1961 |
to[bend right=.25cm] cycle; |
| 1962 |
} |
| 1963 |
|
| 1964 |
\pingu@create@extra{blush}{% |
| 1965 |
blush/.code = \pingu@set@extra{blush}{true}\pingu@color{blush}{#1}, |
| 1966 |
blush/.default = pingu@red, |
| 1967 |
blush second/.code = \pingu@color{blush@second}{#1}, |
| 1968 |
blush opacity/.code = \def\pingu@x@blush@opacity{#1}, |
| 1969 |
}{blush opacity=.35,blush second=\pingu@color@blush} |
| 1970 |
\def\pingu@draw@eb@blush{% |
| 1971 |
\pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush} ([yshift=-2.7mm,xshift=-1.85mm]\pingu@name-eye-right) ellipse [x radius=2.66mm,y radius=2.25mm]; |
| 1972 |
\pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush@second} ([yshift=-2.7mm,xshift=1.85mm]\pingu@name-eye-left) ellipse [x radius=2.66mm,y radius=2.25mm]; |
| 1973 |
} |
| 1974 |
|
| 1975 |
\pingu@eyes@s{hearts}{% |
| 1976 |
\path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); |
| 1977 |
\pingu@block[rounded corners=0pt]{\pingu@color@eye@left} ([yshift=.3mm]\pingu@name-eye-left) arc(0:180:.065cm) |
| 1978 |
to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle; |
| 1979 |
}{% |
| 1980 |
\path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); |
| 1981 |
\pingu@block{\pingu@color@eye@right} ([yshift=.3mm]\pingu@name-eye-right) arc(0:180:.065cm) |
| 1982 |
to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle; |
| 1983 |
} |
| 1984 |
|
| 1985 |
\pingu@eyes@s{critical}{% |
| 1986 |
\pingu@block{\pingu@color@eye@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=1.13mm, y radius=.145cm]; |
| 1987 |
\pingu@draw[thick]{\pingu@color@eye@left} (\pingu@name-eye-left)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm); |
| 1988 |
}{% |
| 1989 |
\pingu@block{\pingu@color@eye@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=1.13mm, y radius=.145cm]; |
| 1990 |
\pingu@draw[thick]{\pingu@color@eye@right} (\pingu@name-eye-right)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm); |
| 1991 |
} |
| 1992 |
% #endregion |
| 1993 |
|
| 1994 |
% #region flags-lib |
| 1995 |
\pingu@create@wing@extra{flag}{% |
| 1996 |
flag \@lr/.code = {\pingu@set@extra{flag\@lr}{true}\pingu@color{flag\@lr}{##1}}, |
| 1997 |
flag \@lr/.default = pingu@purple, |
| 1998 |
flag \@lr\space pole/.code = \pingu@color{flag\@lr @pole}{##1}, |
| 1999 |
flag \@lr\space code/.code = \expandafter\def\csname pingu@flag@\@lr @code\endcsname{##1}, |
| 2000 |
flag \@lr\space bobble/.code = {\pingu@color{flag\@lr @bobble}{##1}}, |
| 2001 |
pride flag \@lr/.style = {% |
| 2002 |
/pingu/flag \@lr\space code = {% |
| 2003 |
\noexpand\node[/pingu/@flag@first,/pingu/@flag={{rgb:yellow,1;red,5;magenta,2;black,1}}{1.9mm}] (a) at (0,0) {}; |
| 2004 |
\noexpand\node[below,/pingu/@flag={{rgb:yellow,5;red,5;green,1;white,1}}{1.9mm}] (b) at (a.south) {}; |
| 2005 |
\noexpand\node[below,/pingu/@flag={yellow}{1.9mm}] (c) at (b.south) {}; |
| 2006 |
\noexpand\node[below,/pingu/@flag={{rgb:blue,1;cyan,1;green,4;black,2}}{1.9mm}] (d) at (c.south) {}; |
| 2007 |
\noexpand\node[below,/pingu/@flag={{rgb:magenta,3;blue,5;cyan,4;black,3}}{1.9mm}] (e) at (d.south) {}; |
| 2008 |
\noexpand\node[below,/pingu/@flag={{rgb:red,2;magenta,2;blue,5}}{1.9mm}] (f) at (e.south) {}; |
| 2009 |
}, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}% |
| 2010 |
},% |
| 2011 |
@flag/.style 2 args={tape bend height=.5mm,shape=tape,minimum height=##2, minimum width=15mm,outer sep=\z@,inner sep=\z@,fill=##1,draw=##1,rotate=\noexpand\@angle}, |
| 2012 |
pride flag \@lr/.default = pingu@bronze,% |
| 2013 |
german flag \@lr/.style = {% |
| 2014 |
/pingu/flag \@lr\space code = {% |
| 2015 |
\noexpand\node[/pingu/@flag@first,/pingu/@flag={black}{3.33mm}] (a) at (0,0) {}; |
| 2016 |
\noexpand\node[below,/pingu/@flag={red}{3.33mm}] (b) at (a.south) {}; |
| 2017 |
\noexpand\node[below,/pingu/@flag={yellow}{3.33mm}] (c) at (b.south) {}; |
| 2018 |
}, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}% |
| 2019 |
},% |
| 2020 |
german flag \@lr/.default = pingu@bronze% |
| 2021 |
}{flag \@lr\space bobble=pingu@bronze, flag \@lr\space pole=pingu@bronze, flag \@lr\space code = {% |
| 2022 |
\noexpand\node[/pingu/@flag@first,/pingu/@flag={\noexpand\@col}{9.75mm}] (a) at (0,0) {}; |
| 2023 |
}} |
| 2024 |
\def\pingu@draw@wi@flag#1{% |
| 2025 |
\pingu@setup@wing{flag}{#1}% |
| 2026 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2027 |
% NOTE: not full foreground if placed under the wing |
| 2028 |
\pingu@layer{foreground}[shift={(\pingu@name-wing-#1)},shift={(\@sidesign*.15mm,17.5mm-3.5\p@)}] |
| 2029 |
\if@pingu@wing@item@side@left@\pgfqkeys{/pingu}{@flag@first/.style={below right}}\else\pgfqkeys{/pingu}{@flag@first/.style={below left}}\fi |
| 2030 |
\csname pingu@flag@#1@code\endcsname |
| 2031 |
\pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,3mm) -- ++(0,13.65mm) -| ++(\@sidesign*.6mm,-13.65mm) -- cycle; |
| 2032 |
\endpingu@layer |
| 2033 |
\pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,-3mm) -- ++(0,20mm) arc(180:0:\@sidesign*.3mm and .375mm) -- ++(0,-20mm) arc(360:180:\@sidesign*.3mm and .375mm) -- cycle; |
| 2034 |
\pingu@block{\csname pingu@color@flag#1@bobble\endcsname} (\pingu@name-wing-#1)++(\@sidesign*.15mm,17.5mm) circle [radius=2.15\p@]; |
| 2035 |
\endscope |
| 2036 |
} |
| 2037 |
% #endregion |
| 2038 |
|
| 2039 |
% #region formal-lib |
| 2040 |
\pingu@create@extra{tie}{% |
| 2041 |
tie/.code = \pingu@set@extra{tie}{true}\pingu@color{tie}{#1}, |
| 2042 |
tie/.default = pingu@green, |
| 2043 |
tie knot/.code = \pingu@color{tie@knot}{#1}, |
| 2044 |
tie length/.code = \def\pingu@x@tie@length{#1}, |
| 2045 |
tie offset/.code = \def\pingu@x@tie@offset{#1}, |
| 2046 |
tie width/.code = \def\pingu@x@tie@width{#1}, |
| 2047 |
tie pattern/.code = \def\pingu@x@tie@pattern{#1}, |
| 2048 |
tie dots/.style = {% |
| 2049 |
tie pattern={% |
| 2050 |
\pingu@block[postaction={pattern={Dots[angle=40,distance=1.5pt,radius=.35pt]},pattern color=#1}]{\pingu@color@tie} \pingupathxtie; |
| 2051 |
\pingu@block[postaction={pattern={Dots[angle=-30,distance=1.45pt,radius=.35pt@]},pattern color=#1}]{\pingu@color@tie@knot} \pingupathxtieknot; |
| 2052 |
}% |
| 2053 |
}, |
| 2054 |
tie dots/.default={pingu@white}% |
| 2055 |
}{% defaults |
| 2056 |
tie length=.625\pingu@side@h@half, tie offset=.399cm,% |
| 2057 |
tie knot=\pingu@color@tie!92!black, tie width=.21cm,% |
| 2058 |
tie pattern={% |
| 2059 |
\pingu@block{\pingu@color@tie} \pingupathxtie; |
| 2060 |
\pingu@block{\pingu@color@tie@knot} \pingupathxtieknot; |
| 2061 |
}% |
| 2062 |
} |
| 2063 |
\def\pingupathxtie{[rounded corners=.15mm] (\pingu@name-tie-start)++(-.4mm,-.25mm) -- ++(-\pingu@x@tie@width/2, -\pingu@x@tie@length+.125cm) -- ++(\pingu@x@tie@width/2+.4mm,-.125cm) -- ++(\pingu@x@tie@width/2+.4mm,.125cm) -- +(-\pingu@x@tie@width/2, \pingu@x@[email protected]) -- cycle} |
| 2064 |
\def\pingupathxtieknot{[rounded corners=.25mm] (\pingu@name-tie-start)++(-.095cm-.02*\pingu@x@tie@width,\z@) -- ++(.3mm,-.15cm-.01*\pingu@x@tie@width) -- ++(.13cm+.04*\pingu@x@tie@width,\z@) -- ++(.3mm,.15cm+.01*\pingu@x@tie@width) -- cycle} |
| 2065 |
\def\pingu@draw@eb@tie{% |
| 2066 |
\path (\pingu@name-bill)++(0,-\pingu@x@tie@offset) coordinate(\pingu@name-tie-start); |
| 2067 |
\pingu@x@tie@pattern |
| 2068 |
} |
| 2069 |
|
| 2070 |
\pingu@create@extra{bowtie}{% |
| 2071 |
bowtie/.forward to = /pingu/bow tie, |
| 2072 |
bow-tie/.forward to = /pingu/bow tie, |
| 2073 |
bow tie/.code = \pingu@set@extra{bowtie}{true}\pingu@color{bowtie}{#1}, |
| 2074 |
bow tie/.default = pingu@blue, |
| 2075 |
bow tie b/.code = \pingu@color{bowtie@b}{#1}, |
| 2076 |
bowtie b/.forward to = /pingu/bow tie b, |
| 2077 |
bow-tie b/.forward to = /pingu/bow tie b, |
| 2078 |
bowtie offset/.forward to = /pingu/bow tie offset, |
| 2079 |
bow-tie offset/.forward to = /pingu/bow tie offset, |
| 2080 |
bow tie offset/.code = \def\pingu@x@bowtie@offset{#1}, |
| 2081 |
bowtie knot/.forward to = /pingu/bow tie knot, |
| 2082 |
bow-tie knot/.forward to = /pingu/bow tie knot, |
| 2083 |
bow tie knot/.code = \pingu@color{bowtie@knot}{#1}, |
| 2084 |
}{% defaults |
| 2085 |
bow tie knot=\pingu@color@bowtie!92!black,bow tie offset=.315cm,% |
| 2086 |
bow tie b=\pingu@color@bowtie% |
| 2087 |
} |
| 2088 |
|
| 2089 |
\def\pingupathxbowtieknot{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.0625cm,-.35mm) to[bend right=10] ++(.125cm,0) -- ++(0,-.13cm) to[bend right=10] ++(-.125cm, 0) -- cycle} |
| 2090 |
\def\pingupathxbowtieleft{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.15mm,-.06cm) to[out=155,in=-5] ++(-.25cm,.065cm) to[bend right=15] ++(0,-.21cm) to[in=-155,out=5] ++(.25cm,.065cm) -- cycle} |
| 2091 |
\def\pingupathxbowtieright{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(.15mm,-.06cm) to[out=25,in=-175] ++(.25cm,.065cm) to[bend left=15] ++(0,-.21cm) to[in=-25,out=175] ++(-.25cm,.065cm) -- cycle} |
| 2092 |
\def\pingu@draw@eb@bowtie{% |
| 2093 |
\path (\pingu@name-bill)++(0,-\pingu@x@bowtie@offset) coordinate(\pingu@name-bow-tie-start); |
| 2094 |
\pingu@block{\pingu@color@bowtie} \pingupathxbowtieleft; |
| 2095 |
\pingu@block{\pingu@color@bowtie@b} \pingupathxbowtieright; |
| 2096 |
\pingu@block{\pingu@color@bowtie@knot} \pingupathxbowtieknot; |
| 2097 |
} |
| 2098 |
|
| 2099 |
\newif\if@pingu@x@pants@bands |
| 2100 |
\pingu@create@extra{pants}{% |
| 2101 |
pants/.code = \pingu@set@extra{pants}{true}\pingu@color{pants}{#1}, |
| 2102 |
pants/.default = pingu@red, |
| 2103 |
pants bands/.is if = @pingu@x@pants@bands, |
| 2104 |
pants button left/.code = \pingu@color{pants@button@left}{#1}, |
| 2105 |
pants button right/.code = \pingu@color{pants@button@right}{#1}, |
| 2106 |
pants buttons/.style = {/pingu/pants button left={#1}, /pingu/pants button right={#1}}, |
| 2107 |
pants button left shade/.code = \pingu@color{pants@button@left@shade}{#1}, |
| 2108 |
pants button right shade/.code = \pingu@color{pants@button@right@shade}{#1}, |
| 2109 |
pants buttons shade/.style = {/pingu/pants button left shade={#1}, /pingu/pants button right shade={#1}}, |
| 2110 |
pants without buttons/.forward to=/pingu/pants no buttons, |
| 2111 |
pants no buttons/.style = {/pingu/pants buttons=\@pingu@none, /pingu/pants buttons shade=\@pingu@none}, |
| 2112 |
pants extra height/.code = \def\pingu@x@pants@extra@height{#1}, |
| 2113 |
}{pants extra height=1.5mm,pants buttons=pingu@black,pants button left shade=\pingu@color@pants@button@left!70!white,pants button right shade=\pingu@color@pants@button@right!70!white} |
| 2114 |
|
| 2115 |
\def\pingu@draw@eb@pants{% |
| 2116 |
\pingu@block[rounded corners=\p@]{\pingu@color@pants} ([xshift=.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-right) coordinate(@tmp) to[bend right=6] ([xshift=-.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-left) coordinate(@tmpb) -- ++(0,-\pingu@x@pants@extra@height) arc(180:270:.85mm and 2.25mm) to[bend left=\pingu@bend] (\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=15] ([yshift=-.15mm]\pingu@name-bottom-center) to[bend left=15] (\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=6] ([yshift=-2.5mm]\pingu@name-waist-right) arc (-90:0:.85mm and 2.25mm) -- cycle; |
| 2117 |
\if@pingu@x@pants@bands |
| 2118 |
\pingu@layer{middle}[] |
| 2119 |
% draw stripes |
| 2120 |
\scope |
| 2121 |
\clip \pingu@path@lowerpingu; |
| 2122 |
\pingu@block{\pingu@color@pants} (@tmp)++(.55mm,-\pingu@one) to[bend right=3] ([yshift=1.65mm]\pingu@name-wings-side-right) -- ++(-.25mm,-.25mm) to[bend left=3] ([yshift=-\pingu@one]@tmp) -- cycle; |
| 2123 |
\pingu@block{\pingu@color@pants} (@tmpb)++(-.55mm,-\pingu@one) to[bend left=3] ([yshift=1.65mm]\pingu@name-wings-side-left) -- ++(.25mm,-.25mm) to[bend right=3] ([yshift=-\pingu@one]@tmpb) -- cycle; |
| 2124 |
\endscope |
| 2125 |
\fi |
| 2126 |
\pingu@block{\pingu@color@pants@button@right}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm]; |
| 2127 |
\pingu@block{\pingu@color@pants@button@left}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm]; |
| 2128 |
\pingu@block[even odd rule]{\pingu@color@pants@button@right@shade}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm]; |
| 2129 |
\pingu@block[even odd rule]{\pingu@color@pants@button@left@shade}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm]; |
| 2130 |
\@for\i:={0,90,180,270}\do{ |
| 2131 |
\pingu@block{\pingu@color@pants@button@right@shade} (@tmp)++(.25mm,-.25mm)++(\i:. |
| 2132 |
35mm) circle[radius=.1mm]; |
| 2133 |
\pingu@block{\pingu@color@pants@button@left@shade} (@tmpb)++(-.25mm,-.25mm)++(\i:.35mm) circle[radius=.1mm]; |
| 2134 |
}% |
| 2135 |
\if@pingu@x@pants@bands \endpingu@layer \fi |
| 2136 |
} |
| 2137 |
|
| 2138 |
|
| 2139 |
\pingu@create@extra{belt}{% |
| 2140 |
belt/.code = \pingu@set@extra{belt}{true}\pingu@color{belt}{#1}, |
| 2141 |
belt/.default = pingu@bronze!80!black, |
| 2142 |
belt knot color/.code = \pingu@color{belt@knot}{#1} |
| 2143 |
}{% defaults |
| 2144 |
belt knot color = pingu@silver |
| 2145 |
} |
| 2146 |
|
| 2147 |
\def\pingu@draw@eb@belt@wh{1.25mm} |
| 2148 |
\def\pingu@draw@eb@belt{% |
| 2149 |
\path ([yshift=-1.66mm/2]\pingu@name-waist-left) -- ([yshift=-1.66mm/2]\pingu@name-waist-right) coordinate[pos=.5] (\pingu@name @belt@center); |
| 2150 |
\pingu@block[rounded corners=.5pt]{\pingu@color@belt} (\pingu@name-waist-left) coordinate (@) to[bend left=5] (\pingu@name-waist-right) -- ++(0,-1.66mm) to[bend right=5] ([yshift=-1.66mm]@) -- cycle; |
| 2151 |
\pingu@block[rounded corners=1.5pt]{\pingu@color@belt@knot} ([xshift=-1mm,yshift=-.7mm-1.66mm/2]\pingu@name @belt@center) rectangle ++(2mm,2mm); |
| 2152 |
} |
| 2153 |
% #endregion |
| 2154 |
|
| 2155 |
% #region fun-lib |
| 2156 |
\pingu@create@extra{cakehat}{% |
| 2157 |
cake-hat/.code = \pingu@set@extra{cakehat}{true}\pingu@color{cakehat}{#1}, |
| 2158 |
cake-hat/.default = pingu@white!92!\pingu@color@cakehat@top, |
| 2159 |
cake-hat top/.code = \pingu@color{cakehat@top}{#1}, |
| 2160 |
cake-hat shade/.code = \pingu@color{cakehat@shade}{#1}, |
| 2161 |
cake-hat candle/.code = \pingu@color{cakehat@candle}{#1}, |
| 2162 |
cake-hat candle fire/.code = \pingu@color{cakehat@candle@fire}{#1}, |
| 2163 |
cake-hat candle fire 2/.code = \pingu@color{cakehat@candle@fire@b}{#1}, |
| 2164 |
cake-hat candle fire 3/.code = \pingu@color{cakehat@candle@fire@c}{#1}, |
| 2165 |
cake-hat candle wick/.code = \pingu@color{cakehat@candle@wick}{#1}, |
| 2166 |
cake-hat candle shade/.code = \pingu@color{cakehat@candle@shade}{#1}, |
| 2167 |
cake-hat candle back/.code = \pingu@color{cakehat@candle@back}{#1}, |
| 2168 |
cake-hat outline/.code = \pingu@color{cakehat@outline}{#1}, |
| 2169 |
cake-hat outline width/.code = \def\pingu@x@cakehat@outline@w{#1}, |
| 2170 |
cake-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@cakehat@angle{#1}\def\pingu@x@cakehat@xshift{#2}\def\pingu@x@cakehat@yshift{#3}\def\pingu@x@cakehat@scale{#4}} |
| 2171 |
}{cake-hat position={-9:(1mm,0mm)1},cake-hat outline=pingu@black!80!\pingu@color@cakehat,cake-hat outline width=.25pt,cake-hat top=pingu@purple,cake-hat candle=pingu@purple!60!pingu@black,cake-hat candle back=\pingu@color@cakehat@candle!85!black,cake-hat candle wick=pingu@black,cake-hat candle fire=pingu@red,cake-hat candle fire 2=\pingu@color@cakehat@candle@fire!50!yellow,cake-hat candle fire 3=\pingu@color@cakehat@candle@fire@b!50!white,cake-hat shade=gray,cake-hat candle shade=gray!80!\pingu@color@cakehat@candle@back} |
| 2172 |
|
| 2173 |
\def\pingu@p@cake@outline{(-6.25mm,-.25cm) to[bend left=2] (\pingu@name-cake-tl) arc (180:0:1.375cm/2+.01mm and 1.41mm) to[bend left=2] ++(0,-3.125mm*.97) to[bend left=20] (-6mm,-.26cm) -- cycle} |
| 2174 |
\def\pingu@draw@ea@cakehat{% |
| 2175 |
\scope[rotate around={\pingu@x@cakehat@angle:(\pingu@name-head-top)},% |
| 2176 |
shift={(\pingu@name-head-top)}, |
| 2177 |
shift={(\pingu@x@cakehat@xshift,\pingu@x@cakehat@yshift)}, |
| 2178 |
scale=\pingu@x@cakehat@scale] |
| 2179 |
\pingu@block{\pingu@color@cakehat} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] coordinate[pos=.97] (\pingu@name-cake-tl) ++(0,3.125mm) to[bend right=20] |
| 2180 |
++(1.375cm,0) to[bend left=2] coordinate[pos=.03] (\pingu@name-cake-tr) ++(0,-3.125mm) to[bend left=20] (-6mm,-.26cm) -- cycle; |
| 2181 |
\pingu@block[fill opacity=.1]{\pingu@color@cakehat@shade} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend right=20] |
| 2182 |
++(1.375cm,0) to[bend right=2] ++(0,3.125mm) [sharp corners] to[bend left=20] (-6.25mm,-.225cm) [rounded corners=.2mm] -- cycle; |
| 2183 |
\path (\pingu@name-cake-tl) -- (\pingu@name-cake-tr) coordinate[pos=.5] (\pingu@name-cake-tc); |
| 2184 |
% cake side |
| 2185 |
\scope |
| 2186 |
\clip\pingu@p@cake@outline; |
| 2187 |
\path (\pingu@name-cake-tl) arc (180:360:1.375cm/2+.01mm and 1.41mm) foreach[count=\i] \a in {0,.19,.295,.375,.485,.625,.72,.85,1} {coordinate[pos=\a] (\pingu@name-cake-\i)}; |
| 2188 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-1) ellipse [x radius=.255mm,y radius=2mm]; |
| 2189 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-9) ellipse [x radius=.265mm,y radius=1.45mm]; |
| 2190 |
\foreach \i in {2,...,9} { |
| 2191 |
\pgfmathsetmacro\@tmprand{rand} |
| 2192 |
\pingu@draw[opacity=.5]{gray} (\pingu@name-cake-\i)++(-.02mm,0) to[bend left=1] ++(+.145mm,{-1.075mm-(\@tmprand+.15)*.5125mm}) arc(370:300:.145mm); |
| 2193 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\i)++(0,.1mm) -- ++(-.125mm,0) to[bend left=1] ++(0,{-1.2mm-(\@tmprand+.15)*.5125mm}) arc(170:370:.145mm) to[bend right=1] cycle; |
| 2194 |
} |
| 2195 |
\foreach \i in {2,...,9} { |
| 2196 |
\ifnum\i=2\relax |
| 2197 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.5mm) to[bend left=8] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax); |
| 2198 |
\else\ifnum\i=9\relax |
| 2199 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=8] ([xshift=-.05mm,yshift=-.5mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax); |
| 2200 |
\else |
| 2201 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=9.5+2*rand] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax); |
| 2202 |
\fi\fi |
| 2203 |
} |
| 2204 |
\endscope |
| 2205 |
\pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-tc) ellipse [x radius=1.375cm/2+.01mm, y radius=1.41mm]; |
| 2206 |
% outline |
| 2207 |
\pingu@draw[line width=\pingu@x@cakehat@outline@w,rounded corners=.075mm]{\pingu@color@cakehat@outline} \pingu@p@cake@outline; |
| 2208 |
% % 3d sides |
| 2209 |
% \pingu@block[rounded corners=.04mm]{\pingu@color@cakehat@top} ([xshift=.1mm,yshift=.125mm]\pingu@name-cake-tl) to[out=246,in=97] ++(-.11mm,-2.125mm) -- ++(.04mm,0) to[bend right=12] (\pingu@name-cake-ttl) -- cycle; |
| 2210 |
% \pingu@block[rounded corners=.09mm]{green} ([xshift=-.1mm]\pingu@name-cake-ttr) to[out=294,in=83] ++(.125mm,-2.125mm) to[bend left=12] ([xshift=-.11mm,yshift=.125mm]\pingu@name-cake-tr) -- cycle; |
| 2211 |
% candle |
| 2212 |
\pingu@block{\pingu@color@cakehat@candle@back} (\pingu@name-cake-tc)++(.8mm,2.66mm) to[bend right=7] ++(-1.1mm,-.1mm) to[bend right=30]++(1.1mm,0) -- cycle; |
| 2213 |
% wick |
| 2214 |
\pingu@draw[very thin]{\pingu@color@cakehat@candle@wick} (\pingu@name-cake-tc)++(.25mm,2mm) to[out=75,in=-95] coordinate[pos=.8] (\pingu@name-wick-1) ++(0,1mm) coordinate(\pingu@name-wick-top); |
| 2215 |
\pingu@block{\pingu@color@cakehat@candle@fire} (\pingu@name-wick-1)++(-.045mm,0) to[out=115,in=240] ++(0,1.5mm) to[out=300,in=65] ([xshift=.045mm]\pingu@name-wick-1) -- cycle; |
| 2216 |
\pingu@block{\pingu@color@cakehat@candle@fire@b} (\pingu@name-wick-1)++(-.045mm,0) to[out=105,in=240] ++(0,1.3mm) to[out=300,in=75] ([xshift=.045mm]\pingu@name-wick-1) -- cycle; |
| 2217 |
\pingu@block{\pingu@color@cakehat@candle@fire@c} (\pingu@name-wick-1)++(-.035mm,0) to[out=95,in=250] ++(0,1.1mm) to[out=290,in=85] ([xshift=.035mm]\pingu@name-wick-1) -- cycle; |
| 2218 |
% front |
| 2219 |
\pingu@block{\pingu@color@cakehat@candle} (\pingu@name-cake-tc)++(.25mm,0) ++(.55mm,0) to[bend left=0.5] ++(0,2.66mm) to[bend left=20] ++(-1.1mm,-.1mm) to[bend right=0.5] ++(0,-2.66mm) to[bend right=20] cycle; |
| 2220 |
\pingu@block[fill opacity=.125]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend right=20] ++(1.1mm,0) to[bend left=.5] ++(0,2.66mm) to[bend left=15] ++(-1.1mm,-2.5mm) -- cycle; |
| 2221 |
\pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend left=2] ++(1.1mm,-1.1mm) to[bend left=5] ++(1.1mm,0) to[bend left=2] ++(-1.1mm,1.2mm) to[bend left =15] cycle; |
| 2222 |
\pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(1.35mm,-1.25mm) circle [radius=.1mm]; |
| 2223 |
\endscope |
| 2224 |
} |
| 2225 |
\pingu@create@extra{pumpkinhat}{% |
| 2226 |
pumpkin-hat/.code = \pingu@set@extra{pumpkinhat}{true}\pingu@color{pumpkinhat}{#1}, |
| 2227 |
pumpkin-hat/.default = pingu@bronze!97!white, |
| 2228 |
pumpkin-hat stalk/.code = \pingu@color{pumpkinhat@stalk}{#1}, |
| 2229 |
pumpkin-hat stalk top/.code = \pingu@color{pumpkinhat@stalk@top}{#1}, |
| 2230 |
pumpkin-hat stripe a/.code = \pingu@color{pumpkinhat@stripe@a}{#1}, |
| 2231 |
pumpkin-hat stripe b/.code = \pingu@color{pumpkinhat@stripe@b}{#1}, |
| 2232 |
pumpkin-hat stripe c/.code = \pingu@color{pumpkinhat@stripe@c}{#1}, |
| 2233 |
pumpkin-hat outline/.code = \pingu@color{pumpkinhat@outline}{#1}, |
| 2234 |
pumpkin-hat outline width/.code = \def\pingu@x@pumpkinhat@outline@w{#1}, |
| 2235 |
pumpkin-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@pumpkinhat@angle{#1}\def\pingu@x@pumpkinhat@xshift{#2}\def\pingu@x@pumpkinhat@yshift{#3}\def\pingu@x@pumpkinhat@scale{#4}} |
| 2236 |
}{pumpkin-hat position={-9:(1.65mm,.25mm)1.05},pumpkin-hat stalk=pingu@green!95!\pingu@color@pumpkinhat!45!pingu@black,pumpkin-hat stalk top=\pingu@color@pumpkinhat@stalk!95!pingu@black,pumpkin-hat stripe a=pingu@black,pumpkin-hat stripe b=\pingu@color@pumpkinhat@stripe@a,pumpkin-hat stripe c=\pingu@color@pumpkinhat@stripe@b,pumpkin-hat outline=pingu@black,pumpkin-hat outline width=.7pt} |
| 2237 |
|
| 2238 |
\def\pingu@pumpkinhat@outerpath{(0,.125cm)++(-60:6.75mm and 5.5mm) arc(-60:86: 6.75mm and 5.5mm) to[bend left=3] ++(-1.75mm,0) arc(95:242:6.75mm and 5.5mm) to[bend left=5] cycle;} |
| 2239 |
\def\pingu@draw@ea@pumpkinhat{% |
| 2240 |
\scope[rotate around={\pingu@x@pumpkinhat@angle:(\pingu@name-head-top)},% |
| 2241 |
shift={(\pingu@name-head-top)}, |
| 2242 |
shift={(\pingu@x@pumpkinhat@xshift,\pingu@x@pumpkinhat@yshift)}, |
| 2243 |
scale=\pingu@x@pumpkinhat@scale] |
| 2244 |
% give it a small cut |
| 2245 |
\pingu@block{\pingu@color@pumpkinhat} (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] coordinate[pos=.5] (@pkuc) ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle; |
| 2246 |
\pingu@draw[line join=round,line width=\pingu@x@pumpkinhat@outline@w]{\pingu@color@pumpkinhat@outline} \pingu@pumpkinhat@outerpath; |
| 2247 |
\scope |
| 2248 |
\clip (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] cycle; |
| 2249 |
\pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@a} (@pklr) to[bend left=55] (@pkr); |
| 2250 |
\pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@c} (@pkll) to[bend right=55] (@pkl); |
| 2251 |
\pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@b} (@pklc) to[bend right=5] (@pkuc); |
| 2252 |
\endscope |
| 2253 |
\pingu@block{\pingu@color@pumpkinhat@stalk} ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkl) to[bend left=3] ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle; |
| 2254 |
\pingu@block{\pingu@color@pumpkinhat@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm]; |
| 2255 |
\endscope |
| 2256 |
} |
| 2257 |
|
| 2258 |
\pingu@create@wing@extra{lollipop}{% |
| 2259 |
lollipop \@lr/.code = {\pingu@set@extra{lollipop\@lr}{true}\pingu@color{lollipop\@lr}{##1}}, |
| 2260 |
lollipop \@lr/.default = pingu@green, |
| 2261 |
lollipop \@lr\space handle/.code = \pingu@color{lollipop\@lr @handle}{##1},% |
| 2262 |
lollipop \@lr\space second/.code = \pingu@color{lollipop\@lr @second}{##1}% |
| 2263 |
}{lollipop \@lr\space handle=pingu@bronze,lollipop \@lr\space second={\csname pingu@color@lollipop\@lr\endcsname!86!white}} |
| 2264 |
|
| 2265 |
% #1 wing |
| 2266 |
\def\pingu@draw@wi@lollipop#1{% |
| 2267 |
\pingu@setup@wing{lollipop}{#1}% |
| 2268 |
\pingu@draw[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@lollipop#1@handle\endcsname}(\pingu@name-wing-#1)++(0,4.75mm) -- ++(0,-6.25mm); |
| 2269 |
\pingu@block[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\@col}(\pingu@name-wing-#1)++(0,4.75mm) coordinate (\pingu@name-lollipop-#1-top) circle[radius=1.4mm]; |
| 2270 |
\pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\csname pingu@color@lollipop#1@second\endcsname} (\pingu@name-lollipop-#1-top) ellipse [x radius=1.57mm, y radius=1.5\p@]; |
| 2271 |
\pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\@col} (\pingu@name-lollipop-#1-top)++(0,.5\p@) ellipse [x radius=1.4mm, y radius=\p@]; |
| 2272 |
} |
| 2273 |
|
| 2274 |
|
| 2275 |
\pingu@create@wing@extra{fish}{% |
| 2276 |
fish \@lr/.code = {\pingu@set@extra{fish\@lr}{true}\pingu@color{fish\@lr}{##1}}, |
| 2277 |
fish \@lr/.default = pingu@blue!50!pingu@green!50!black!90!gray, |
| 2278 |
fish \@lr\space scales/.code = \pingu@color{fish\@lr @scales}{##1}, |
| 2279 |
fish \@lr\space eye/.code = \pingu@color{fish\@lr @eye}{##1}, |
| 2280 |
}{fish \@lr\space scales=white!90!pingu@blue!80!black, fish \@lr\space eye=pingu@white} |
| 2281 |
|
| 2282 |
% #1 wing |
| 2283 |
\def\pingu@draw@wi@fish#1{% |
| 2284 |
\pingu@setup@wing{fish}{#1}% |
| 2285 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2286 |
\def\fishpath{(\pingu@name-wing-#1)++(-5mm,0) to[bend left=38] ++(9mm,0) to[out=-40,in=180] ++(1.5mm,-1.5mm) to[bend left=25] ++(0,3mm) to[out=180,in=40] ++(-1.5mm,-1.5mm) to[bend left=38] cycle}; |
| 2287 |
\pingu@block[draw=\csname pingu@color@fish#1@scales\endcsname, sharp corners, line join=round]{\@col} \fishpath; |
| 2288 |
|
| 2289 |
\clip\fishpath; |
| 2290 |
% TODO: allow to configure |
| 2291 |
\foreach \i in {0,...,11} { |
| 2292 |
\foreach \j in {1,...,30} { |
| 2293 |
\pgfmathsetmacro\upshift{mod(\j,2)*.2mm} |
| 2294 |
\pingu@draw[very thin]{\csname pingu@color@fish#1@scales\endcsname} (\pingu@name-wing-#1)++(-3.5mm+.35mm*\j,2mm+-.4 85mm*\i+\upshift) arc (75:-90:.35mm and .25mm); |
| 2295 |
} |
| 2296 |
} |
| 2297 |
\pingu@block[rounded corners=.1mm]{\csname pingu@color@fish#1@eye\endcsname} (\pingu@name-wing-#1)++(-3.8mm,.25mm) circle[radius=.2mm]; |
| 2298 |
\endscope |
| 2299 |
} |
| 2300 |
|
| 2301 |
|
| 2302 |
\pingu@create@extra{heart}{% |
| 2303 |
heart/.code = {\pingu@set@extra{heart}{true}\pingu@color{heart}{#1}}, |
| 2304 |
heart/.default = lightgray |
| 2305 |
}{} |
| 2306 |
|
| 2307 |
\def\pingu@draw@eb@heart{% |
| 2308 |
\pingu@block[sharp corners]{\pingu@color@heart} |
| 2309 |
([yshift=1mm]\pingu@name-belly-center) arc(0:180:.13cm) |
| 2310 |
to[out=270,in=110] ++(.26cm,-.36cm) to[out=70,in=270] ++(.26cm,.36cm) arc (0:180:.13cm) -- cycle; |
| 2311 |
} |
| 2312 |
|
| 2313 |
\pingu@create@extra{vampireteeth}{% |
| 2314 |
vampire teeth/.code = {\pingu@set@extra{vampireteeth}{true}\pingu@color{vampireteeth}{#1}}, |
| 2315 |
vampire teeth/.default = pingu@yellow!10!pingu@black!70!lightgray |
| 2316 |
}{} |
| 2317 |
|
| 2318 |
\def\pingu@draw@eb@vampireteeth{% |
| 2319 |
\pingu@block{\pingu@color@vampireteeth} (\pingu@name-bill) ++(-1.35mm,-2.5mm) |
| 2320 |
arc(180:0:1.35mm and 2.5mm) |
| 2321 |
arc(0:180:1.35mm and .95mm); |
| 2322 |
} |
| 2323 |
|
| 2324 |
\pingu@create@wing@extra{broom}{% |
| 2325 |
broom \@lr/.code = {\pingu@set@extra{broom\@lr}{true}\pingu@color{broom\@lr}{##1}}, |
| 2326 |
broom \@lr/.default = pingu@bronze, |
| 2327 |
broom \@lr\space length/.code = \expandafter\def\csname pingu@broom@\@lr @length\endcsname{##1}, |
| 2328 |
broom \@lr\space shift/.code = \expandafter\def\csname pingu@broom@\@lr @shift\endcsname{##1}, |
| 2329 |
broom \@lr\space band/.code = \pingu@color{broom@\@lr @band}{##1}, |
| 2330 |
broom \@lr\space bristles a/.code = \pingu@color{broom@\@lr @bristles@a}{##1}, |
| 2331 |
broom \@lr\space bristles b/.code = \pingu@color{broom@\@lr @bristles@b}{##1}, |
| 2332 |
broom \@lr\space bristles c/.code = \pingu@color{broom@\@lr @bristles@c}{##1}, |
| 2333 |
}{broom \@lr\space length=22mm,broom \@lr\space shift=8mm, broom \@lr\space band=pingu@red!80!pingu@black!80!pingu@bronze, broom \@lr\space bristles a=pingu@bronze!16!pingu@yellow!41!pingu@white!80!brown!95!\csname pingu@color@broom\@lr\endcsname, broom \@lr\space bristles b=\csname pingu@color@broom@\@lr @bristles@a\endcsname!83!pingu@white, broom \@lr\space bristles c=\csname pingu@color@broom@\@lr @bristles@b\endcsname!83!pingu@white} |
| 2334 |
\def\pingu@draw@wi@broom#1{% |
| 2335 |
\pingu@setup@wing{broom}{#1}% |
| 2336 |
% TODO: mirror on other wing? |
| 2337 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2338 |
\pingu@block{\csname pingu@color@broom#1\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-\csname pingu@broom@#1@shift\endcsname) -- ++(0,\csname pingu@broom@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-broom-#1-top) -- ++(0,-\csname pingu@broom@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 2339 |
\pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle; |
| 2340 |
\pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1.66mm,9.75mm) to[out=300,in=65] coordinate[pos=.81] (@l) coordinate[pos=.79] (@l2) ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle; |
| 2341 |
\pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(.25mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle; |
| 2342 |
\pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(1.35mm,9.25mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle; |
| 2343 |
\pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(0mm,9.65mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle; |
| 2344 |
\pingu@block{\csname pingu@color@broom@#1@bristles@c\endcsname} (\pingu@name-broom-#1-top)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,9.5mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]\pingu@name-broom-#1-top) -- cycle; |
| 2345 |
% TODO: broom cap color etc |
| 2346 |
\pingu@block{\csname pingu@color@broom@#1@band\endcsname} (@r) to[bend right=10] (@l) -- (@l2) to[bend left=10] (@r2); |
| 2347 |
\endscope |
| 2348 |
} |
| 2349 |
|
| 2350 |
\tikzset{pingu@clip even odd rule/.code={\pgfseteorule}, % Credit to Andrew Stacey |
| 2351 |
pingu@invclip/.style={ |
| 2352 |
clip,insert path= |
| 2353 |
[pingu@clip even odd rule]{ |
| 2354 |
[reset cm](-\maxdimen,-\maxdimen)rectangle(\maxdimen,\maxdimen) |
| 2355 |
} |
| 2356 |
}} |
| 2357 |
\pingu@create@extra{jackolantern}{% |
| 2358 |
jack o lantern/.code = \pingu@set@extra{jackolantern}{true}\pingu@color{jackolantern}{#1}, |
| 2359 |
jack o lantern/.default = pingu@bronze!97!pingu@black, |
| 2360 |
jack o lantern helmet/.style = {jack o lantern=#1,jack o lantern background=none,jack o lantern position={-2.15:(2.05mm,-11.35mm){1.5}},jack o lantern back stripe a=\@pingu@none, jack o lantern back stripe b=\@pingu@none,jack o lantern back stripe c=\@pingu@none,jack o lantern height=6.25mm,jack o lantern width=6.1mm,hair=\@pingu@none}, |
| 2361 |
jack o lantern helmet/.default = pingu@bronze!97!pingu@black, |
| 2362 |
jack o lantern stalk/.code = \pingu@color{jackolantern@stalk}{#1}, |
| 2363 |
jack o lantern stalk top/.code = \pingu@color{jackolantern@stalk@top}{#1}, |
| 2364 |
jack o lantern background/.code= \pingu@color{jackolantern@background}{#1}, |
| 2365 |
jack o lantern stripe a/.code = \pingu@color{jackolantern@stripe@a}{#1}, |
| 2366 |
jack o lantern stripe b/.code = \pingu@color{jackolantern@stripe@b}{#1}, |
| 2367 |
jack o lantern stripe c/.code = \pingu@color{jackolantern@stripe@c}{#1}, |
| 2368 |
jack o lantern back stripe a/.code = \pingu@color{jackolantern@backstripe@a}{#1}, |
| 2369 |
jack o lantern back stripe b/.code = \pingu@color{jackolantern@backstripe@b}{#1}, |
| 2370 |
jack o lantern back stripe c/.code = \pingu@color{jackolantern@backstripe@c}{#1}, |
| 2371 |
jack o lantern outline/.code = \pingu@color{jackolantern@outline}{#1}, |
| 2372 |
jack o lantern outline width/.code = \def\pingu@x@jackolantern@outline@w{#1}, |
| 2373 |
jack o lantern height/.code = \def\pingu@x@jackolantern@height{#1}, |
| 2374 |
jack o lantern width/.code = \def\pingu@x@jackolantern@width{#1}, |
| 2375 |
jack o lantern position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@jackolantern@angle{#1}\def\pingu@x@jackolantern@xshift{#2}\def\pingu@x@jackolantern@yshift{#3}\def\pingu@x@jackolantern@scale{#4}} |
| 2376 |
}{jack o lantern position={-9:(3.15mm,.95mm){1.3}},jack o lantern stripe a=pingu@black,jack o lantern stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern back stripe a=pingu@black,jack o lantern back stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern back stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern outline=pingu@black,jack o lantern outline width=.7pt,jack o lantern stalk=pingu@green!95!\pingu@color@jackolantern!45!pingu@black,jack o lantern stalk top=\pingu@color@jackolantern@stalk!95!pingu@black,jack o lantern background=\pingu@color@jackolantern!85!pingu@black,jack o lantern height=5.5mm,jack o lantern width=5.75mm} |
| 2377 |
|
| 2378 |
\def\pingu@jackolantern@outerpath{(0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle;} |
| 2379 |
\def\pingu@x@jackolantern{(-5.15mm,.6mm) to[bend right] ++(1.5mm,-.5mm) -- ++(.33mm,.33mm) to[bend right=10] ++(1.5mm,0) -- ++(.66mm,-.75mm) -- ++(.66mm,.75mm) to[bend right=10] ++(1.5mm,0) -- ++(.33mm,-.33mm) to[bend right] ++(1.5mm,.5mm) to[bend left] ++(-1.5mm,-2.15mm) to[bend left=10] ++(-.33mm,.33mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.66mm,-.5mm) -- ++(-.66mm,.5mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.33mm,-.33mm) to[bend left] cycle} |
| 2380 |
|
| 2381 |
\def\pingu@x@jackolantern@eye@left{(0.9mm,2mm) -- ++(2mm,-.15mm) to[bend right=40] ++(-.5mm,2mm) -- cycle} |
| 2382 |
\def\pingu@x@jackolantern@eye@right{(-3mm,2mm) -- ++(-2mm,-.15mm) to[bend left=40] ++(.5mm,2mm) -- cycle} |
| 2383 |
\def\pingu@x@jackolantern@nose{(0.965mm*0.5-3.225mm*0.5,1mm) -- ++(1mm,1.2mm) to[bend right=10] ++(-2mm,0) -- cycle} |
| 2384 |
|
| 2385 |
\def\pingu@draw@ea@jackolantern{% |
| 2386 |
\scope[rotate around={\pingu@x@jackolantern@angle:(\pingu@name-head-top)},% |
| 2387 |
shift={(\pingu@name-head-top)}, |
| 2388 |
shift={(\pingu@x@jackolantern@xshift,\pingu@x@jackolantern@yshift)}, |
| 2389 |
scale=\pingu@x@jackolantern@scale] |
| 2390 |
\scope |
| 2391 |
\pgfinterruptboundingbox |
| 2392 |
\path[pingu@invclip]\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose; |
| 2393 |
% give it a small cut |
| 2394 |
\pingu@block{\pingu@color@jackolantern} (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkll) arc(-60:86: {\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkl) to[bend right=3] coordinate[pos=.5] (@pkuc) coordinate[pos=.225] (@pksl) coordinate[pos=.775] (@pksr) ++(-3.75mm,0) coordinate (@pkr) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle; |
| 2395 |
\pingu@draw[line join=round,line width=\pingu@x@jackolantern@outline@w]{\pingu@color@jackolantern@outline} \pingu@jackolantern@outerpath; |
| 2396 |
\endpgfinterruptboundingbox |
| 2397 |
\scope |
| 2398 |
\clip (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle; |
| 2399 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@a} (@pklr) to[bend left=42] (@pkr); |
| 2400 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@c} (@pkll) to[bend right=54] (@pkl); |
| 2401 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@b} (@pklc) to[bend right=6] (@pkuc); |
| 2402 |
\endscope |
| 2403 |
\endscope |
| 2404 |
\pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@left; |
| 2405 |
\pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@right; |
| 2406 |
|
| 2407 |
\pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@nose; |
| 2408 |
|
| 2409 |
\pingu@draw[fill=\pingu@color@jackolantern@background]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern; |
| 2410 |
\scope |
| 2411 |
\clip\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose; |
| 2412 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@a} ([xshift=1.6mm]@pklr) to[bend left=18] (@pkr); |
| 2413 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@c} ([xshift=-1.6mm]@pkll) to[bend right=22] (@pkl); |
| 2414 |
\pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@b} (@pklc) to[bend right=1] (@pkuc); |
| 2415 |
\endscope |
| 2416 |
\pingu@block{\pingu@color@jackolantern@stalk} ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksl) to[bend left=3] ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle; |
| 2417 |
\pingu@block{\pingu@color@jackolantern@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm]; |
| 2418 |
\endscope |
| 2419 |
} |
| 2420 |
|
| 2421 |
\pingu@create@wing@extra{hammer}{% |
| 2422 |
hammer \@lr/.code = {\pingu@set@extra{hammer\@lr}{true}\pingu@color{hammer\@lr}{##1}}, |
| 2423 |
hammer \@lr/.default = pingu@silver, |
| 2424 |
hammer \@lr\space handle length/.code = \expandafter\def\csname pingu@hammer@\@lr @length\endcsname{##1}, |
| 2425 |
hammer \@lr\space handle shift/.code = \expandafter\def\csname pingu@hammer@\@lr @shift\endcsname{##1}, |
| 2426 |
hammer \@lr\space width/.code = \expandafter\def\csname pingu@hammer@\@lr @width\endcsname{##1}, |
| 2427 |
hammer \@lr\space height/.code = \expandafter\def\csname pingu@hammer@\@lr @height\endcsname{##1}, |
| 2428 |
hammer \@lr\space xshift/.code = \expandafter\def\csname pingu@hammer@\@lr @xshift\endcsname{##1}, |
| 2429 |
hammer \@lr\space yshift/.code = \expandafter\def\csname pingu@hammer@\@lr @yshift\endcsname{##1}, |
| 2430 |
hammer \@lr\space handle/.code = \pingu@color{hammer@\@lr @handle}{##1},% |
| 2431 |
hammer \@lr\space with knob/.style = {hammer \@lr=##1, hammer \@lr\space handle length=\dimexpr9mm+\csname pingu@hammer@\@lr @height\endcsname+.5mm,hammer \@lr\space yshift=\dimexpr-.5mm-\csname pingu@hammer@\@lr @height\endcsname}, |
| 2432 |
hammer \@lr\space with knob/.default = pingu@silver |
| 2433 |
}{hammer \@lr\space handle length=9mm, hammer \@lr\space handle=pingu@bronze, hammer \@lr\space handle shift=-4mm, hammer \@lr\space width=7mm,hammer \@lr\space height=3.5mm, hammer \@lr\space xshift=-0.5*\csname pingu@hammer@\@lr @width\endcsname,hammer \@lr\space yshift=-1mm} |
| 2434 |
\def\pingu@draw@wi@hammer#1{% |
| 2435 |
\pingu@setup@wing{hammer}{#1}% |
| 2436 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2437 |
% \csname pingu@color@hammer#1\endcsname |
| 2438 |
\pingu@block{\csname pingu@color@hammer@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@hammer@#1@shift\endcsname) -- ++(0,\csname pingu@hammer@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-hammer-#1-top) -- ++(0,-\csname pingu@hammer@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 2439 |
\pingu@block[rounded corners=2pt]{\csname pingu@color@hammer#1\endcsname} (\pingu@name-hammer-#1-top)++(\csname pingu@hammer@#1@xshift\endcsname,\csname pingu@hammer@#1@yshift\endcsname) rectangle ++(\csname pingu@hammer@#1@width\endcsname,\csname pingu@hammer@#1@height\endcsname); |
| 2440 |
\endscope |
| 2441 |
} |
| 2442 |
|
| 2443 |
\pingu@create@wing@extra{drumstick}{% |
| 2444 |
drum stick \@lr/.code = {\pingu@set@extra{drumstick\@lr}{true}\pingu@color{drumstick\@lr}{##1}}, |
| 2445 |
drum stick \@lr/.default = pingu@bronze!90!white, |
| 2446 |
drum stick \@lr\space handle length/.code = \expandafter\def\csname pingu@drumstick@\@lr @length\endcsname{##1}, |
| 2447 |
drum stick \@lr\space handle shift/.code = \expandafter\def\csname pingu@drumstick@\@lr @shift\endcsname{##1}, |
| 2448 |
drum stick \@lr\space xshift/.code = \expandafter\def\csname pingu@drumstick@\@lr @xshift\endcsname{##1}, |
| 2449 |
drum stick \@lr\space yshift/.code = \expandafter\def\csname pingu@drumstick@\@lr @yshift\endcsname{##1}, |
| 2450 |
drum stick \@lr\space handle/.code = \pingu@color{drumstick@\@lr @handle}{##1}% |
| 2451 |
}{drum stick \@lr\space handle length=4mm, drum stick \@lr\space handle=pingu@bronze, drum stick \@lr\space handle shift=-2mm, drum stick \@lr\space xshift=-0.5*\csname pingu@drumstick@\@lr @width\endcsname,drum stick \@lr\space yshift=-1mm} |
| 2452 |
\def\pingu@draw@wi@drumstick#1{% |
| 2453 |
\pingu@setup@wing{drumstick}{#1}% |
| 2454 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2455 |
% \csname pingu@color@drumstick#1\endcsname |
| 2456 |
\pingu@block{\csname pingu@color@drumstick@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@drumstick@#1@shift\endcsname) -- ++(\@sidesign*.1mm,\csname pingu@drumstick@#1@length\endcsname) arc(180:0:\@sidesign*.3mm and .3mm) coordinate[pos=.5] (\pingu@name-drumstick-#1-top) -- ++(\@sidesign*.1mm,-\csname pingu@drumstick@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 2457 |
\pingu@block{\@col} ([yshift=.28mm]\pingu@name-drumstick-#1-top) ellipse[x radius=.4mm,y radius=.6mm]; |
| 2458 |
\endscope |
| 2459 |
} |
| 2460 |
|
| 2461 |
\pingu@create@wing@extra{sword}{% |
| 2462 |
sword \@lr/.code = {\pingu@set@extra{sword\@lr}{true}\pingu@color{sword\@lr}{##1}}, |
| 2463 |
sword \@lr/.default = pingu@silver!94!blue, |
| 2464 |
sword \@lr\space handle length/.code = \expandafter\def\csname pingu@sword@\@lr @handle@length\endcsname{##1}, |
| 2465 |
sword \@lr\space handle shift/.code = \expandafter\def\csname pingu@sword@\@lr @shift\endcsname{##1}, |
| 2466 |
sword \@lr\space xshift/.code = \expandafter\def\csname pingu@sword@\@lr @xshift\endcsname{##1}, |
| 2467 |
sword \@lr\space yshift/.code = \expandafter\def\csname pingu@sword@\@lr @yshift\endcsname{##1}, |
| 2468 |
sword \@lr\space handle/.code = \pingu@color{sword@\@lr @handle}{##1},% |
| 2469 |
sword \@lr\space guard/.code = \pingu@color{sword@\@lr @guard}{##1},% |
| 2470 |
sword \@lr\space shade/.code = \pingu@color{sword@\@lr @shade}{##1},% |
| 2471 |
sword \@lr\space shade opacity/.code = \expandafter\def\csname pingu@sword@\@lr @shade@opa\endcsname{##1}, |
| 2472 |
sword \@lr\space length/.code = \expandafter\def\csname pingu@sword@\@lr @length\endcsname{##1}, |
| 2473 |
sword \@lr\space width/.code = \expandafter\def\csname pingu@sword@\@lr @width\endcsname{##1}, |
| 2474 |
}{sword \@lr\space handle length=3.65mm, sword \@lr\space handle=pingu@bronze!80!green!40!pingu@black, sword \@lr\space handle shift=-2mm, sword \@lr\space xshift=-0.5*\csname pingu@sword@\@lr @width\endcsname,sword \@lr\space yshift=-1mm,sword \@lr\space guard=\csname pingu@color@sword@\@lr @handle\endcsname!80!brown!50!black,sword \@lr\space shade=yellow!10!white,sword \@lr\space shade opacity=.3,sword \@lr\space length=14mm,sword \@lr\space width=.5mm} |
| 2475 |
\def\pingu@draw@wi@sword#1{% |
| 2476 |
\pingu@setup@wing{sword}{#1}% |
| 2477 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2478 |
% \csname pingu@color@sword#1\endcsname |
| 2479 |
\pingu@block{\csname pingu@color@sword@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@sword@#1@shift\endcsname) -- ++(\@sidesign*.1mm,\csname pingu@sword@#1@handle@length\endcsname) arc(180:0:\@sidesign*.3mm and .3mm) coordinate[pos=.5] (\pingu@name-sword-#1-top) -- ++(\@sidesign*.1mm,-\csname pingu@sword@#1@handle@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 2480 |
\pingu@block{\@col} ([yshift=-.15mm,xshift=-\csname pingu@sword@#1@width\endcsname-\csname pingu@sword@#1@width\endcsname-.16mm]\pingu@name-sword-#1-top) -- ++(\csname pingu@sword@#1@width\endcsname,\csname pingu@sword@#1@length\endcsname) -- ++(\csname pingu@sword@#1@width\endcsname+.16mm,1mm) -- ++(\csname pingu@sword@#1@width\endcsname+.16mm,-1mm) -- ++(\csname pingu@sword@#1@width\endcsname,-\csname pingu@sword@#1@length\endcsname) -- cycle; |
| 2481 |
\pingu@block[opacity=\csname pingu@sword@#1@shade@opa\endcsname]{\csname pingu@color@sword@#1@shade\endcsname} ([yshift=-.15mm,xshift=-\csname pingu@sword@#1@width\endcsname-\csname pingu@sword@#1@width\endcsname-.16mm]\pingu@name-sword-#1-top) -- ++(\csname pingu@sword@#1@width\endcsname,\csname pingu@sword@#1@length\endcsname) -- ++(\csname pingu@sword@#1@width\endcsname+.16mm,1mm) -- ++(0,-\csname pingu@sword@#1@length\endcsname-1mm) -- cycle; |
| 2482 |
\pingu@block[opacity=\csname pingu@sword@#1@shade@opa\endcsname]{\csname pingu@color@sword@#1@shade\endcsname} ([yshift=-.15mm+\csname pingu@sword@#1@length\endcsname,xshift=-\csname pingu@sword@#1@width\endcsname-.16mm]\pingu@name-sword-#1-top) -- ++(\csname pingu@sword@#1@width\endcsname+.16mm,1mm) -- ++(0,-1mm) -- cycle; |
| 2483 |
\pingu@block[line cap=round,rounded corners=.025mm]{\csname pingu@color@sword@#1@guard\endcsname} ([yshift=-.85mm,xshift=-.065mm]\pingu@name-sword-#1-top) coordinate (@) to[out=110,in=-30] ++(-2*\csname pingu@sword@#1@width\endcsname-1.5mm,1mm) -- ++(0,.25mm) to[out=-10,in=190] ++(4*\csname pingu@sword@#1@width\endcsname+3mm,0) -- ++(0,-.25mm) to[out=210,in=70] ([xshift=.13mm]@) -- cycle; |
| 2484 |
\endscope |
| 2485 |
} |
| 2486 |
|
| 2487 |
|
| 2488 |
\pingu@create@wing@extra{microphone}{% |
| 2489 |
microphone \@lr/.code = {\pingu@set@extra{microphone\@lr}{true}\pingu@color{microphone\@lr}{##1}}, |
| 2490 |
microphone \@lr/.default = pingu@silver!90!white, |
| 2491 |
microphone \@lr\space handle length/.code = \expandafter\def\csname pingu@microphone@\@lr @length\endcsname{##1}, |
| 2492 |
microphone \@lr\space handle shift/.code = \expandafter\def\csname pingu@microphone@\@lr @shift\endcsname{##1}, |
| 2493 |
microphone \@lr\space xshift/.code = \expandafter\def\csname pingu@microphone@\@lr @xshift\endcsname{##1}, |
| 2494 |
microphone \@lr\space yshift/.code = \expandafter\def\csname pingu@microphone@\@lr @yshift\endcsname{##1}, |
| 2495 |
microphone \@lr\space handle/.code = \pingu@color{microphone@\@lr @handle}{##1}% |
| 2496 |
}{microphone \@lr\space handle length=5.5mm, microphone \@lr\space handle=pingu@black!80!pingu@silver, microphone \@lr\space handle shift=-1.15mm, microphone \@lr\space xshift=-0.5*\csname pingu@microphone@\@lr @width\endcsname,microphone \@lr\space yshift=-1mm} |
| 2497 |
\def\pingu@draw@wi@microphone#1{% |
| 2498 |
\pingu@setup@wing{microphone}{#1}% |
| 2499 |
\scope[rotate around={\@angle+\@sidesign*9:(\pingu@name-wing-#1)}] |
| 2500 |
% \csname pingu@color@microphone#1\endcsname |
| 2501 |
\pingu@block{\csname pingu@color@microphone@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@microphone@#1@shift\endcsname) -- ++(\@sidesign*.1mm,\csname pingu@microphone@#1@length\endcsname) arc(180:0:\@sidesign*.5mm and .3mm) coordinate[pos=.5] (\pingu@name-microphone-#1-top) -- ++(\@sidesign*.1mm,-\csname pingu@microphone@#1@length\endcsname) arc(360:180:\@sidesign*.6mm and .3mm) -- cycle; |
| 2502 |
\pingu@block{\@col} ([yshift=.28mm]\pingu@name-microphone-#1-top) ellipse[x radius=1.15mm,y radius=1.1mm]; |
| 2503 |
\endscope |
| 2504 |
} |
| 2505 |
|
| 2506 |
\pingu@create@wing@extra{plank}{% |
| 2507 |
plank \@lr/.code = {\pingu@set@extra{plank\@lr}{true}\pingu@color{plank\@lr}{##1}}, |
| 2508 |
plank \@lr/.default = pingu@bronze!80!pingu@black, |
| 2509 |
plank \@lr\space width/.code = \expandafter\def\csname pingu@plank@\@lr @width\endcsname{##1}, |
| 2510 |
plank \@lr\space height/.code = \expandafter\def\csname pingu@plank@\@lr @height\endcsname{##1}, |
| 2511 |
plank \@lr\space xshift/.code = \expandafter\def\csname pingu@plank@\@lr @xshift\endcsname{##1}, |
| 2512 |
plank \@lr\space yshift/.code = \expandafter\def\csname pingu@plank@\@lr @yshift\endcsname{##1} |
| 2513 |
}{plank \@lr\space width=7mm,plank \@lr\space height=16.5mm, plank \@lr\space xshift=0mm,plank \@lr\space yshift=-1mm} |
| 2514 |
\def\pingu@draw@wi@plank#1{% |
| 2515 |
\pingu@setup@wing{plank}{#1}% |
| 2516 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2517 |
\pingu@block[rounded corners=2pt]{\@col}([xshift=\csname pingu@plank@#1@xshift\endcsname,yshift=\csname pingu@plank@#1@yshift\endcsname]\pingu@name-wing-#1)++({-.5*(\csname pingu@plank@#1@width\endcsname)},{-.5*(\csname pingu@plank@#1@height\endcsname)}) rectangle ++({\csname pingu@plank@#1@width\endcsname},{\csname pingu@plank@#1@height\endcsname}); |
| 2518 |
\endscope |
| 2519 |
} |
| 2520 |
|
| 2521 |
% \usetikzlibrary{spy} |
| 2522 |
|
| 2523 |
\pingu@create@wing@extra{magnifier}{% |
| 2524 |
magnifier \@lr/.code = {\pingu@set@extra{magnifier\@lr}{true}\pingu@color{magnifier\@lr}{##1}}, % \noexpand\tikzset{/pingu/@pingu/.append style={spy scope={circle,draw,magnification=4,size=1cm}}} |
| 2525 |
magnifier \@lr/.default = pingu@bronze, |
| 2526 |
magnifier \@lr\space handle length/.code = \expandafter\def\csname pingu@magnifier@\@lr @length\endcsname{##1}, |
| 2527 |
magnifier \@lr\space handle shift/.code = \expandafter\def\csname pingu@magnifier@\@lr @shift\endcsname{##1}, |
| 2528 |
magnifier \@lr\space size/.code = \expandafter\def\csname pingu@magnifier@\@lr @size\endcsname{##1}, |
| 2529 |
magnifier \@lr\space glass/.code = \pingu@color{magnifier@\@lr @glass}{##1}, |
| 2530 |
magnifier \@lr\space opacity/.code = \expandafter\def\csname pingu@magnifier@\@lr @opacity\endcsname{##1}, |
| 2531 |
magnifier \@lr\space thick/.code = \expandafter\def\csname pingu@magnifier@\@lr @thick\endcsname{##1}, |
| 2532 |
magnifier \@lr\space xshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @xshift\endcsname{##1}, |
| 2533 |
magnifier \@lr\space yshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @yshift\endcsname{##1}, |
| 2534 |
magnifier \@lr\space handle/.code = \pingu@color{magnifier@\@lr @handle}{##1}% |
| 2535 |
}{magnifier \@lr\space handle length=3.5mm, magnifier \@lr\space handle shift=-4mm, magnifier \@lr\space xshift=0mm,magnifier \@lr\space yshift=1mm,magnifier \@lr\space size=2.5mm,magnifier \@lr\space thick=.5mm,magnifier \@lr\space glass=pingu@blue!90!pingu@yellow,magnifier \@lr\space opacity=0.24} |
| 2536 |
\def\pingu@draw@wi@magnifier#1{% |
| 2537 |
\pingu@setup@wing{magnifier}{#1}% |
| 2538 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 2539 |
% \csname pingu@color@magnifier#1\endcsname |
| 2540 |
\path ([yshift=\csname pingu@magnifier@#1@yshift\endcsname+\csname pingu@magnifier@#1@size\endcsname,xshift=\csname pingu@magnifier@\@lr @xshift\endcsname]\pingu@name-wing-#1) coordinate (@); |
| 2541 |
|
| 2542 |
% \spy[draw=green] on (@) in node at (@); |
| 2543 |
% \pgfonlayer{foreground} |
| 2544 |
\pingu@block[even odd rule]{\@col} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname] circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname]; |
| 2545 |
|
| 2546 |
\pingu@block[opacity=\csname pingu@magnifier@#1@opacity\endcsname]{\csname pingu@color@magnifier@#1@glass\endcsname} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname]; |
| 2547 |
|
| 2548 |
\pingu@block{\@col} % TODO: adapt size |
| 2549 |
(@) ([shift={(-70:2.5mm)}]@) to[out=230,in=90] ++(-.5mm,-\csname pingu@magnifier@#1@length\endcsname) arc(360:180:.33mm) to[out=90,in=-50] ++(-.5mm,\csname pingu@magnifier@#1@length\endcsname);% |
| 2550 |
% \endpgfonlayer |
| 2551 |
\endscope |
| 2552 |
} |
| 2553 |
% #endregion |
| 2554 |
|
| 2555 |
% #region glasses-lib |
| 2556 |
\pingu@create@extra{glasses}{% |
| 2557 |
glasses/.code = \pingu@set@extra{glasses}{true}\pingu@color{glasses}{#1}, |
| 2558 |
glasses/.default = pingu@black, |
| 2559 |
glasses left fill/.code = \pingu@color{glasses@fill@l}{#1}, |
| 2560 |
glasses right fill/.code = \pingu@color{glasses@fill@r}{#1}, |
| 2561 |
glasses left opacity/.code = \def\pingu@x@glasses@op@l{#1}, |
| 2562 |
glasses right opacity/.code = \def\pingu@x@glasses@op@r{#1}, |
| 2563 |
glasses fill/.style = {/pingu/glasses left fill=#1, /pingu/glasses right fill=#1}, |
| 2564 |
glasses opacity/.style = {/pingu/glasses left opacity=#1, /pingu/glasses right opacity=#1}, |
| 2565 |
glasses line width/.code = \def\pingu@x@glasses@lw{#1}, |
| 2566 |
sunglasses/.forward to = /pingu/sun glasses, |
| 2567 |
glasses bend left/.code = \def\pingu@x@glasses@bend@l{#1}, |
| 2568 |
glasses bend right/.code = \def\pingu@x@glasses@bend@r{#1}, |
| 2569 |
glasses bend/.style = {/pingu/glasses bend left=#1,/pingu/glasses bend right=#1}, |
| 2570 |
sun glasses/.style = {/pingu/glasses, /pingu/glasses fill=#1}, |
| 2571 |
sun glasses/.default = pingu@black, |
| 2572 |
}{glasses line width=1.125\p@,glasses fill=\@pingu@none,glasses opacity=.825,glasses bend left=32.5,glasses bend right=32.5} |
| 2573 |
|
| 2574 |
\def\pingu@draw@ea@glasses{% fact: 1.33; modified first shift and ht |
| 2575 |
\pingu@block[opacity=\pingu@x@glasses@op@l]{\pingu@color@glasses@fill@l} (\pingu@name-eye-left)++(-2.66mm,1.75mm) to[bend left=8] ++(5.586mm,0) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] ++(-1.064mm,3.5mm) -- cycle; |
| 2576 |
\pingu@block[opacity=\pingu@x@glasses@op@r]{\pingu@color@glasses@fill@r} (\pingu@name-eye-right)++(2.66mm,1.75mm) to[bend right=8] ++(-5.586mm,0) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] ++(1.064mm,3.5mm) -- cycle; |
| 2577 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm](\pingu@name-eye-left)++(-2.66mm,1.75mm) coordinate (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) coordinate (\pingu@name-glasses-left-outer) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] coordinate[pos=.9] (\pingu@name-glasses-left-mid-b) ++(-1.064mm,3.5mm) -- cycle; |
| 2578 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm] (\pingu@name-eye-right)++(2.66mm,1.75mm) coordinate (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) coordinate (\pingu@name-glasses-right-outer) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] coordinate[pos=.9] (\pingu@name-glasses-right-mid-b) ++(1.064mm,3.5mm) -- cycle; |
| 2579 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid) to[bend right=10] (\pingu@name-glasses-left-mid); |
| 2580 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid-b) to[bend left=20] (\pingu@name-glasses-left-mid-b); |
| 2581 |
\scope |
| 2582 |
\clip[use path=\pingu@upperpingu]; |
| 2583 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} |
| 2584 |
(\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) -- ++(-5mm,.5mm); |
| 2585 |
\pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} |
| 2586 |
(\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) -- ++(5mm,.5mm); |
| 2587 |
\endscope |
| 2588 |
} |
| 2589 |
\pingu@create@extra{glassesround}{% |
| 2590 |
glasses round/.code = \pingu@set@extra{glassesround}{true}\pingu@color{glassesround}{#1}, |
| 2591 |
glasses round/.default = pingu@black, |
| 2592 |
glasses round left fill/.code = \pingu@color{glassesround@fill@l}{#1}, |
| 2593 |
glasses round right fill/.code = \pingu@color{glassesround@fill@r}{#1}, |
| 2594 |
glasses round fill/.style = {/pingu/glasses round left fill=#1, /pingu/glasses round right fill=#1}, |
| 2595 |
glasses round left opacity/.code = \def\pingu@x@glassesround@op@l{#1}, |
| 2596 |
glasses round right opacity/.code = \def\pingu@x@glassesround@op@r{#1}, |
| 2597 |
glasses round opacity/.style = {/pingu/glasses round left opacity=#1, /pingu/glasses round right opacity=#1}, |
| 2598 |
glasses round left radius/.code = \def\pingu@x@glassesround@r@l{#1}, |
| 2599 |
glasses round right radius/.code = \def\pingu@x@glassesround@r@r{#1}, |
| 2600 |
glasses round radius/.style = {/pingu/glasses round left radius=#1, /pingu/glasses round right radius=#1}, |
| 2601 |
glasses round line width/.code = \def\pingu@x@glassesround@lw{#1}, |
| 2602 |
sunglasses round/.forward to = /pingu/sun glasses round, |
| 2603 |
sun glasses round/.style = {/pingu/glasses round, /pingu/glasses round fill=#1}, |
| 2604 |
sun glasses round/.default = pingu@black, |
| 2605 |
% todo: width/radius allow for different |
| 2606 |
}{glasses round line width=.75\p@,glasses round fill=\@pingu@none,glasses round opacity=.825,glasses round radius=3.15mm} |
| 2607 |
\def\pingu@draw@ea@glassesround{% fact: 1.33; modified first shift and ht |
| 2608 |
\pingu@block[opacity=\pingu@x@glassesround@op@l]{\pingu@color@glassesround@fill@l} (\pingu@name-eye-left) circle [radius=\pingu@x@glassesround@r@l]; |
| 2609 |
\pingu@block[opacity=\pingu@x@glassesround@op@r]{\pingu@color@glassesround@fill@r} (\pingu@name-eye-right) circle [radius=\pingu@x@glassesround@r@r]; |
| 2610 |
\pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm](\pingu@name-eye-left) ++(150:\pingu@x@glassesround@r@l) coordinate (\pingu@name-glassesround-left-mid) arc (150:510:\pingu@x@glassesround@r@l); |
| 2611 |
\pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm] (\pingu@name-eye-right) ++(30:\pingu@x@glassesround@r@r) coordinate (\pingu@name-glassesround-right-mid) arc (30:390:\pingu@x@glassesround@r@r); |
| 2612 |
\pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} (\pingu@name-glassesround-left-mid) to[bend right=30] (\pingu@name-glassesround-right-mid); |
| 2613 |
\scope |
| 2614 |
\clip[use path=\pingu@upperpingu]; |
| 2615 |
\pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} |
| 2616 |
(\pingu@name-glassesround-right-mid) arc(30:150:\pingu@x@glassesround@r@l) -- ++(-5mm,.65mm); |
| 2617 |
\pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} |
| 2618 |
(\pingu@name-glassesround-left-mid) arc(150:30:\pingu@x@glassesround@r@r) -- ++(5mm,.65mm); |
| 2619 |
\endscope |
| 2620 |
} |
| 2621 |
\pingu@create@extra{monocleleft}{% |
| 2622 |
monocle left/.code = \pingu@set@extra{monocleleft}{true}\pingu@color{monocleleft}{#1}, |
| 2623 |
monocle left/.default = pingu@black, |
| 2624 |
monocle left glass/.code = \pingu@color{monocleleft@glass}{#1}, |
| 2625 |
monocle left fill/.forward to = /pingu/monocle left glass, |
| 2626 |
monocle left opacity/.code = \def\pingu@x@monocleleft@opacity{#1}, |
| 2627 |
monocle left fill opacity/.forward to = /pingu/monocle left opacity, |
| 2628 |
monocle left string/.code = \pingu@color{monocleleft@string}{#1}, |
| 2629 |
monocle left string length/.code= \def\pingu@x@monocleleft@string@l{#1}, |
| 2630 |
monocle left blob/.code = \pingu@color{monocleleft@blob}{#1}, |
| 2631 |
}{monocle left glass=pingu@blue,monocle left opacity=.155,monocle left string=\pingu@color@monocleleft,monocle left blob=\pingu@color@monocleleft,monocle left string length=5.55mm} |
| 2632 |
|
| 2633 |
\def\pingu@draw@eb@monocle@l{% |
| 2634 |
\pingu@block[/pingu/glow,opacity=\pingu@x@monocleleft@opacity]{\pingu@color@monocleleft@glass} (\pingu@name-eye-left) circle[radius=2mm]; |
| 2635 |
\pingu@draw[thin]{\pingu@color@monocleleft@string} (\pingu@name-eye-left)++(2mm,0) |
| 2636 |
to[out=-75,in=100] ++(0,-\pingu@x@monocleleft@string@l); |
| 2637 |
\pingu@block{\pingu@color@monocleleft@blob} (\pingu@name-eye-left)++(2mm,-\pingu@x@monocleleft@string@l) circle [radius=.65\p@]; |
| 2638 |
\pingu@draw[semithick]{\pingu@color@monocleleft} (\pingu@name-eye-left) circle[radius=2mm]; |
| 2639 |
} |
| 2640 |
\pingu@create@extra{monocleright}{% |
| 2641 |
monocle right/.code = \pingu@set@extra{monocleright}{true}\pingu@color{monocleright}{#1}, |
| 2642 |
monocle right/.default = pingu@black, |
| 2643 |
monocle right glass/.code = \pingu@color{monocleright@glass}{#1}, |
| 2644 |
monocle right fill/.forward to = /pingu/monocle right glass, |
| 2645 |
monocle right opacity/.code = \def\pingu@x@monocleright@opacity{#1}, |
| 2646 |
monocle right fill opacity/.forward to = /pingu/monocle right opacity, |
| 2647 |
monocle right string/.code = \pingu@color{monocleright@string}{#1}, |
| 2648 |
monocle right string length/.code= \def\pingu@x@monocleright@string@r{#1}, |
| 2649 |
monocle right blob/.code = \pingu@color{monocleright@blob}{#1}, |
| 2650 |
}{monocle right glass=pingu@blue,monocle right opacity=.155,monocle right string=\pingu@color@monocleright,monocle right blob=\pingu@color@monocleright,monocle right string length=5.55mm} |
| 2651 |
\def\pingu@draw@eb@monocle@r{% |
| 2652 |
\pingu@block[/pingu/glow,opacity=\pingu@x@monocleright@opacity]{\pingu@color@monocleright@glass} (\pingu@name-eye-right) circle[radius=2mm]; |
| 2653 |
\pingu@draw[thin]{\pingu@color@monocleright@string} (\pingu@name-eye-right)++(-2mm,0) |
| 2654 |
to[out=-105,in=80] ++(0,-\pingu@x@monocleright@string@r); |
| 2655 |
\pingu@block{\pingu@color@monocleright@blob} (\pingu@name-eye-right)++(-2mm,-\pingu@x@monocleright@string@r) circle [radius=.65\p@]; |
| 2656 |
\pingu@draw[semithick]{\pingu@color@monocleright} (\pingu@name-eye-right) circle[radius=2mm]; |
| 2657 |
} |
| 2658 |
% #endregion |
| 2659 |
|
| 2660 |
% #region hats-lib |
| 2661 |
\pingu@create@extra{strawhat}{% |
| 2662 |
% extra strawhat (tikzducks basis) |
| 2663 |
straw hat/.forward to = /pingu/strawhat, |
| 2664 |
strawhat/.default = brown!50!white, |
| 2665 |
strawhat/.code = \pingu@set@extra{strawhat}{true}\pingu@color{strawhat}{#1}, |
| 2666 |
straw hat ribbon/.forward to = /pingu/strawhat ribbon, |
| 2667 |
strawhat ribbon/.code = \pingu@color{strawhat@ribbon}{#1}, |
| 2668 |
straw hat position/.forward to= /pingu/strawhat position, |
| 2669 |
strawhat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@strawhat@angle{#1}\def\pingu@x@strawhat@xshift{#2}\def\pingu@x@strawhat@yshift{#3}\def\pingu@x@strawhat@scale{#4}}, |
| 2670 |
}{strawhat ribbon= gray!85!black,strawhat position={-26.5:(-.185cm,.14cm){1.375}}} |
| 2671 |
|
| 2672 |
\def\pingu@draw@ea@strawhat{% |
| 2673 |
\scope[rotate around={\pingu@x@strawhat@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@strawhat@xshift,\pingu@x@strawhat@yshift)},scale=\pingu@x@strawhat@scale] |
| 2674 |
\pingu@block{\pingu@color@strawhat} (.34cm,0) ellipse[x radius=.75cm, y radius=\pingu@one]; |
| 2675 |
\pingu@block{\pingu@color@strawhat} (0,.5mm) rectangle (.68cm,5mm); |
| 2676 |
\pingu@block{\pingu@color@strawhat} (.34cm,5mm) ellipse[x radius=.34cm, y radius=.8mm]; |
| 2677 |
\pingu@block{\pingu@color@strawhat} (-.3955cm,.2mm) -- (1.0755cm,.2mm) -- (.68cm,2mm) -- (0,2mm) -- cycle; |
| 2678 |
\pingu@block{\pingu@color@strawhat@ribbon} (.34cm,2mm) ellipse[x radius=.34cm, y radius=.8mm]; |
| 2679 |
\pingu@block{\pingu@color@strawhat@ribbon} (0,2mm) rectangle (.68cm,3mm); |
| 2680 |
\pingu@block{\pingu@color@strawhat} (.34cm,3mm) ellipse[x radius=.34cm, y radius=.8mm]; |
| 2681 |
\endscope} |
| 2682 |
|
| 2683 |
\pingu@create@extra{hat}{% |
| 2684 |
hat/.default = pingu@black!90!black, |
| 2685 |
hat/.code = \pingu@set@extra{hat}{true}\pingu@color{hat}{#1}, |
| 2686 |
hat base/.code = \pingu@color{hat@base}{#1}, |
| 2687 |
hat coronal/.code = \pingu@color{hat@coronal}{#1}, |
| 2688 |
hat ribbon/.code = \pingu@color{hat@ribbon}{#1}, |
| 2689 |
hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@hat@angle{#1}\def\pingu@x@hat@xshift{#2}\def\pingu@x@hat@yshift{#3}\def\pingu@x@hat@scale{#4}}, |
| 2690 |
}{hat position={-2:(.35mm,0)1},hat base=\pingu@color@hat,hat coronal=\pingu@color@hat!91!white,hat ribbon=\pingu@color@hat!87!white} |
| 2691 |
|
| 2692 |
\newdimen\pingu@hat@w@half \pingu@hat@w@half=.925cm |
| 2693 |
\newdimen\pingu@hat@h \pingu@hat@h=.625cm |
| 2694 |
\def\pingupathhatupper{[rounded corners=.25mm](-.65cm,-.25cm) to[out=90,in=200] ++(.35cm,\pingu@hat@h) to[bend left=11] ++(.25cm,0) to[bend right=2.5] ++(\pingu@one,0) to[bend left=11] ++(.25cm,0) to[out=-20,in=90] ++(.35cm,-\pingu@hat@h) to[bend left=12] (-.65cm,-.25cm) -- cycle} |
| 2695 |
\def\pingu@draw@ea@hat{% |
| 2696 |
\scope[rotate around={\pingu@x@hat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@hat@xshift,\pingu@x@hat@yshift)},scale=\pingu@x@hat@scale] |
| 2697 |
\pingu@block[/pingu/@draw=\pingu@color@hat@coronal,thick]{\pingu@color@hat@base} (0,-.25cm)++(180:\pingu@hat@w@half{} and .15cm) arc (180:360:\pingu@hat@w@half{} and .15cm) arc (0:180:\pingu@hat@w@half{} and .115cm) -- cycle; |
| 2698 |
\pingu@block{\pingu@color@hat} \pingupathhatupper; |
| 2699 |
\scope |
| 2700 |
\clip\pingupathhatupper; |
| 2701 |
\pingu@block{\pingu@color@hat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm]; |
| 2702 |
\pingu@block{\pingu@color@hat} (\z@,.134cm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm]; |
| 2703 |
\endscope\endscope} |
| 2704 |
|
| 2705 |
% TODO: tassel |
| 2706 |
\pingu@create@extra{graduate}{% |
| 2707 |
graduate cap/.forward to = /pingu/graduate, |
| 2708 |
graduate/.default = pingu@black!95!white, |
| 2709 |
graduate/.code = \pingu@set@extra{graduate}{true}\pingu@color{graduate}{#1}, |
| 2710 |
graduate cap top/.forward to = /pingu/graduate top, |
| 2711 |
graduate top/.code = \pingu@color{graduate@top}{#1}, |
| 2712 |
graduate cap tilt/.forward to = /pingu/graduate tilt, |
| 2713 |
graduate tilt/.code = \def\pingu@x@graduate@tilt{#1}, |
| 2714 |
graduate cap tassel/.forward to = /pingu/graduate tassel, |
| 2715 |
graduate tassel/.code = \pingu@color{graduate@tassel}{#1}, |
| 2716 |
graduate tassel/.default = pingu@red!65!black, |
| 2717 |
graduate cap tassel drop/.forward to = /pingu/graduate tassel drop, |
| 2718 |
graduate tassel drop/.code = \pingu@color{graduate@tassel@drop}{#1}, |
| 2719 |
graduate cap tassel start/.forward to = /pingu/graduate tassel start, |
| 2720 |
graduate tassel start/.code = \def\pingu@x@tassel@start{#1}, |
| 2721 |
graduate cap tassel width/.forward to = /pingu/graduate tassel width, |
| 2722 |
graduate tassel width/.code = \def\pingu@x@tassel@width{#1}, |
| 2723 |
graduate cap tassel length/.forward to = /pingu/graduate length, |
| 2724 |
graduate tassel length/.code = \def\pingu@x@tassel@length{#1}, |
| 2725 |
graduate cap tassel drop size/.forward to = /pingu/graduate drop size, |
| 2726 |
graduate tassel drop size/.code = \def\pingu@x@tassel@drop@size{#1}, |
| 2727 |
graduate cap position/.forward to = /pingu/graduate position, |
| 2728 |
graduate position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@graduate@angle{#1}\def\pingu@x@graduate@xshift{#2}\def\pingu@x@graduate@yshift{#3}\def\pingu@x@graduate@scale{#4}}, |
| 2729 |
}{graduate position={-27:(-.19cm,.14cm){1.375}}, graduate top=\pingu@color@graduate!95!white,graduate tilt=2.33mm,graduate tassel=\@pingu@none, graduate tassel width=.5mm, graduate tassel length=5.5mm,graduate tassel drop size=.75*\pingu@x@tassel@width,graduate tassel drop=\pingu@color@graduate@tassel,graduate cap tassel start={(.55cm,3.5mm-\pingu@x@graduate@tilt)}} % ; tassel color to hide |
| 2730 |
|
| 2731 |
\def\pingu@draw@ea@graduate{% |
| 2732 |
\scope[rotate around={\pingu@x@graduate@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@graduate@xshift,\pingu@x@graduate@yshift)},scale=\pingu@x@graduate@scale] |
| 2733 |
\pingu@block{\pingu@color@graduate} (0,1mm) rectangle (.75cm,3.5mm); |
| 2734 |
\pingu@block{\pingu@color@graduate} (.375cm,1mm) ellipse[x radius=.375cm, y radius=.8mm]; |
| 2735 |
\pingu@block[rounded corners=.33mm]{\pingu@color@graduate@top} (-3mm,3.5mm) |
| 2736 |
% minor slant for visuals |
| 2737 |
-- ++(.675cm + .1mm,\pingu@x@graduate@tilt) -- (1.05cm,3.5mm) -- ++(-.675cm - .1mm,-\pingu@x@graduate@tilt) -- cycle; |
| 2738 |
% counter rotation |
| 2739 |
\scope[rotate around={-\pingu@x@graduate@angle:(\pingu@name-head)}] |
| 2740 |
\pingu@draw[line width=\pingu@x@tassel@width]{\pingu@color@graduate@tassel} \pingu@x@tassel@start to[out=-45,in=90] ++(.2*\pingu@x@tassel@length,-\pingu@x@tassel@length) coordinate(@); |
| 2741 |
\pingu@block{\pingu@color@graduate@tassel@drop} (@) circle[x radius=\pingu@x@tassel@drop@size, y radius=1.75*\pingu@x@tassel@drop@size]; |
| 2742 |
\endscope |
| 2743 |
\endscope} |
| 2744 |
|
| 2745 |
\pingu@create@extra{cap}{% |
| 2746 |
cap/.default = pingu@bronze, |
| 2747 |
cap/.code = \pingu@set@extra{cap}{true}\pingu@color{cap}{#1}, |
| 2748 |
cap padding/.code = {\def\pingu@x@cap@padding{#1}}, |
| 2749 |
cap extra height/.code = {\def\pingu@x@cap@height{#1}}, |
| 2750 |
}{cap padding=.8mm, cap extra height=0pt} |
| 2751 |
|
| 2752 |
\def\pingu@draw@ea@cap{% |
| 2753 |
\pingu@layer{foreground}[] |
| 2754 |
\pingu@block[rounded corners=.7mm]{\pingu@color@cap} ([xshift=.25mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-left) to[bend right=3] |
| 2755 |
([yshift=\pingu@x@cap@height]\pingu@name-head) |
| 2756 |
to[bend right=3] |
| 2757 |
([xshift=\pingu@x@cap@padding]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=4] ([xshift=-.25mm]\pingu@name-wing-right-start) |
| 2758 |
to[bend left=8] |
| 2759 |
([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-right) |
| 2760 |
[rounded corners=.15mm] |
| 2761 |
to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,\pingu@w@half+\pingu@one) |
| 2762 |
to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,-\pingu@w@half-\pingu@one) |
| 2763 |
to[bend left=8] cycle; |
| 2764 |
\endpingu@layer |
| 2765 |
} |
| 2766 |
|
| 2767 |
\pingu@create@extra{constructionhelmet}{% |
| 2768 |
construction helmet/.default = pingu@yellow, |
| 2769 |
construction helmet/.code = \pingu@set@extra{constructionhelmet}{true}\pingu@color{constructionhelmet}{#1}, |
| 2770 |
construction helmet padding/.code = {\def\pingu@x@constructionhelmet@padding{#1}}, |
| 2771 |
construction helmet extra height/.code = {\def\pingu@x@constructionhelmet@height{#1}}, |
| 2772 |
construction helmet position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@constructionhelmet@angle{#1}\def\pingu@x@constructionhelmet@xshift{#2}\def\pingu@x@constructionhelmet@yshift{#3}\def\pingu@x@constructionhelmet@scale{#4}}, |
| 2773 |
}{construction helmet padding=.325cm, construction helmet extra height=0pt,construction helmet position={-.5:(.05mm,-1.25mm)1}} |
| 2774 |
|
| 2775 |
\newdimen\pingu@constructionhelmet@w@half \pingu@constructionhelmet@w@half=.85cm |
| 2776 |
\def\pingu@draw@ea@constructionhelmet{% |
| 2777 |
\scope[rotate around={\pingu@x@constructionhelmet@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@constructionhelmet@xshift,\pingu@x@constructionhelmet@yshift)},scale=\pingu@x@constructionhelmet@scale] |
| 2778 |
\pingu@block{\pingu@color@constructionhelmet} (0,-.25cm)++(180:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (180:360:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (0:180:\pingu@constructionhelmet@w@half{} and .2cm) -- cycle; |
| 2779 |
\scope |
| 2780 |
\pingu@block{\pingu@color@constructionhelmet!93!pingu@black} (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) coordinate[pos=.212] (@a) coordinate[pos=.256] (@aa) coordinate[pos=.788] (@b) coordinate[pos=.744] (@bb) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle; |
| 2781 |
\clip (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle; |
| 2782 |
\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm-.125cm) to[bend left=1] ++ (0,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=1] ++(0,-.675cm-.125cm) -- cycle; |
| 2783 |
\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.95mm,-.25cm-.125cm) to[bend left=3] ++ (-8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=3] ++(8mm,-.675cm-.125cm) -- cycle; |
| 2784 |
\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.55mm,-.25cm-.125cm) to[bend right=3] ++ (8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend left=3] ++(-8mm,-.675cm-.125cm) -- cycle; |
| 2785 |
\endscope |
| 2786 |
% get the 3d wobbles |
| 2787 |
\pingu@block[rounded corners=.03mm]{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm+.675cm-.25mm) -- ++(0,.3mm) -| ++(1.5mm,-.3mm) -- cycle; |
| 2788 |
\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@a) to[bend right=14] (@aa); |
| 2789 |
\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@bb) to[bend right=14] (@b); |
| 2790 |
\endscope |
| 2791 |
} |
| 2792 |
|
| 2793 |
\pingu@create@extra{conicalhat}{% |
| 2794 |
conical hat/.default = pingu@bronze, |
| 2795 |
conical hat/.code = \pingu@set@extra{conicalhat}{true}\pingu@color{conicalhat}{#1}, |
| 2796 |
conical hat rounding/.code = {\def\pingu@x@conicalhat@rounding{#1}}, |
| 2797 |
conical hat shade/.code = {\def\pingu@x@conicalhat@shade{#1}}, |
| 2798 |
conical hat height/.code = {\def\pingu@x@conicalhat@height{#1}}, |
| 2799 |
conical hat width/.code = {\def\pingu@x@conicalhat@width{#1}}, |
| 2800 |
conical hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@conicalhat@angle{#1}\def\pingu@x@conicalhat@xshift{#2}\def\pingu@x@conicalhat@yshift{#3}\def\pingu@x@conicalhat@scale{#4}}, |
| 2801 |
}{conical hat position={-15:(2mm,-3mm)1}, conical hat height=8mm, conical hat width=2.25cm,conical hat shade=\pingu@color@conicalhat!80!pingu@black, conical hat rounding=.4pt} |
| 2802 |
|
| 2803 |
\def\pingu@draw@ea@conicalhat{% |
| 2804 |
\scope[rotate around={\pingu@x@conicalhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@conicalhat@xshift,\pingu@x@conicalhat@yshift)},scale=\pingu@x@conicalhat@scale] |
| 2805 |
|
| 2806 |
\pingu@layer{background}[] |
| 2807 |
\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@x@conicalhat@shade} (0,-.22cm)++(180:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) coordinate (@) arc (180:360:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) -- ++(.15mm,.3mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@[email protected]) to[bend right=5] ([xshift=-.15mm,yshift=.3mm]@) -- cycle; |
| 2808 |
\endpingu@layer |
| 2809 |
|
| 2810 |
\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@color@conicalhat} (0,-.25cm)++(180:\pingu@x@conicalhat@width/2 and 1mm) coordinate (@) arc (180:0:\pingu@x@conicalhat@width/2 and 1mm) -- ++(.225mm,.6mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@conicalhat@height) to[bend right=5] ([xshift=-.225mm,yshift=.6mm]@) -- cycle; |
| 2811 |
\endscope |
| 2812 |
} |
| 2813 |
|
| 2814 |
\pingu@create@extra{detectivecap}{% |
| 2815 |
detective cap/.default = pingu@bronze!60!lightgray!95!green, |
| 2816 |
detective cap/.code = \pingu@set@extra{detectivecap}{true}\pingu@color{detectivecap}{#1}, |
| 2817 |
detective cap padding/.code = {\def\pingu@x@detectivecap@padding{#1}}, |
| 2818 |
detective cap position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@detectivecap@angle{#1}\def\pingu@x@detectivecap@xshift{#2}\def\pingu@x@detectivecap@yshift{#3}\def\pingu@x@detectivecap@scale{#4}}, |
| 2819 |
}{detective cap padding=.3cm, detective cap position={-.5:(0mm,-1.25mm)1}} |
| 2820 |
|
| 2821 |
\newdimen\pingu@detectivecap@w@half \pingu@detectivecap@w@half=.85cm |
| 2822 |
\def\pingu@draw@ea@detectivecap{% |
| 2823 |
\pgfonlayer{foreground} |
| 2824 |
\scope[rotate around={\pingu@x@detectivecap@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@detectivecap@xshift,\pingu@x@detectivecap@yshift)},scale=\pingu@x@detectivecap@scale] |
| 2825 |
\pingu@block[draw=\pingu@color@detectivecap!90!pingu@black]{\pingu@color@detectivecap} (0,-.25cm)++(180:\pingu@detectivecap@w@half{} and \pingu@x@detectivecap@padding) coordinate (@rs) |
| 2826 |
to[out=-110,in=-65,looseness=.665] |
| 2827 |
++(2*\pingu@detectivecap@w@half,0) |
| 2828 |
% arc (180:360:\pingu@detectivecap@w@half{} and \pingu@x@detectivecap@padding) |
| 2829 |
to[bend right=65,looseness=.5] cycle; |
| 2830 |
\scope |
| 2831 |
\clip (0,-.25cm)++(180:\pingu@detectivecap@w@half{} and \pingu@x@detectivecap@padding) to[out=-110,in=-65,looseness=.665] ++(2*\pingu@detectivecap@w@half,0) to[bend right=65,looseness=.5] cycle; |
| 2832 |
\foreach \i in {1,3,...,100} { |
| 2833 |
\pingu@draw[thin]{\pingu@color@detectivecap!92!pingu@black} (@rs)++(\i*0.13mm-3mm,-\i*0.13mm) to[bend right=14] ++(1cm,1cm); |
| 2834 |
% 90° |
| 2835 |
\pingu@draw[thin]{\pingu@color@detectivecap!92!pingu@black} (@rs)++(\i*0.13mm-3mm,\i*0.13mm+2mm) to[bend right=14] ++(2cm,-2cm); |
| 2836 |
} |
| 2837 |
\endscope |
| 2838 |
\pingu@draw{\pingu@color@detectivecap!90!pingu@black} (0,-.25cm)++(180:\pingu@detectivecap@w@half{} and \pingu@x@detectivecap@padding) coordinate (@rs) |
| 2839 |
to[out=-110,in=-65,looseness=.665] |
| 2840 |
++(2*\pingu@detectivecap@w@half,0) |
| 2841 |
% arc (180:360:\pingu@detectivecap@w@half{} and \pingu@x@detectivecap@padding) |
| 2842 |
to[bend right=65,looseness=.5] cycle; |
| 2843 |
\pingu@block{\pingu@color@detectivecap!93!pingu@black} (0,-.25cm)++(0:{.95\pingu@detectivecap@w@half} and .675cm) coordinate (@start) arc (0:180:{.95\pingu@detectivecap@w@half} and .675cm) foreach \i in {1,...,100} { coordinate[pos=1/100*\i] (@s\i) } coordinate[pos=.5] (@top) coordinate (@end) arc (180:360:{.95\pingu@detectivecap@w@half} and .125cm) -- cycle; |
| 2844 |
\scope |
| 2845 |
\clip (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle; |
| 2846 |
\path (@start)--(@end) foreach \i in {1,...,100} { coordinate[pos=1/100*\i] (@\i) }; |
| 2847 |
\foreach \i in {1,3,...,99} { |
| 2848 |
\pingu@draw{\pingu@color@detectivecap!85!pingu@black} (@\i)++(0,{-1.5mm-abs(\i-50)*1/1.5mm}) to[out=90,in=-90-(\i-50)] ++(0,1cm); |
| 2849 |
} |
| 2850 |
\foreach \i in {53,55,...,99} { |
| 2851 |
\pgfmathsetmacro\other{100-\i} |
| 2852 |
\pingu@draw{\pingu@color@detectivecap!85!pingu@black} (@s\i)++(-1mm,0) to[bend right=6+\i/20] ([xshift=1mm]@s\other); |
| 2853 |
} |
| 2854 |
\endscope |
| 2855 |
\scope[transform canvas={yshift=.35mm}] |
| 2856 |
\pingu@block[rounded corners=.5pt]{\pingu@color@detectivecap!85!pingu@black} (@top)++(-.3mm,-.85mm) rectangle ++(.6mm,.85mm); |
| 2857 |
\pingu@block[even odd rule]{\pingu@color@detectivecap!82!pingu@black} (@top) to[out=40,in=110] ++(4mm,1mm) |
| 2858 |
to[out=-70,in=-20] ++(-4mm,-1.5mm) to[bend left=55] cycle ([xshift=.5mm]@top) to[out=40,in=110] ++(2.55mm,.5mm) |
| 2859 |
to[out=-70,in=-20] [rounded corners=1pt] ++(-2.85mm,-.835mm) -- cycle; |
| 2860 |
\pingu@block[even odd rule]{\pingu@color@detectivecap!82!pingu@black} (@top) to[out=180-40,in=180-110] ++(-3.6mm,1mm) |
| 2861 |
to[out=-110,in=-160] ++(3.6mm,-1.5mm) to[bend right=55] cycle ([xshift=-.5mm]@top) to[out=140,in=70] ++(-2.55mm,.5mm) to[out=-110,in=-160] [rounded corners=1pt] ++(2.55mm,-.75mm) -- cycle; |
| 2862 |
\endscope |
| 2863 |
\endscope |
| 2864 |
\endpgfonlayer |
| 2865 |
} |
| 2866 |
|
| 2867 |
\pingu@create@extra{spacehelmet}{% |
| 2868 |
space helmet/.default = pingu@black!45!white, |
| 2869 |
space helmet/.code = \pingu@set@extra{spacehelmet}{true}\pingu@color{spacehelmet}{#1}, |
| 2870 |
space helmet glass/.code= \pingu@color{spacehelmet@glass}{#1}, |
| 2871 |
space helmet glass opacity/.code = \def\pingu@x@spacehelmet@glass@opacity{#1}, |
| 2872 |
space helmet position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@spacehelmet@angle{#1}\def\pingu@x@spacehelmet@xshift{#2}\def\pingu@x@spacehelmet@yshift{#3}\def\pingu@x@spacehelmet@scale{#4}}, |
| 2873 |
}{space helmet position={-2:(.35mm,0)1},space helmet glass=pingu@blue!40!pingu@yellow!50!white,space helmet glass opacity=.33} |
| 2874 |
|
| 2875 |
\newdimen\pingu@spacehelmet@w@half \pingu@spacehelmet@w@half=.935cm |
| 2876 |
\newdimen\pingu@spacehelmet@h \pingu@spacehelmet@h=1.125cm |
| 2877 |
\def\pingu@draw@ea@spacehelmet{% |
| 2878 |
\scope[rotate around={\pingu@x@spacehelmet@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@spacehelmet@xshift,\pingu@x@spacehelmet@yshift)},scale=\pingu@x@spacehelmet@scale] |
| 2879 |
\pingu@block[opacity=\pingu@x@spacehelmet@glass@opacity]{\pingu@color@spacehelmet@glass} (\pingu@name-head-center) ellipse [x radius=.9\pingu@spacehelmet@w@half, y radius=.45\pingu@spacehelmet@h]; |
| 2880 |
|
| 2881 |
\pingu@block[/pingu/@draw=\pingu@color@spacehelmet,thick, even odd rule]{\pingu@color@spacehelmet} |
| 2882 |
([yshift=-1mm]\pingu@name-wings-side-right) to[bend right=57] ([yshift=-1mm]\pingu@name-wings-side-left) |
| 2883 |
arc (0:180:\pingu@spacehelmet@w@half{} and \pingu@spacehelmet@h) -- cycle |
| 2884 |
(\pingu@name-head-center) ellipse [x radius=.9\pingu@spacehelmet@w@half, y radius=.45\pingu@spacehelmet@h]; |
| 2885 |
\endscope} |
| 2886 |
|
| 2887 |
\pingu@create@extra{witchhat}{% |
| 2888 |
witch hat/.code = \pingu@set@extra{witchhat}{true}\pingu@color{witchhat}{#1}, |
| 2889 |
witch hat/.default = pingu@purple!40!black, |
| 2890 |
witch hat base/.code = \pingu@color{witchhat@base}{#1}, |
| 2891 |
witch hat coronal/.code = \pingu@color{witchhat@coronal}{#1}, |
| 2892 |
witch hat ribbon/.code = \pingu@color{witchhat@ribbon}{#1}, |
| 2893 |
witch hat band/.code = \pingu@color{witchhat@band}{#1}, |
| 2894 |
witch hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@witchhat@angle{#1}\def\pingu@x@witchhat@xshift{#2}\def\pingu@x@witchhat@yshift{#3}\def\pingu@x@witchhat@scale{#4}}, |
| 2895 |
}{witch hat position={-7:(.625mm,.45mm){1.15}},witch hat base=\pingu@color@witchhat,witch hat coronal=\pingu@color@witchhat!91!white,witch hat ribbon=\pingu@color@witchhat!87!white,witch hat band=!hide} |
| 2896 |
|
| 2897 |
\newdimen\pingu@witchhat@w@half \pingu@witchhat@w@half=1.125cm |
| 2898 |
\newdimen\pingu@witchhat@h \pingu@witchhat@h=1.3cm |
| 2899 |
\def\pingupathwitchhatupper{[rounded corners=.65mm](-.625cm,-.25cm) -- ++(.8cm,\pingu@[email protected]) -- ++(6.5mm,4.5mm) -- ++(-1.5mm,-4.5mm) -- ++(-1.25mm,-\pingu@witchhat@h+4.5mm)} |
| 2900 |
\def\pingu@draw@ea@witchhat{% |
| 2901 |
\scope[rotate around={\pingu@x@witchhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@witchhat@xshift,\pingu@x@witchhat@yshift)},scale=\pingu@x@witchhat@scale] |
| 2902 |
\pingu@draw[semithick]{\pingu@color@witchhat@band} (-.615cm,-.25cm) to[out=-100,in=180] ++(.5cm,-1.1cm) to[bend right=5] ++(3.5mm,.1mm) to[out=0,in=-78] ++(.433cm,1.1cm); |
| 2903 |
\pingu@block[/pingu/@draw=\pingu@color@witchhat@coronal,thick]{\pingu@color@witchhat@base} (0,-.25cm)++(180:\pingu@witchhat@w@half{} and .15cm) arc (180:360:\pingu@witchhat@w@half{} and .15cm) arc (0:180:\pingu@witchhat@w@half{} and .115cm) -- cycle; |
| 2904 |
\pingu@block{\pingu@color@witchhat} \pingupathwitchhatupper; |
| 2905 |
\clip\pingupathwitchhatupper; |
| 2906 |
\pingu@block{\pingu@color@witchhat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm]; |
| 2907 |
\pingu@block{\pingu@color@witchhat} (\z@,.134cm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm]; |
| 2908 |
\endscope |
| 2909 |
} |
| 2910 |
|
| 2911 |
|
| 2912 |
\pingu@create@extra{mitra}{% |
| 2913 |
mitra/.default = pingu@red!67!pingu@black,%pingu@black!90!black, |
| 2914 |
mitra/.code = \pingu@set@extra{mitra}{true}\pingu@color{mitra}{#1}, |
| 2915 |
mitra height/.code = {\def\pingu@x@mitra@height{#1}}, |
| 2916 |
mitra background/.code = \pingu@color{mitra@background}{#1}, |
| 2917 |
mitra overset/.code = {\def\pingu@x@mitra@overset{#1}}, |
| 2918 |
mitra lower angle/.code = {\def\pingu@x@mitra@lowerangle{#1}}, |
| 2919 |
mitra upper angle/.code = {\def\pingu@x@mitra@upperangle{#1}}, |
| 2920 |
mitra lower band/.code = \pingu@color{mitra@lower@band}{#1}, |
| 2921 |
mitra lower band height/.code = {\def\pingu@x@mitra@lowerband@height{#1}}, |
| 2922 |
mitra upper band/.code = \pingu@color{mitra@upper@band}{#1}, |
| 2923 |
mitra upper band height/.code = {\def\pingu@x@mitra@upperband@height{#1}}, |
| 2924 |
mitra center band/.code = \pingu@color{mitra@center@band}{#1}, |
| 2925 |
mitra center band width/.code = {\def\pingu@x@mitra@centerband@width{#1}}, |
| 2926 |
mitra position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@mitra@angle{#1}\def\pingu@x@mitra@xshift{#2}\def\pingu@x@mitra@yshift{#3}\def\pingu@x@mitra@scale{#4}}, |
| 2927 |
}{mitra position={0:(0,0)1},mitra height=1.125cm,mitra overset=1.25mm,mitra lower angle=125,mitra upper angle=-35,mitra lower band=pingu@yellow!75!pingu@black,mitra center band=\pingu@color@mitra@lower@band,mitra lower band height=.2,mitra center band width={2*\pingu@x@mitra@lowerband@height},mitra upper band=\pingu@color@mitra@lower@band,mitra upper band height={1.5*\pingu@x@mitra@lowerband@height},mitra background=\pingu@color@mitra!80!pingu@black} |
| 2928 |
|
| 2929 |
\newdimen\pingu@mitra@w@half \pingu@mitra@w@half=.625cm |
| 2930 |
\def\pingu@x@mitra@path{(0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,.7*\pingu@x@mitra@height) |
| 2931 |
to[out=180-\pingu@x@mitra@upperangle,in=180-\pingu@x@mitra@lowerangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,-.7*\pingu@x@mitra@height) [sharp corners] -- cycle} |
| 2932 |
\def\pingu@draw@ea@mitra{% |
| 2933 |
\scope[rotate around={\pingu@x@mitra@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@mitra@xshift,\pingu@x@mitra@yshift)},scale=\pingu@x@mitra@scale] |
| 2934 |
\pingu@block{\pingu@color@mitra@background} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@[email protected],.7*\pingu@x@[email protected]) |
| 2935 |
to[out=180-\pingu@x@mitra@upperangle+2,in=180-\pingu@x@mitra@lowerangle-2] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half+.66mm,-.7*\pingu@x@mitra@height+.1mm) [sharp corners] -- cycle; |
| 2936 |
\pingu@block{\pingu@color@mitra} \pingu@x@mitra@path; |
| 2937 |
% \pingu@block{\pingu@color@mitra} \pingupathmitraupper; |
| 2938 |
\scope\clip\pingu@x@mitra@path; |
| 2939 |
% TODO: switch to factors non relative to \pingu@x@mitra@overset |
| 2940 |
\pingu@block{\pingu@color@mitra@lower@band} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) -- ++(\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset,\pingu@x@mitra@lowerband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle; |
| 2941 |
\pingu@block{\pingu@color@mitra@center@band} (\pingu@x@mitra@centerband@width*\pingu@x@mitra@overset+.1mm,-.2185cm) to[bend right=4] ++(0,\pingu@x@mitra@height) to[bend right] ++(-2*\pingu@x@mitra@centerband@width*\pingu@x@[email protected],0) to[bend left=4] ++(0,-\pingu@x@mitra@height) -- cycle; |
| 2942 |
\pingu@block{\pingu@color@mitra@upper@band} (0,.3*\pingu@x@[email protected]*\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height)++(180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) arc (180:360:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- ++(0,\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle; |
| 2943 |
\endscope\endscope} |
| 2944 |
% #endregion |
| 2945 |
|
| 2946 |
% #region horse-lib |
| 2947 |
\colorlet{base@a}{lightgray!95!black} |
| 2948 |
\colorlet{base@b}{lightgray!79!black} |
| 2949 |
|
| 2950 |
\colorlet{a}{lightgray!63!black} |
| 2951 |
\colorlet{b}{lightgray!81!black} |
| 2952 |
\def\basew{12} |
| 2953 |
\def\pingu@@horse@scale{.1} |
| 2954 |
|
| 2955 |
\def\pingu@@horse@@main{(1.275,.55) -- ++(\if@pingu@@horse@@[email protected]\else.1\fi,.2) -- ++(\if@pingu@@horse@@[email protected]\else-.25\fi,.25) to[bend right=4] ++(-.425,1.75) to[bend left=15] ++(.05,.2) to[bend right=30] ++(-.1,1.9) to[bend left=30] ++(0,1.65) coordinate(@back) to[bend left=30] ++(2,.625) to[bend right=18,looseness=.8] ++(3.25,-.1) [rounded corners=2*\pingu@@horse@scale] coordinate(@hair) to[out=34,in=185] ++(3,1.3) to[bend left=19] coordinate[pos=.5](@ear) ++(.85,-.4) to[bend left=5] ++(.24,-.45) to[bend right=20] ++(\if@pingu@@horse@@[email protected]\else0\fi,\if@pingu@@horse@@[email protected]\else-.7\fi) to[bend left=2] ++(.1,-.55) to[out=-85,in=-60,looseness=.75] ++(\if@pingu@@horse@@[email protected]\else-.475\fi,\if@pingu@@horse@@[email protected]\else-.35\fi) coordinate(@mouth) to[out=-135,in=-120] ++(\if@pingu@@horse@@[email protected]\else-.37\fi,\if@pingu@@horse@@[email protected]\else.25\fi) -- ++(0,.1) |
| 2956 |
to[out=125,in=-68] ++(-.58,.615) coordinate (@mouth-low) |
| 2957 |
to[out=215,in=80] ++(-1.25,-2) to[bend left=24] ++(-.65,-1) to[out=258,in=86] ++(-.42,-1.25) to[bend left=3] ++(-.2,-.6) to[bend right=10] ++(-.14,-1.15) to[bend left=2] coordinate[pos=.62] (@hooffront) ++(.355,-.565) to[bend left=15] ++(-.4,-.075) to[bend left=10] ++(-.28,.1) to[bend left=9] ++(.06,.3) to[bend right=9] ++(-.2,.4) to[out=80,in=-80] ++(.138,1.4) to[out=70,in=-103] ++(.2,1.3) to[bend right=10] ++(-.225,.44) coordinate (@frontleg) to[out=196,in=\if@pingu@@horse@@donkey@-65\else-25\fi] ++(-3.3,\if@pingu@@horse@@[email protected]\else.575\fi) coordinate (@backleg) to[bend right=\if@pingu@@horse@@donkey@16\else10\fi] ++(-.8,\if@pingu@@horse@@[email protected]\else-1.5\fi) to[bend right=\if@pingu@@horse@@donkey@9\else20\fi] ++(.1,-2.35) -- ++(\if@pingu@@horse@@[email protected]\else.2\fi,-.25) |
| 2958 |
coordinate (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@[email protected]\else-.55\fi,\if@pingu@@horse@@[email protected]\else-.05\fi) -- cycle} |
| 2959 |
|
| 2960 |
% #1 is the wing for the color and key assignments |
| 2961 |
\def\pingu@@drawer@horse#1{ |
| 2962 |
% this ensures all coordinates are set in place |
| 2963 |
% i know this i inefficient, but atm this is of no greater |
| 2964 |
% concern -- i can not use layers as they would clash with that |
| 2965 |
% of the penguin and who wants that... no one does! |
| 2966 |
% penguins deserve freedom! |
| 2967 |
\path \pingu@@horse@@main; |
| 2968 |
|
| 2969 |
% no we draw "behind" the horse: |
| 2970 |
|
| 2971 |
% Sockel |
| 2972 |
\csname if@pingu@x@horse@#1@base@\endcsname |
| 2973 |
\pingu@block[draw=\csname pingu@color@horse#1@base@shade@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base@shade\endcsname} (4.35-\basew/2,.433) -- ++(0,-.5) arc(180:360:\basew/2 and 1) -- ++(0,.5) arc(360:180:\basew/2 and 1); |
| 2974 |
\pingu@block[draw=\csname pingu@color@horse#1@base@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base\endcsname} (4.35,.433) ellipse[x radius=\basew/2,y radius=1]; |
| 2975 |
\fi |
| 2976 |
% background front leg |
| 2977 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@frontleg) to[out=266,in=85] ++(.09,-.5) to[bend left=10] ++(-.15,-.8) |
| 2978 |
to[bend right=7] ++(-.05,-.2) to[bend left=13] ++(-.2,-1.15) to[bend right=13] ++(.15,-.2) to[bend left=10] ++(-.07,-.3) to[bend right=100] ++(.45,-.1) to[bend right=10] coordinate[pos=0.08](@hooffront@) ([yshift=5mm,xshift=3mm]@frontleg) -- cycle; |
| 2979 |
\pingu@block[draw=\csname pingu@color@horse#1@fr@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale,rounded corners=.12]{\csname pingu@color@horse#1@fr@hoof\endcsname} (@hooffront@) to[bend left=2] ++(0,-.565*.665) to[bend left=59] ++(-.225,-.08) -- ++(-.02,.03) to[bend left=20] ++(-.315,.11) to[bend right=6] ++(.092,.2) to[bend right=25] cycle; |
| 2980 |
% background back le0 |
| 2981 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@backleg) to[out=-115,in=\if@pingu@@horse@@donkey@120\else130\fi] ++(-.3,-3.5) -- ++(.2,-.3) coordinate(@hoofback@) to[bend left] ++(-.5,-.1) |
| 2982 |
-- ++(\if@pingu@@horse@@[email protected]\else-.05\fi,.15) -- ++(0,.15) to[bend left=\if@pingu@@horse@@donkey@45\else60\fi] cycle; |
| 2983 |
\pingu@block[draw=\csname pingu@color@horse#1@br@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@br@hoof\endcsname} (@hoofback@) to[bend right=\if@pingu@@horse@@donkey@9\else9\fi] ++(.206,-.265) to[bend left=10] ++(\if@pingu@@horse@@[email protected]\else-.55\fi,\if@pingu@@horse@@[email protected]\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle; |
| 2984 |
|
| 2985 |
\if@pingu@@horse@@donkey@ |
| 2986 |
\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=95] ++(-.1,-2) to[out=270,in=92] ++(0,-.75) [sharp corners] to[bend right=20] coordinate[pos=.5] (@) ++(.15,0) to[bend right=10] cycle; |
| 2987 |
% TODO: hide support |
| 2988 |
%\node[draw=\csname pingu@color@horse#1@tail@draw\endcsname,fill=\csname pingu@color@horse#1@tail\endcsname,cloud,cloud puffs=30,cloud ignores aspect,scale=1.33*\pingu@@horse@scale,yshift=16mm,rotate=-5,line width=\@pingu@@horse@lw*\pingu@@horse@scale] at (@) {\rotatebox{90}{\phantom{A}\hskip7.5em}}; |
| 2989 |
\scope[rotate around={180:(@)}] % adapted from the broom |
| 2990 |
\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] ++(3mm,12.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle; |
| 2991 |
\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(-.75mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle; |
| 2992 |
\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname}(@)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,12mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]@) -- cycle; |
| 2993 |
\endscope |
| 2994 |
\else |
| 2995 |
\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=90] ++(-.4,-2.5) to[out=270,in=92] ++(0,-2.8) [sharp corners] to[bend right=20] ++(.6,0) to[bend right=10] cycle; |
| 2996 |
\fi |
| 2997 |
|
| 2998 |
% back ear |
| 2999 |
\if@pingu@@horse@@donkey@ |
| 3000 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,1.465) coordinate(@) to[bend left=10] ++(-.15,-1.5); |
| 3001 |
\else |
| 3002 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,.565) coordinate(@) to[bend left=10] ++(-.15,-.75); |
| 3003 |
\fi |
| 3004 |
% and here comes the wheeee (imagine-horse-sound) |
| 3005 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale] \pingu@@horse@@main; |
| 3006 |
|
| 3007 |
\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.1mm]@mouth-low) to[bend left=12] ++(.06,.65); |
| 3008 |
\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mouth\endcsname} ([yshift=-.115mm]@mouth) -- ++(-.035,.225); |
| 3009 |
|
| 3010 |
\edef\pingu@tmp{\if@pingu@@horse@@[email protected]\else3.85mm\fi}% |
| 3011 |
\edef\pingu@tmpb{\if@pingu@@horse@@[email protected]\else2.45mm\fi}% |
| 3012 |
\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale,line join=round]{\csname pingu@color@horse#1@nose\endcsname} ([xshift=\pingu@tmp,yshift=\pingu@tmpb]@mouth) to[out=140,in=10] ++(-.17,-.074) to[bend right=49] cycle; |
| 3013 |
|
| 3014 |
\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.35mm]@frontleg) to[bend left=12] ++(.01,.325); |
| 3015 |
\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.2mm]@backleg) to[bend right=13] ++(.25,.425); |
| 3016 |
|
| 3017 |
\if@pingu@@horse@@donkey@ |
| 3018 |
\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.25) to[out=186,in=35] ([yshift=-4mm,xshift=1.5mm]@hair) -- cycle; |
| 3019 |
|
| 3020 |
\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2.1mm,yshift=-1.05mm]@ear) -- ++(-.1,-.2) to[bend left=4] ++(.45,-.275) to[bend right=9] cycle; |
| 3021 |
\else |
| 3022 |
\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.4) to[out=194,in=30] ([yshift=-11.5mm,xshift=1.5mm]@hair) -- cycle; |
| 3023 |
|
| 3024 |
\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2mm,yshift=-1mm]@ear) -- ++(-.1,-.3275) to[bend left=4] ++(.455,-.175) to[bend right=9] cycle; |
| 3025 |
\fi |
| 3026 |
|
| 3027 |
% ear |
| 3028 |
\if@pingu@@horse@@donkey@ |
| 3029 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-1mm,yshift=-1mm]@ear) to[bend left=15] ++(.393,1.685) coordinate(@) to[bend right=17] ++(-.15,-1.8); |
| 3030 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=17] ++(-.15,-1.8) to[bend right=14] cycle; |
| 3031 |
\else |
| 3032 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-.75mm,yshift=-1mm]@ear) to[bend left=20] ++(.393,.585) coordinate(@) to[bend right=10] ++(-.15,-.7); |
| 3033 |
\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=7] ++(-.15,-.7) to[bend right=14] cycle; |
| 3034 |
\fi |
| 3035 |
|
| 3036 |
% the eye; this is no error it has draw as fill |
| 3037 |
\pingu@block{\csname pingu@color@horse#1@eyes\endcsname} [rounded corners=.25*\pingu@@horse@scale] ([xshift=3mm,yshift=-7.5mm]@ear) to[bend right=20] ++(.125,-.2) to[bend right=50] ++(.1,.125) to[bend left=15] cycle; |
| 3038 |
|
| 3039 |
\pingu@block[draw=\csname pingu@color@horse#1@fl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@fl@hoof\endcsname} (@hooffront) to[bend left=2] ++(.355*.49,-.545*.49) to[bend left=11] ++(-.45-.295,-.05+0.033)to[bend right=2] ++(.046,.29) to[bend right=10] cycle; |
| 3040 |
\pingu@block[draw=\csname pingu@color@horse#1@bl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@bl@hoof\endcsname} (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@[email protected]\else-.55\fi,\if@pingu@@horse@@[email protected]\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle; %to[bend left=2] ++(.355*.65,-.565*.65) to[bend left=15] ++(-.395,-.075) to[bend left=10] ++(-.293,.105) to[bend left=9] ++(.06,.3) to[bend left=5] cycle; |
| 3041 |
} |
| 3042 |
|
| 3043 |
% universal switch for all three positions |
| 3044 |
\newif\if@pingu@@horse@@donkey@ |
| 3045 |
|
| 3046 |
\newif\if@pingu@x@horse@left@flip@ |
| 3047 |
\newif\if@pingu@x@horse@right@flip@ |
| 3048 |
\newif\if@pingu@x@horse@left@base@ |
| 3049 |
\newif\if@pingu@x@horse@right@base@ |
| 3050 |
\newif\if@pingu@x@horse@left@donkey@ |
| 3051 |
\newif\if@pingu@x@horse@right@donkey@ |
| 3052 |
\pingu@create@wing@extra{horse}{% |
| 3053 |
horse \@lr/.code = {\pingu@set@extra{horse\@lr}{true}\pingu@color{horse\@lr}{##1}}, |
| 3054 |
horse \@lr/.default = pingu@bronze!80!pingu@black, |
| 3055 |
horse \@lr\space flip/.is if = @pingu@x@horse@\@lr @flip@, |
| 3056 |
horse \@lr\space donkey/.is if = @pingu@x@horse@\@lr @donkey@, |
| 3057 |
horse \@lr\space has base/.is if = @pingu@x@horse@\@lr @base@, |
| 3058 |
horse \@lr\space draw/.code = \pingu@color{horse\@lr @draw}{##1},% |
| 3059 |
horse \@lr\space line width/.code = \@namedef{pingu@horse\@lr @x@line@width}{##1},% |
| 3060 |
horse \@lr\space mane/.code = \pingu@color{horse\@lr @mane}{##1},% |
| 3061 |
horse \@lr\space mane draw/.code = \pingu@color{horse\@lr @mane@draw}{##1},% |
| 3062 |
horse \@lr\space thatch/.code = \pingu@color{horse\@lr @thatch}{##1},% |
| 3063 |
horse \@lr\space thatch draw/.code = \pingu@color{horse\@lr @thatch@draw}{##1},% |
| 3064 |
horse \@lr\space tail/.code = \pingu@color{horse\@lr @tail}{##1},% |
| 3065 |
horse \@lr\space tail draw/.code = \pingu@color{horse\@lr @tail@draw}{##1},% |
| 3066 |
horse \@lr\space eyes/.code = \pingu@color{horse\@lr @eyes}{##1},% |
| 3067 |
horse \@lr\space eye/.forward to = /pingu/horse \@lr\space eyes,% |
| 3068 |
horse \@lr\space mouth/.code = \pingu@color{horse\@lr @mouth}{##1},% |
| 3069 |
horse \@lr\space nose/.code = \pingu@color{horse\@lr @nose}{##1},% |
| 3070 |
horse \@lr\space ears/.code = \pingu@color{horse\@lr @ears}{##1},% |
| 3071 |
horse \@lr\space base/.code = \pingu@color{horse\@lr @base}{##1},% |
| 3072 |
horse \@lr\space base draw/.code = \pingu@color{horse\@lr @base@draw}{##1},% |
| 3073 |
horse \@lr\space base shade/.code = \pingu@color{horse\@lr @base@shade}{##1},% |
| 3074 |
horse \@lr\space base shade draw/.code = \pingu@color{horse\@lr @base@shade@draw}{##1},% |
| 3075 |
horse \@lr\space front left hoof/.code = \pingu@color{horse\@lr @fl@hoof}{##1},% |
| 3076 |
horse \@lr\space front right hoof/.code= \pingu@color{horse\@lr @fr@hoof}{##1},% |
| 3077 |
horse \@lr\space back left hoof/.code = \pingu@color{horse\@lr @bl@hoof}{##1},% |
| 3078 |
horse \@lr\space back right hoof/.code = \pingu@color{horse\@lr @br@hoof}{##1},% |
| 3079 |
horse \@lr\space front hoofs/.style = {/pingu/horse \@lr\space front left hoof=##1,/pingu/horse \@lr\space front right hoof=##1}, |
| 3080 |
horse \@lr\space back hoofs/.style = {/pingu/horse \@lr\space back left hoof=##1,/pingu/horse \@lr\space back right hoof=##1}, |
| 3081 |
horse \@lr\space hoofs/.style = {/pingu/horse \@lr\space front hoofs=##1,/pingu/horse \@lr\space back hoofs=##1}, |
| 3082 |
horse \@lr\space hoofs/.default = gray!80!white, |
| 3083 |
% TODO: allow colors to be styles? |
| 3084 |
horse \@lr\space xshift/.code = \@namedef{pingu@x@horse\@lr @xshift}{##1}, |
| 3085 |
horse \@lr\space yshift/.code = \@namedef{pingu@x@horse\@lr @yshift}{##1}, |
| 3086 |
horse \@lr\space on base/.style ={/pingu/horse \@lr\space yshift=4cm}, |
| 3087 |
}{horse \@lr\space draw=\csname pingu@color@horse\@lr\endcsname!80!pingu@black,horse \@lr\space mane=\csname pingu@color@horse\@lr\endcsname!86!pingu@white,horse \@lr\space mane draw=\csname pingu@color@horse\@lr @mane\endcsname!80!pingu@black,horse \@lr\space eyes=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space mouth=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space nose=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space ears=\csname pingu@color@horse\@lr\endcsname,horse \@lr\space thatch=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space thatch draw=\csname pingu@color@horse\@lr @thatch\endcsname!80!pingu@black,horse \@lr\space tail=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space tail draw=\csname pingu@color@horse\@lr @tail\endcsname!80!pingu@black,horse \@lr\space has base=false,horse \@lr\space base=lightgray!90!black,horse \@lr\space base draw=\csname pingu@color@horse\@lr @base\endcsname!91!pingu@black,horse \@lr\space base shade=lightgray!80!black,horse \@lr\space base shade draw=\csname pingu@color@horse\@lr @base@shade\endcsname!91!pingu@black,horse \@lr\space xshift=0pt,horse \@lr\space yshift=0pt,horse \@lr\space flip=\ifx\@lr\pingu@str@wing@left true\else false\fi,horse \@lr\space donkey=false,horse \@lr\space line width=1.75pt,horse \@lr\space hoofs=\@pingu@none} |
| 3088 |
|
| 3089 |
\def\pingu@draw@wi@horse#1{% |
| 3090 |
\pingu@setup@wing{horse}{#1}% |
| 3091 |
\scope[scale=\pingu@@horse@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-wing-#1),rotate around={\@angle-5:(\pingu@name-wing-#1)}] |
| 3092 |
\csname if@pingu@x@horse@#1@flip@\endcsname |
| 3093 |
\scope[xshift=-4cm-\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname] |
| 3094 |
\else |
| 3095 |
\scope[xshift=4cm+\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname,xscale=-1] |
| 3096 |
\fi |
| 3097 |
\csname if@pingu@x@horse@#1@donkey@\endcsname |
| 3098 |
\@pingu@@horse@@donkey@true |
| 3099 |
\fi |
| 3100 |
\edef\@pingu@@horse@lw{\csname pingu@horse#1@x@line@width\endcsname} |
| 3101 |
\pingu@@drawer@horse{#1} |
| 3102 |
% TODO-SET: hoof |
| 3103 |
\endscope\endscope |
| 3104 |
} |
| 3105 |
% todo: make statue extra |
| 3106 |
% todo: make horse hat |
| 3107 |
|
| 3108 |
% to get on horse we create some kind of third wing item: 'on' |
| 3109 |
% that will be used to initialize all of the colors and keys |
| 3110 |
\newif\if@pingu@x@horse@on@flip@ |
| 3111 |
\newif\if@pingu@x@horse@on@base@ |
| 3112 |
\newif\if@pingu@x@horse@on@boundingbox@ |
| 3113 |
\newif\if@pingu@x@horse@on@donkey@ |
| 3114 |
% TODO: select keys |
| 3115 |
% TODO: option so it does not affect the bounding box (default!) |
| 3116 |
\pingu@create@extra{horseon}{% |
| 3117 |
on horse/.code = {\pingu@set@extra{horseon}{true}\pingu@color{horseon}{#1}}, |
| 3118 |
on horse/.default = pingu@bronze!80!pingu@black, |
| 3119 |
horse behind/.style = {on horse=#1, on horse scale=.325, on horse yshift=6.15cm}, |
| 3120 |
horse behind/.default = pingu@bronze!80!pingu@black, |
| 3121 |
on horse flip/.is if = @pingu@x@horse@on@flip@, |
| 3122 |
on horse donkey/.is if = @pingu@x@horse@on@donkey@, |
| 3123 |
on horse has base/.is if = @pingu@x@horse@on@base@, |
| 3124 |
on horse has bounding box/.is if = @pingu@x@horse@on@boundingbox@, |
| 3125 |
on horse draw/.code = \pingu@color{horseon@draw}{#1},% |
| 3126 |
on horse line width/.code = \@namedef{pingu@horseon@x@line@width}{#1},% |
| 3127 |
on horse mane/.code = \pingu@color{horseon@mane}{#1},% |
| 3128 |
on horse mane draw/.code = \pingu@color{horseon@mane@draw}{#1},% |
| 3129 |
on horse thatch/.code = \pingu@color{horseon@thatch}{#1},% |
| 3130 |
on horse thatch draw/.code = \pingu@color{horseon@thatch@draw}{#1},% |
| 3131 |
on horse tail/.code = \pingu@color{horseon@tail}{#1},% |
| 3132 |
on horse tail draw/.code = \pingu@color{horseon@tail@draw}{#1},% |
| 3133 |
on horse eyes/.code = \pingu@color{horseon@eyes}{#1},% |
| 3134 |
on horse eye/.forward to = /pingu/on horse eyes,% |
| 3135 |
on horse mouth/.code = \pingu@color{horseon@mouth}{#1},% |
| 3136 |
on horse nose/.code = \pingu@color{horseon@nose}{#1},% |
| 3137 |
on horse ears/.code = \pingu@color{horseon@ears}{#1},% |
| 3138 |
on horse base/.code = \pingu@color{horseon@base}{#1},% |
| 3139 |
on horse base draw/.code = \pingu@color{horseon@base@draw}{#1},% |
| 3140 |
on horse base shade/.code = \pingu@color{horseon@base@shade}{#1},% |
| 3141 |
on horse base shade draw/.code = \pingu@color{horseon@base@shade@draw}{#1},% |
| 3142 |
on horse front left hoof/.code = \pingu@color{horseon@fl@hoof}{#1},% |
| 3143 |
on horse front right hoof/.code = \pingu@color{horseon@fr@hoof}{#1},% |
| 3144 |
on horse back left hoof/.code = \pingu@color{horseon@bl@hoof}{#1},% |
| 3145 |
on horse back right hoof/.code = \pingu@color{horseon@br@hoof}{#1},% |
| 3146 |
on horse front hoofs/.style = {/pingu/on horse front left hoof=#1,/pingu/on horse front right hoof=#1}, |
| 3147 |
on horse back hoofs/.style = {/pingu/on horse back left hoof=#1,/pingu/on horse back right hoof=#1}, |
| 3148 |
on horse hoofs/.style = {/pingu/on horse front hoofs=#1,/pingu/on horse back hoofs=#1}, |
| 3149 |
on horse hoofs/.default = gray!80!white, |
| 3150 |
on horse xshift/.code = \@namedef{pingu@x@horseon@xshift}{#1}, |
| 3151 |
on horse yshift/.code = \@namedef{pingu@x@horseon@yshift}{#1}, |
| 3152 |
on horse scale/.code = \@namedef{pingu@x@horseon@scale}{#1} |
| 3153 |
}{on horse draw=\pingu@color@horseon!80!pingu@black,on horse mane=\pingu@color@horseon!86!pingu@white,on horse mane draw=\pingu@color@horseon@mane!80!pingu@black,on horse eyes=\pingu@color@horseon@draw,on horse mouth=\pingu@color@horseon@draw,on horse nose=\pingu@color@horseon@draw,on horse ears=\pingu@color@horseon,on horse thatch=\pingu@color@horseon@mane,on horse thatch draw=\pingu@color@horseon@thatch!80!pingu@black,on horse tail=\pingu@color@horseon@mane,on horse tail draw=\pingu@color@horseon@tail!80!pingu@black,on horse has base=false,on horse base=lightgray!90!black,on horse base draw=\pingu@color@horseon@base!91!pingu@black,on horse base shade=lightgray!80!black,on horse base shade draw=\pingu@color@horseon@base@shade!91!pingu@black,on horse xshift=0pt,on horse yshift=0pt,on horse flip=false,on horse scale=0.75,on horse has bounding box=false,on horse donkey=false,on horse line width=1.75pt,on horse hoofs=\@pingu@none} |
| 3154 |
|
| 3155 |
|
| 3156 |
\def\pingu@draw@eb@horseon{% |
| 3157 |
\pingu@layer{background}[scale=\pingu@x@horseon@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-bottom-center)] |
| 3158 |
\if@pingu@x@horse@on@donkey@ |
| 3159 |
\@pingu@@horse@@donkey@true |
| 3160 |
\fi |
| 3161 |
\if@pingu@x@horse@on@flip@ |
| 3162 |
\scope[xshift=-45mm-\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@donkey@ 1.1\else1\fi,yscale=\if@pingu@@horse@@[email protected]\else1\fi] |
| 3163 |
\else |
| 3164 |
\scope[xshift=45mm+\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@[email protected]\else-1\fi,yscale=\if@pingu@@horse@@[email protected]\else1\fi] |
| 3165 |
\fi |
| 3166 |
\edef\@pingu@@horse@lw{\pingu@horseon@x@line@width} |
| 3167 |
\if@pingu@x@horse@on@boundingbox@\else\pgfinterruptboundingbox\fi |
| 3168 |
\pingu@@drawer@horse{on} |
| 3169 |
\if@pingu@x@horse@on@boundingbox@\else\endpgfinterruptboundingbox\fi |
| 3170 |
\endscope\endpingu@layer |
| 3171 |
} |
| 3172 |
% #endregion |
| 3173 |
|
| 3174 |
% #region magic-lib |
| 3175 |
\pingu@create@wing@extra{handcast}{% |
| 3176 |
handcast \@lr/.forward to = /pingu/hand cast \@lr, |
| 3177 |
hand cast \@lr/.code = {\pingu@set@extra{handcast\@lr}{true}\@namedef{pingu@handcast@\@lr}{##1}}, |
| 3178 |
hand cast \@lr/.default = {X}, |
| 3179 |
handcast \@lr\space color/.forward to = /pingu/hand cast \@lr\space color, |
| 3180 |
hand cast \@lr\space color/.code = \pingu@color{handcast@\@lr @color}{##1},% |
| 3181 |
}{hand cast \@lr\space color=pingu@purple} |
| 3182 |
\def\pingu@draw@wi@handcast#1{% |
| 3183 |
\pingu@setup@wing{handcast}{#1}% |
| 3184 |
\path[rotate around={\@angle:(\pingu@name-wing-#1)}] (\pingu@name-wing-#1)++(0,5mm) node[\csname pingu@color@handcast@#1@color\endcsname] {\@nameuse{pingu@handcast@#1}}; |
| 3185 |
} |
| 3186 |
% #endregion |
| 3187 |
|
| 3188 |
% #region medieval-lib |
| 3189 |
\newif\if@pingu@x@rook@draw@hatch@ |
| 3190 |
\pingu@create@extra{rook}{% |
| 3191 |
rook/.code = \pingu@set@extra{rook}{true}\pingu@color{rook}{#1}, |
| 3192 |
rook/.default = pingu@silver, |
| 3193 |
rook back/.code = \pingu@color{rook@back}{#1}, |
| 3194 |
rook hatch/.is if = @pingu@x@rook@draw@hatch@, |
| 3195 |
rook hatch/.default = true, |
| 3196 |
rook shade/.code = \pingu@color{rook@shade}{#1}, |
| 3197 |
}{rook back=\pingu@color@rook!85!black,rook shade=\pingu@color@rook!92!black,rook hatch} |
| 3198 |
\def\pingu@draw@ea@rook{% |
| 3199 |
\if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\pingu@layer{foreground}[]\fi\fi |
| 3200 |
\pingu@block[even odd rule]{\pingu@color@rook} ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=9] coordinate[pos=.15] (@tmpe) ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) coordinate (@tmp) to[bend left=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (\pingu@name-wings-side-right|-\pingu@name-head-top) [rounded corners=\p@] coordinate (@tmpb) to[bend right=1.5*\pingu@bend] cycle \if@pingu@x@rook@draw@hatch@ (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half]\fi; |
| 3201 |
\pingu@block{\pingu@color@rook} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(-2mm,-.1mm) -- ++(0,-2.25mm); |
| 3202 |
\pingu@block{\pingu@color@rook} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(2mm,-.1mm) -- ++(0,-2.25mm); |
| 3203 |
|
| 3204 |
\pingu@block{\pingu@color@rook} (@tmpc)++(-2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm); |
| 3205 |
\pingu@block{\pingu@color@rook} (@tmpd)++(2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm); |
| 3206 |
|
| 3207 |
% custom shade boi (or gurl, wateva) |
| 3208 |
\scope |
| 3209 |
\clip ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=5] ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) -- ++(0,2mm) to[bend left=3] (\pingu@name-wings-side-right|-\pingu@name-head-top) to[bend right=1.5*\pingu@bend] cycle; |
| 3210 |
\if@pingu@x@rook@draw@hatch@ |
| 3211 |
\clip[/pingu/@invclip] (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half]; |
| 3212 |
\fi |
| 3213 |
\pingu@block{\pingu@color@rook@shade} (@tmpe) to[bend right=5] ([xshift=.2mm]@tmpe-|@tmp) to[bend right=1.5*\pingu@bend] ([yshift=2mm]@tmp) to[bend left=10] cycle; |
| 3214 |
\endscope |
| 3215 |
\if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\endpingu@layer\fi\fi |
| 3216 |
|
| 3217 |
\pingu@layer{background}[] |
| 3218 |
\pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (@tmpb) to[bend right=30] cycle; |
| 3219 |
\pingu@block{\pingu@color@rook@back} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(2mm,.1mm) -- ++(0,-2.25mm); |
| 3220 |
\pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(-2mm,.1mm) -- ++(0,-2.25mm); |
| 3221 |
|
| 3222 |
\pingu@block{\pingu@color@rook@back} (@tmpc)++(-2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm); |
| 3223 |
\pingu@block{\pingu@color@rook@back} (@tmpd)++(2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm); |
| 3224 |
\endpingu@layer |
| 3225 |
} |
| 3226 |
|
| 3227 |
\newif\if@pingu@x@crown@ddd@ % 3d |
| 3228 |
\newif\if@pingu@x@crown@shade@ % 3d |
| 3229 |
\pingu@create@extra{crown}{% |
| 3230 |
crown/.code = \pingu@set@extra{crown}{true}\pingu@color{crown}{#1}, |
| 3231 |
crown/.default = pingu@yellow, |
| 3232 |
crown 3d/.is if = @pingu@x@crown@ddd@, crown 3d/.default = true, |
| 3233 |
crown 2d/.style = {crown=#1, crown 3d=false}, |
| 3234 |
crown 2d/.default = pingu@yellow, |
| 3235 |
crown back/.code = \pingu@color{crown@back}{#1}, |
| 3236 |
crown front bend/.code = \def\pingu@x@crown@f@bend{#1}, |
| 3237 |
crown back bend/.code = \def\pingu@x@crown@b@bend{#1}, |
| 3238 |
crown gem shade/.is if = @pingu@x@crown@shade@, crown gem shade/.default = true, |
| 3239 |
crown gem colors/.code n args = 7{\pingu@color{crown@gem@a}{#1}\pingu@color{crown@gem@b}{#2}\pingu@color{crown@gem@c}{#3}\pingu@color{crown@gem@d}{#4}\pingu@color{crown@gem@e}{#5}\pingu@color{crown@gem@f}{#6}\pingu@color{crown@gem@g}{#7}}, |
| 3240 |
crown gem ring/.code = \pingu@color{crown@gem@ring}{#1}, |
| 3241 |
crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@crown@angle{#1}\def\pingu@x@crown@xshift{#2}\def\pingu@x@crown@yshift{#3}\def\pingu@x@crown@scale{#4}}, |
| 3242 |
}{crown position={-9:(1mm,0mm)1},crown front bend=16,crown back bend=9,crown back=\pingu@color@crown!93!black,crown 3d,crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@purple}{pingu@green}{pingu@blue}{pingu@purple},crown gem ring=\pingu@color@crown!85!white,crown gem shade} |
| 3243 |
|
| 3244 |
% color | bend1 | bend1 |
| 3245 |
\def\pingu@draw@ea@crown@s#1#2#3{ |
| 3246 |
\pingu@block{#1} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] ++(0,3.125mm) to[bend #2=\pingu@x@crown@f@bend] |
| 3247 |
coordinate[pos=0] (r2) coordinate[pos=.07] (r1) |
| 3248 |
coordinate[pos=.14-.07] (a1) coordinate[pos=.14] (a2) coordinate[pos=.14+.07] (a3) |
| 3249 |
coordinate[pos=.30-.08] (b1) coordinate[pos=.30] (b2) coordinate[pos=.30+.08] (b3) |
| 3250 |
coordinate[pos=.50- .1] (c1) coordinate[pos=.50] (x2) coordinate[pos=.50+ .1] (c3) |
| 3251 |
coordinate[pos=.69-.08] (d1) coordinate[pos=.69] (d2) coordinate[pos=.69+.08] (d3) |
| 3252 |
coordinate[pos=.85-.07] (e1) coordinate[pos=.85] (e2) coordinate[pos=.85+.07] (e3) |
| 3253 |
coordinate[pos=1] (l2) coordinate[pos=.93] (l1) |
| 3254 |
++(1.375cm,0) to[bend left=2] ++(0,-3.125mm) to[bend #3=\pingu@x@crown@f@bend] (-6mm,-.25cm) -- cycle; |
| 3255 |
\path (x2)++(0,.9mm) coordinate (c2); |
| 3256 |
\@for\a:={a,b,c,d,e}\do{ |
| 3257 |
\pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@crown@f@bend] ([yshift=-.1mm]\a3) to[bend right=2] ([yshift=1.85mm]\a2) to[bend right=2] ([yshift=-.1mm]\a1) -- cycle; |
| 3258 |
} |
| 3259 |
\pingu@block{#1} (l2)++(0,-.2mm) to[bend right=2] ++(0,1.95mm) -- (l1) -- cycle; |
| 3260 |
\pingu@block{#1} (r2)++(0,-.2mm) to[bend left=2] ++(0,1.95mm) -- (r1) -- cycle; |
| 3261 |
} |
| 3262 |
|
| 3263 |
% color | at | shift | scale |
| 3264 |
\def\pingu@draw@ea@crown@g#1#2#3#4{ |
| 3265 |
\scope[shift={(#22)},shift={(#3,-.33mm)}] |
| 3266 |
\pingu@block{\pingu@color@crown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4]; |
| 3267 |
\pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; |
| 3268 |
\protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else |
| 3269 |
\if@pingu@x@crown@shade@ |
| 3270 |
\shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; |
| 3271 |
\else |
| 3272 |
\pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4]; |
| 3273 |
\pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4]; |
| 3274 |
\fi\fi |
| 3275 |
\endscope |
| 3276 |
} |
| 3277 |
\def\pingu@draw@ea@crown{% |
| 3278 |
\scope[rotate around={\pingu@x@crown@angle:(\pingu@name-head-top)},% |
| 3279 |
shift={(\pingu@name-head-top)}, |
| 3280 |
shift={(\pingu@x@crown@xshift,\pingu@x@crown@yshift)}, |
| 3281 |
scale=\pingu@x@crown@scale] |
| 3282 |
% draw front |
| 3283 |
\if@pingu@x@crown@ddd@ |
| 3284 |
\pingu@draw@ea@crown@s{\pingu@color@crown}{right}{left} |
| 3285 |
\def\@tmpa{.05mm}\def\@tmpb{.025mm} |
| 3286 |
\else |
| 3287 |
\pingu@draw@ea@crown@s{\pingu@color@crown}{left}{right} |
| 3288 |
\def\@tmpa{-.015mm}\def\@tmpb{-.035mm} |
| 3289 |
\fi |
| 3290 |
% draw the emeralds |
| 3291 |
\pingu@draw@ea@crown@g{\pingu@color@crown@gem@b}{a}{-\@tmpa}1 |
| 3292 |
\pingu@draw@ea@crown@g{\pingu@color@crown@gem@c}{b}{-\@tmpb}1 |
| 3293 |
\pingu@draw@ea@crown@g{\pingu@color@crown@gem@d}{x}{\z@}{1.35} |
| 3294 |
\pingu@draw@ea@crown@g{\pingu@color@crown@gem@e}{d}{\@tmpb}1 |
| 3295 |
\pingu@draw@ea@crown@g{\pingu@color@crown@gem@f}{e}{\@tmpa}1 |
| 3296 |
\pingu@layer{background}[] |
| 3297 |
\pingu@block{\pingu@color@crown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; |
| 3298 |
\pingu@block{\pingu@color@crown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; |
| 3299 |
\pingu@block{\pingu@color@crown@gem@g} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; |
| 3300 |
\pingu@block{\pingu@color@crown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; |
| 3301 |
% draw back if 3d |
| 3302 |
\if@pingu@x@crown@ddd@ |
| 3303 |
\pingu@draw@ea@crown@s{\pingu@color@crown@back}{left}{right} |
| 3304 |
\fi |
| 3305 |
\endpingu@layer |
| 3306 |
\endscope |
| 3307 |
} |
| 3308 |
|
| 3309 |
\newif\if@pingu@x@princesscrown@ddd@ |
| 3310 |
\newif\if@pingu@x@princesscrown@shade@ |
| 3311 |
\newif\if@pingu@x@princesscrown@bobbles@ |
| 3312 |
\pingu@create@extra{princesscrown}{% |
| 3313 |
princess crown/.code = \pingu@set@extra{princesscrown}{true}\pingu@color{princesscrown}{#1}, |
| 3314 |
princess crown/.default = pingu@yellow, |
| 3315 |
princess crown 3d/.is if= @pingu@x@princesscrown@ddd@, princess crown 3d/.default = true, |
| 3316 |
princess crown 2d/.style = {princess crown=#1, princess crown 3d=false}, |
| 3317 |
princess crown 2d/.default = pingu@yellow, |
| 3318 |
princess crown back/.code = \pingu@color{princesscrown@back}{#1}, |
| 3319 |
princess crown front bend/.code = \def\pingu@x@princesscrown@f@bend{#1}, |
| 3320 |
princess crown back bend/.code = \def\pingu@x@princesscrown@b@bend{#1}, |
| 3321 |
princess crown gem shade/.is if = @pingu@x@princesscrown@shade@, |
| 3322 |
princess crown bobbles/.is if = @pingu@x@princesscrown@bobbles@, |
| 3323 |
princess crown gem shade/.default = true, |
| 3324 |
princess crown gem colors/.code n args = 5{\pingu@color{princesscrown@gem@a}{#1}\pingu@color{princesscrown@gem@b}{#2}\pingu@color{princesscrown@gem@c}{#3}\pingu@color{princesscrown@gem@d}{#4}\pingu@color{princesscrown@gem@e}{#5}}, |
| 3325 |
princess crown gem ring/.code = \pingu@color{princesscrown@gem@ring}{#1}, |
| 3326 |
princess crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@princesscrown@angle{#1}\def\pingu@x@princesscrown@xshift{#2}\def\pingu@x@princesscrown@yshift{#3}\def\pingu@x@princesscrown@scale{#4}}, |
| 3327 |
}{princess crown position={-9:(1mm,0mm)1},princess crown front bend=12,princess crown back bend=7,princess crown back=\pingu@color@princesscrown!93!black,princess crown 3d,princess crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@blue}{pingu@purple},princess crown gem ring=\pingu@color@princesscrown!85!white,princess crown gem shade,princess crown bobbles} |
| 3328 |
|
| 3329 |
% color | bend1 | bend2 |
| 3330 |
\def\pingu@draw@ea@princesscrown@s#1#2#3{ |
| 3331 |
\pingu@block{#1} [rounded corners=.2mm](-3.25mm,-.15cm) to[bend left=2] ++(0,2.32mm) to[bend #2=\pingu@x@princesscrown@f@bend] |
| 3332 |
coordinate[pos=0] (r2) coordinate[pos=.065] (r1) |
| 3333 |
coordinate[pos=.11] (a1) coordinate[pos=.2] (a2) coordinate[pos=.29] (a3) |
| 3334 |
coordinate[pos=.35] (b1) coordinate[pos=.50] (x2) coordinate[pos=.65] (b3) |
| 3335 |
coordinate[pos=.71] (c1) coordinate[pos=.8] (c2) coordinate[pos=.89] (c3) |
| 3336 |
coordinate[pos=1] (l2) coordinate[pos=.93] (l1) |
| 3337 |
++(8mm,0) to[bend left=2] ++(0,-2.32mm) to[bend #3=\pingu@x@princesscrown@f@bend] (-3mm,-.15cm) -- cycle; |
| 3338 |
\path (x2)++(0,.9mm) coordinate (b2); |
| 3339 |
\@for\a:={a,b,c}\do{ |
| 3340 |
\pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@princesscrown@f@bend] ([yshift=-.1mm]\a3) to[bend left=2] ([yshift=2.15mm]\a2) to[bend left=2] ([yshift=-.1mm]\a1) -- cycle; |
| 3341 |
\if@pingu@x@princesscrown@bobbles@\pingu@block{#1} ([yshift=2.15mm]\a2) circle [radius=.45\p@];\fi |
| 3342 |
} |
| 3343 |
\pingu@block{#1} (l2)++(0,-.2mm) to[bend left=2] ++(0,2.25mm) -- (l1) -- cycle; |
| 3344 |
\pingu@block{#1} (r2)++(0,-.2mm) to[bend right=2] ++(0,2.25mm) -- (r1) -- cycle; |
| 3345 |
\if@pingu@x@princesscrown@bobbles@\pingu@block{#1} (l2)++(0,2.05mm) circle [radius=.45\p@]; |
| 3346 |
\pingu@block{#1} (r2)++(0,2.05mm) circle [radius=.45\p@];\fi |
| 3347 |
} |
| 3348 |
|
| 3349 |
% draw single gem; color | at | shift | scale |
| 3350 |
\def\pingu@draw@ea@princesscrown@g#1#2#3#4{ |
| 3351 |
\scope[shift={(#22)},shift={(#3,-.33mm)}] |
| 3352 |
\pingu@block{\pingu@color@princesscrown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4]; |
| 3353 |
\pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; |
| 3354 |
\protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else |
| 3355 |
\if@pingu@x@princesscrown@shade@ |
| 3356 |
\shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; |
| 3357 |
\else |
| 3358 |
\pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4]; |
| 3359 |
\pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4]; |
| 3360 |
\fi\fi |
| 3361 |
\endscope} |
| 3362 |
\def\pingu@draw@ea@princesscrown{% |
| 3363 |
\scope[rotate around={\pingu@x@princesscrown@angle:(\pingu@name-head-top)},% |
| 3364 |
shift={(\pingu@name-head-top)}, |
| 3365 |
shift={(\pingu@x@princesscrown@xshift,\pingu@x@princesscrown@yshift)}, |
| 3366 |
scale=\pingu@x@princesscrown@scale] |
| 3367 |
% draw front |
| 3368 |
\if@pingu@x@princesscrown@ddd@ |
| 3369 |
\pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{right}{left} |
| 3370 |
\def\@tmpa{.05mm} |
| 3371 |
\else |
| 3372 |
\pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{left}{right} |
| 3373 |
\def\@tmpa{-.015mm} |
| 3374 |
\fi |
| 3375 |
% draw the emaralds |
| 3376 |
\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@b}{a}{-\@tmpa}{.95} |
| 3377 |
\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@c}{x}{\z@}{1.3} |
| 3378 |
\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@d}{c}{\@tmpa}{.95} |
| 3379 |
\pingu@layer{background}[] |
| 3380 |
\pingu@block{\pingu@color@princesscrown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; |
| 3381 |
\pingu@block{\pingu@color@princesscrown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; |
| 3382 |
\pingu@block{\pingu@color@princesscrown@gem@e} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; |
| 3383 |
\pingu@block{\pingu@color@princesscrown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; |
| 3384 |
% draw back if 3d |
| 3385 |
\if@pingu@x@princesscrown@ddd@ |
| 3386 |
\pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown@back}{left}{right} |
| 3387 |
\fi |
| 3388 |
\endpingu@layer |
| 3389 |
\endscope |
| 3390 |
} |
| 3391 |
% #endregion |
| 3392 |
|
| 3393 |
% #region movement-lib |
| 3394 |
\pingu@bodytype@add{tilt-right}{% |
| 3395 |
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) |
| 3396 |
% left side |
| 3397 |
to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 3398 |
% feety stuff |
| 3399 |
arc (180:270:\pingu@foot@outer@w{}-1mm and \pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right) |
| 3400 |
arc (270:332:\pingu@foot@inner@w{}+1mm and 2.5*\pingu@foot@inner@h) |
| 3401 |
coordinate (\pingu@name-bottom-center) |
| 3402 |
arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left) |
| 3403 |
arc (270:360:\pingu@foot@outer@w{} and 1.125*\pingu@foot@outer@h)% |
| 3404 |
% right side |
| 3405 |
to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) |
| 3406 |
% coordinate |
| 3407 |
coordinate (\pingu@name-wings-side-left) |
| 3408 |
-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; |
| 3409 |
|
| 3410 |
\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) |
| 3411 |
++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) |
| 3412 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 3413 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 3414 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 3415 |
|
| 3416 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); |
| 3417 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); |
| 3418 |
\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:3.7mm and 2mm) arc (270:331:5mm and 3*.85mm) arc (207:270:5.3mm and 1.125*.85mm) arc (270:360:4.025mm and 1.25*2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@[email protected]+\pingu@lower@off) arc (0:180:\pingu@[email protected] and \pingu@w@half-\pingu@one) -- cycle; |
| 3419 |
|
| 3420 |
\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 3421 |
\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 3422 |
|
| 3423 |
\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 3424 |
\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 3425 |
|
| 3426 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 3427 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 3428 |
} |
| 3429 |
|
| 3430 |
|
| 3431 |
\pingu@bodytype@add{tilt-left}{% |
| 3432 |
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) |
| 3433 |
% left side |
| 3434 |
to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) |
| 3435 |
% feety stuff |
| 3436 |
arc (180:270:\pingu@foot@outer@w{}-1mm and 1.25*\pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right) |
| 3437 |
arc (270:332:\pingu@foot@inner@w{}+1mm and 1.125*\pingu@foot@inner@h) |
| 3438 |
coordinate (\pingu@name-bottom-center) |
| 3439 |
arc (208:270:\pingu@foot@inner@w{} and 2.5*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left) |
| 3440 |
arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% |
| 3441 |
% right side |
| 3442 |
to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) |
| 3443 |
% coordinate |
| 3444 |
coordinate (\pingu@name-wings-side-left) |
| 3445 |
-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; |
| 3446 |
|
| 3447 |
\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) |
| 3448 |
++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) |
| 3449 |
arc(90:450:\pingu@w@half{} and \pingu@head@h@half) |
| 3450 |
coordinate[pos=\pinguanglehr] (\pingu@name-head-right) |
| 3451 |
coordinate[pos=\pinguanglehl] (\pingu@name-head-left); |
| 3452 |
|
| 3453 |
\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); |
| 3454 |
\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); |
| 3455 |
\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:4.025mm and 1.25*2mm) arc (270:331:5.25mm and 1.125*.85mm) arc (207:270:5mm and 3*.85mm) arc (270:360:3.75mm and 2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@[email protected]+\pingu@lower@off) arc (0:180:\pingu@[email protected] and \pingu@w@half-\pingu@one) -- cycle; |
| 3456 |
|
| 3457 |
\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 3458 |
\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); |
| 3459 |
|
| 3460 |
\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); |
| 3461 |
\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); |
| 3462 |
|
| 3463 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 3464 |
\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; |
| 3465 |
} |
| 3466 |
% #endregion |
| 3467 |
|
| 3468 |
% #region safe-lib |
| 3469 |
\pingu@create@extra{mask}{% |
| 3470 |
mask/.code = {\pingu@set@extra{mask}{true}\pingu@color{mask}{#1}}, |
| 3471 |
mask/.default = pingu@white!61!gray,% |
| 3472 |
mask band/.code = \pingu@color{mask@band}{#1},% |
| 3473 |
mask line width/.code = \def\pingu@x@mask@line@width{#1},% |
| 3474 |
mask band inner/.code = \pingu@color{mask@band@inner}{#1},% |
| 3475 |
mask band outer/.code = \pingu@color{mask@band@outer}{#1}% |
| 3476 |
}{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} |
| 3477 |
|
| 3478 |
\def\pingu@draw@ea@mask{% |
| 3479 |
\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; |
| 3480 |
\scope |
| 3481 |
\clip[use path=\pingu@upperpingu]; |
| 3482 |
\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); |
| 3483 |
\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); |
| 3484 |
\endscope\scope |
| 3485 |
\clip[use path=\pingu@lowerpingu]; |
| 3486 |
\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); |
| 3487 |
\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); |
| 3488 |
\endscope |
| 3489 |
% TODO: fix this sloppy overwrite |
| 3490 |
\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; |
| 3491 |
\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); |
| 3492 |
\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} { |
| 3493 |
\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; |
| 3494 |
} |
| 3495 |
} |
| 3496 |
% #endregion |
| 3497 |
|
| 3498 |
% #region science-fiction |
| 3499 |
\newif\if@pingu@x@lightsaber@glow@left |
| 3500 |
\newif\if@pingu@x@lightsaber@glow@right |
| 3501 |
\newif\if@pingu@x@lightsaber@double@left |
| 3502 |
\newif\if@pingu@x@lightsaber@double@right |
| 3503 |
\def\pingu@x@saberglow@w@half{.9mm} |
| 3504 |
\def\pingulightsaberfactor{.013} |
| 3505 |
\pingu@create@wing@extra{lightsaber}{% |
| 3506 |
lightsaber \@lr/.code = {\pingu@set@extra{lightsaber\@lr}{true}\pingu@color{lightsaber\@lr}{##1}}, |
| 3507 |
lightsaber \@lr/.default = pingu@blue, |
| 3508 |
lightsaber \@lr\space handle/.code = \pingu@color{lightsaber\@lr @handle}{##1},% |
| 3509 |
lightsaber \@lr\space deco/.code = \pingu@color{lightsaber\@lr @deco}{##1},% |
| 3510 |
lightsaber \@lr\space ribbs/.code = \pingu@color{lightsaber\@lr @ribbs}{##1},% |
| 3511 |
lightsaber \@lr\space button/.code = \pingu@color{lightsaber\@lr @button}{##1},% |
| 3512 |
lightsaber \@lr\space button b/.code = \pingu@color{lightsaber\@lr @button@b}{##1},% |
| 3513 |
lightsaber \@lr\space color b/.code = \pingu@color{lightsaber\@lr @color@b}{##1},% |
| 3514 |
lightsaber \@lr\space length/.code = {\@namedef{pingu@x@lightsaber@length@\@lr}{##1}},% |
| 3515 |
lightsaber \@lr\space length b/.code = {\@namedef{pingu@x@lightsaber@length@b@\@lr}{##1}},% |
| 3516 |
lightsaber \@lr\space yshift/.code = {\@namedef{pingu@x@lightsaber@yshift@\@lr}{##1}},% |
| 3517 |
lightsaber \@lr\space glow/.is if = @pingu@x@lightsaber@glow@\@lr,% |
| 3518 |
lightsaber \@lr\space double/.is if = @pingu@x@lightsaber@double@\@lr,% |
| 3519 |
lightsaber \@lr\space glow core/.code = \pingu@color{lightsaber\@lr @glow@core}{##1},% |
| 3520 |
lightsaber \@lr\space solid/.style = {/pingu/lightsaber \@lr\space glow=false}, |
| 3521 |
lightsaber \@lr\space disabled/.style = {/pingu/lightsaber \@lr\space solid,/pingu/lightsaber \@lr=\@pingu@none}, |
| 3522 |
lightsaber \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightsaber@ogf@\@lr}{##1}}% |
| 3523 |
}{lightsaber \@lr\space handle=pingu@silver, lightsaber \@lr\space deco=pingu@silver!12!pingu@black, lightsaber \@lr\space button=pingu@red!85!pingu@black,lightsaber \@lr\space button b=pingu@red!85!pingu@black, lightsaber \@lr\space ribbs=pingu@silver!50!pingu@black,lightsaber \@lr\space length=2cm,lightsaber \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,lightsaber \@lr\space glow core=white,lightsaber \@lr\space outer glow factor=\pingulightsaberfactor,lightsaber \@lr\space yshift=0pt,lightsaber \@lr\space length b=\csname pingu@x@lightsaber@length@\@lr\endcsname,lightsaber \@lr\space color b=\noexpand\@col} |
| 3524 |
|
| 3525 |
% #region lightsaber base |
| 3526 |
\def\pingu@draw@wi@lightsaber@base#1{% |
| 3527 |
% deco-elements |
| 3528 |
% base |
| 3529 |
\pingu@block{\csname pingu@color@lightsaber#1@deco\endcsname}(\pingu@name-wing-#1)++(-.4mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) -- ++(0,-5mm) -- ++(.8mm,0) |- cycle; |
| 3530 |
\if@pingu@wing@item@side@left@ |
| 3531 |
% ribbs; single path saves memory :D |
| 3532 |
\pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(-.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) |
| 3533 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3534 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3535 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3536 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3537 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3538 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3539 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3540 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3541 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3542 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3543 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3544 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3545 |
arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) |
| 3546 |
arc(90:270:.075mm) -- ++(.8mm,0) |- cycle; |
| 3547 |
% button |
| 3548 |
\pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm]; |
| 3549 |
\pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm]; |
| 3550 |
% cover |
| 3551 |
\pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(-.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(180:90:.15mm) -- ++(.7mm,0) arc(90:0:.16mm) -- ++(0,-5mm) arc(360:270:.15mm) -- ++(-.7mm,0) arc (270:180:.15mm) -- ++(0,.25mm) arc(270:360:.33mm and .2mm) -- ++(0,4.1mm) arc(0:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle; |
| 3552 |
\else |
| 3553 |
% ribbs; single path saves memory :D (the second) |
| 3554 |
\pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) |
| 3555 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3556 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3557 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3558 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3559 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3560 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3561 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3562 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3563 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3564 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3565 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3566 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3567 |
arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) |
| 3568 |
arc(90:-90:.075mm) -- ++(-.8mm,0) |- cycle; |
| 3569 |
% buttons |
| 3570 |
\pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(-.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm]; |
| 3571 |
\pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(-.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm]; |
| 3572 |
% cover |
| 3573 |
\pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(0:90:.15mm) -- ++(-.7mm,0) arc(90:180:.16mm) -- ++(0,-5mm) arc(180:270:.15mm) -- ++(.7mm,0) arc (270:360:.15mm) -- ++(0,.25mm) arc(270:180:.33mm and .2mm) -- ++(0,4.1mm) arc(180:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle; |
| 3574 |
\fi |
| 3575 |
} |
| 3576 |
% #endregion |
| 3577 |
% #1 wing, #2 yshift, #3 angle, #4 length, #5 color |
| 3578 |
\def\pingu@draw@wi@lightsaber@pre#1#2#3#4#5{ |
| 3579 |
\scope[rotate around={#3:(\pingu@name-wing-#1)}] |
| 3580 |
\csname if@pingu@x@lightsaber@glow@#1\endcsname |
| 3581 |
\@for\i:={0,2,4,6,7,8,9,10,11,12,13,14,15,16,17}\do{ |
| 3582 |
\pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@[email protected]\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm); |
| 3583 |
} |
| 3584 |
\else % draw solid |
| 3585 |
\pingu@block{#5} (\pingu@name-wing-#1)++(-.425mm,#2-.1mm) -- ++(.05mm,#4) arc(180:0:.375mm and .375mm) -- ++(.05mm,-#4) arc (0:-180:.425mm and .05mm); |
| 3586 |
\fi |
| 3587 |
\endscope |
| 3588 |
} |
| 3589 |
|
| 3590 |
% #1 wing, #2 yshift, #3 angle, #4 length, #5 color |
| 3591 |
\def\pingu@draw@wi@lightsaber@post#1#2#3#4#5{ |
| 3592 |
\scope[rotate around={#3:(\pingu@name-wing-#1)}] |
| 3593 |
\csname if@pingu@x@lightsaber@glow@#1\endcsname |
| 3594 |
\ifdim\csname pingu@x@lightsaber@ogf@#1\endcsname pt>\z@ |
| 3595 |
\pingu@layer{foreground}[] |
| 3596 |
\pgfinterruptboundingbox |
| 3597 |
\path[clip,/pingu/@invclip] (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm); |
| 3598 |
\@for\i:={1,1.1,1.2,1.3,1.4}\do{ |
| 3599 |
\pingu@block[fill opacity=\csname pingu@x@lightsaber@ogf@#1\endcsname/\i]{#5} (\pingu@name-wing-#1) ++(.05mm,#2+#4/2) circle[radius=\i*#4]; |
| 3600 |
} |
| 3601 |
\endpgfinterruptboundingbox |
| 3602 |
\endpingu@layer |
| 3603 |
\fi |
| 3604 |
% fadings had a rotation angle bug |
| 3605 |
\@for\i:={1,2}\do{ |
| 3606 |
\pingu@block[fill opacity=.125*\i/10]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@[email protected]\i*\i mm/440 and \pingu@one-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm); |
| 3607 |
} |
| 3608 |
\pingu@block{\csname pingu@color@lightsaber#1@glow@core\endcsname} (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm); |
| 3609 |
\fi |
| 3610 |
\endscope |
| 3611 |
} |
| 3612 |
|
| 3613 |
% #1 wing |
| 3614 |
\def\pingu@draw@wi@lightsaber#1{% |
| 3615 |
\pingu@setup@wing{lightsaber}{#1}% |
| 3616 |
\scope[rotate around={\@angle:([yshift=+\csname pingu@x@lightsaber@yshift@#1\endcsname]\pingu@name-wing-#1)},xscale=1.2] |
| 3617 |
\pingu@draw@wi@lightsaber@pre{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col} |
| 3618 |
\csname if@pingu@x@lightsaber@double@#1\endcsname |
| 3619 |
\pingu@draw@wi@lightsaber@pre{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname} |
| 3620 |
\fi |
| 3621 |
\pingu@draw@wi@lightsaber@base{#1} |
| 3622 |
% afterglow (whuile watching everglow :D) |
| 3623 |
\pingu@draw@wi@lightsaber@post{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col} |
| 3624 |
\csname if@pingu@x@lightsaber@double@#1\endcsname |
| 3625 |
\pingu@draw@wi@lightsaber@post{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname} |
| 3626 |
\fi |
| 3627 |
\endscope |
| 3628 |
} |
| 3629 |
|
| 3630 |
|
| 3631 |
\newif\if@pingu@x@lightstaff@glow@left |
| 3632 |
\newif\if@pingu@x@lightstaff@glow@right |
| 3633 |
\pingu@create@wing@extra{lightstaff}{% |
| 3634 |
light-staff \@lr/.code = {\pingu@set@extra{lightstaff\@lr}{true}\pingu@color{lightstaff\@lr}{##1}}, |
| 3635 |
light-staff \@lr/.default = pingu@green, |
| 3636 |
light-staff \@lr\space length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @length\endcsname{##1}, |
| 3637 |
light-staff \@lr\space glow length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @glow@length\endcsname{##1}, |
| 3638 |
light-staff \@lr\space head/.code = \pingu@color{lightstaff\@lr}{##1},% |
| 3639 |
light-staff \@lr\space staff/.code = \pingu@color{lightstaff@\@lr @staff}{##1},% |
| 3640 |
light-staff \@lr\space core/.code = \pingu@color{lightstaff@\@lr @head@core}{##1},% |
| 3641 |
light-staff \@lr\space core width/.code = \expandafter\def\csname pingu@lightstaff@\@lr @core@width\endcsname{##1},% |
| 3642 |
light-staff \@lr\space glow/.is if = @pingu@x@lightstaff@glow@\@lr,% |
| 3643 |
light-staff \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightstaff@ogf@\@lr}{##1}},% |
| 3644 |
}{light-staff \@lr\space length=28mm,light-staff \@lr\space staff=pingu@bronze,light-staff \@lr\space head=pingu@green,light-staff \@lr\space core=pingu@white,light-staff \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,light-staff \@lr\space outer glow factor=.022,light-staff \@lr\space glow length=13mm,light-staff \@lr\space core width=.44mm} |
| 3645 |
\def\pingu@draw@wi@lightstaff#1{% |
| 3646 |
\pingu@setup@wing{lightstaff}{#1}% |
| 3647 |
\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 3648 |
\pingu@block{\csname pingu@color@lightstaff@#1@staff\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-11mm) -- ++(0,\csname pingu@lightstaff@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-lightstaff-#1-top) -- ++(0,-\csname pingu@lightstaff@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 3649 |
\pingu@draw@wi@lightstaff@pre{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col} |
| 3650 |
\pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} ([yshift=-1.1mm]\pingu@name-lightstaff-#1-top) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle; |
| 3651 |
\pingu@draw@wi@lightstaff@post{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col} |
| 3652 |
\endscope |
| 3653 |
} |
| 3654 |
|
| 3655 |
% #1 wing, #2 start, #3 color |
| 3656 |
\def\pingu@draw@wi@lightstaff@pre#1#2#3{ |
| 3657 |
\csname if@pingu@x@lightstaff@glow@#1\endcsname |
| 3658 |
\@for\i:={0,1,2,3,6,7,9,10,13}\do{ |
| 3659 |
\pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#3} (#2)++(0,-\i mm/15) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle; |
| 3660 |
% -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@[email protected]\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm); |
| 3661 |
} |
| 3662 |
\else % draw solid |
| 3663 |
\pingu@block{#3} (#2) -- ++(-.55mm,1mm) -- ++(0,2mm) -- ++(.55mm,1mm) -- ++(.55mm,-1mm) -- ++(0,-2mm) -- cycle; |
| 3664 |
\fi |
| 3665 |
} |
| 3666 |
|
| 3667 |
\def\pingu@draw@wi@lightstaff@post#1#2#3{ |
| 3668 |
\csname if@pingu@x@lightstaff@glow@#1\endcsname |
| 3669 |
\ifdim\csname pingu@x@lightstaff@ogf@#1\endcsname pt>\z@ |
| 3670 |
\pingu@layer{foreground}[] |
| 3671 |
\pgfinterruptboundingbox |
| 3672 |
\@for\i:={1,1.1,1.2,1.3,1.4}\do{ |
| 3673 |
\pingu@block[fill opacity=\csname pingu@x@lightstaff@ogf@#1\endcsname/\i]{#3} (#2)++(0,2mm) circle[radius=\i*\csname pingu@lightstaff@#1@glow@length\endcsname]; |
| 3674 |
} |
| 3675 |
\endpgfinterruptboundingbox |
| 3676 |
\pingu@block[opacity=.65]{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2)++(0,.5mm) -- ++(-.20mm,.75mm) -- ++(0,1.5mm) -- ++(.20mm,.75mm) -- ++(.20mm,-.75mm) -- ++(0,-1.5mm) -- cycle; |
| 3677 |
\endpingu@layer |
| 3678 |
\fi |
| 3679 |
% fadings hat a rotation angle bug |
| 3680 |
\@for\i:={1,2}\do{ |
| 3681 |
\pingu@block[fill opacity=.125*\i/10]{#3} (#2)++(0,-\i mm/15+2mm) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle; |
| 3682 |
} |
| 3683 |
\pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle; |
| 3684 |
\fi |
| 3685 |
} |
| 3686 |
% #endregion |
| 3687 |
|
| 3688 |
% #region shirts-lib |
| 3689 |
\newif\if@pingu@shirt@above |
| 3690 |
\pingu@create@extra{shirt}{% |
| 3691 |
shirt/.code = \pingu@set@extra{shirt}{true}\pingu@color{shirt}{#1}, |
| 3692 |
shirt/.default = pingu@bronze, |
| 3693 |
shirt above/.is if = @pingu@shirt@above, |
| 3694 |
shirt raise/.code = \def\pingu@shirt@raise{#1}, |
| 3695 |
shirt padding/.code = \def\pingu@shirt@padding{#1}, |
| 3696 |
shirt button top/.code = \pingu@color{shirt@button@top}{#1}, |
| 3697 |
shirt button middle/.code = \pingu@color{shirt@button@middle}{#1}, |
| 3698 |
shirt button bottom/.code = \pingu@color{shirt@button@bottom}{#1}, |
| 3699 |
shirt buttons/.style = {/pingu/shirt button top={#1}, /pingu/shirt button middle={#1}, /pingu/shirt button bottom={#1}}, |
| 3700 |
shirt button top shade/.code = \pingu@color{shirt@button@top@shade}{#1}, |
| 3701 |
shirt button middle shade/.code = \pingu@color{shirt@button@middle@shade}{#1}, |
| 3702 |
shirt button bottom shade/.code = \pingu@color{shirt@button@bottom@shade}{#1}, |
| 3703 |
shirt buttons shade/.style = {/pingu/shirt button top shade={#1}, /pingu/shirt button middle shade={#1}, /pingu/shirt button bottom shade={#1}}, |
| 3704 |
shirt without buttons/.forward to=/pingu/shirt no buttons, |
| 3705 |
shirt no buttons/.style = {/pingu/shirt buttons=\@pingu@none, /pingu/shirt buttons shade=\@pingu@none}, |
| 3706 |
}{shirt buttons=pingu@black,shirt padding=0mm,shirt button top shade=\pingu@color@shirt@button@top!70!\pingu@color@shirt!70!white,shirt button middle shade=\pingu@color@shirt@button@middle!70!\pingu@color@shirt!70!white,shirt button bottom shade=\pingu@color@shirt@button@bottom!70!\pingu@color@shirt!70!white,shirt raise=2.25mm,shirt above=false} |
| 3707 |
\def\pingu@draw@cloth@shirt@behind{} |
| 3708 |
|
| 3709 |
\def\pingu@draw@cloth@shirt@middle{\if@pingu@shirt@above\else\pingu@draw@cloth@shirt@main\fi} |
| 3710 |
|
| 3711 |
\def\pingu@draw@cloth@shirt@main{% |
| 3712 |
\coordinate (\pingu@name-shirt-low) at ([yshift=\pingu@shirt@raise]\pingu@name-belly-center); |
| 3713 |
\pingu@block{\pingu@color@shirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.18mm]\pingu@name-head-back-con-right) -- (\pingu@name-shirt-low) -- ([xshift=-.1mm,yshift=.24mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1.1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=-\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle; |
| 3714 |
|
| 3715 |
\coordinate (\pingu@name-shirt-bt) at ([yshift=-\pingu@one]\pingu@name-shirt-low); |
| 3716 |
\pingu@block{\pingu@color@shirt@button@top}(\pingu@name-shirt-bt) circle[radius=.4mm]; |
| 3717 |
\pingu@block{\pingu@color@shirt@button@middle}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm]; |
| 3718 |
\pingu@block{\pingu@color@shirt@button@bottom}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm]; |
| 3719 |
\pingu@block[even odd rule]{\pingu@color@shirt@button@top@shade}(\pingu@name-shirt-bt) circle[radius=.4mm] circle[radius=.465mm]; |
| 3720 |
\pingu@block[even odd rule]{\pingu@color@shirt@button@middle@shade}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm] circle[radius=.465mm]; |
| 3721 |
\pingu@block[even odd rule]{\pingu@color@shirt@button@bottom@shade}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm] circle[radius=.465mm]; |
| 3722 |
\@for\i:={0,90,180,270}\do{ |
| 3723 |
\pingu@block{\pingu@color@shirt@button@top@shade} (\pingu@name-shirt-bt)++(\i:. |
| 3724 |
25mm) circle[radius=.065mm]; |
| 3725 |
\pingu@block{\pingu@color@shirt@button@middle@shade} (\pingu@name-shirt-bt)++(0,-1.35mm)++(\i:.25mm) circle[radius=.065mm]; |
| 3726 |
\pingu@block{\pingu@color@shirt@button@bottom@shade} (\pingu@name-shirt-bt)++(0,2*-1.35mm)++(\i:.25mm) circle[radius=.065mm]; |
| 3727 |
}} |
| 3728 |
|
| 3729 |
% TODO: if flags to draw parts |
| 3730 |
\def\pingu@draw@cloth@shirt{\if@pingu@shirt@above\pingu@draw@cloth@shirt@main\fi} |
| 3731 |
|
| 3732 |
\pingu@create@extra{secondshirt}{% |
| 3733 |
second shirt/.code = \pingu@set@extra{secondshirt}{true}\pingu@color{secondshirt}{#1}, |
| 3734 |
second shirt raise/.code = \def\pingu@secondshirt@raise{#1}, |
| 3735 |
second shirt neck/.code = \pingu@color{secondshirt@neck}{#1}, |
| 3736 |
second shirt/.default = purple, |
| 3737 |
}{second shirt raise=3.35mm,second shirt neck=\pingu@color@secondshirt!32!pingu@white} |
| 3738 |
\def\pingu@draw@cloth@secondshirt@behind{} |
| 3739 |
|
| 3740 |
\def\pingu@draw@cloth@secondshirt@middle{% |
| 3741 |
\coordinate (\pingu@name-secondshirt-low) at ([yshift=\pingu@secondshirt@raise]\pingu@name-belly-center); |
| 3742 |
\pingu@block{\pingu@color@secondshirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.16mm,yshift=.09mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=-.22mm]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=.22mm]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle; |
| 3743 |
\pingu@draw{\pingu@color@secondshirt@neck} [rounded corners=.131mm] ([xshift=.025mm,yshift=-.09mm]\pingu@name-head-back-con-right) -- ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.19mm,yshift=.09mm]\pingu@name-head-back-con-left) -- ([xshift=-.02mm,yshift=-.02mm]\pingu@name-head-back-con-left); |
| 3744 |
} |
| 3745 |
|
| 3746 |
% TODO: if flags to draw parts |
| 3747 |
\def\pingu@draw@cloth@secondshirt{% |
| 3748 |
} |
| 3749 |
% #endregion |
| 3750 |
|
| 3751 |
% #region signs-lib |
| 3752 |
\pingu@create@wing@extra{signpost}{% |
| 3753 |
signpost \@lr/.forward to = /pingu/sign post \@lr, |
| 3754 |
sign post \@lr/.code = {\pingu@set@extra{signpost\@lr}{true}\@namedef{pingu@signpost@\@lr}{##1}}, |
| 3755 |
sign post \@lr/.default = {}, |
| 3756 |
signpost \@lr\space color/.forward to = /pingu/sign post \@lr\space color, |
| 3757 |
sign post \@lr\space color/.code = \pingu@color{signpost\@lr}{##1}, |
| 3758 |
signpost \@lr\space fontcolor/.forward to = /pingu/sign post \@lr\space font color, |
| 3759 |
sign post \@lr\space font color/.code = \pingu@color{signpost\@lr @font}{##1}, |
| 3760 |
}{sign post \@lr\space color=brown!70!black, sign post \@lr\space font color=white!90!brown} |
| 3761 |
\def\pingu@draw@wi@signpost#1{% |
| 3762 |
\pingu@setup@wing{signpost}{#1}% |
| 3763 |
\def\@rot{\if@pingu@wing@item@side@left@-5\else+5\fi}% |
| 3764 |
\scope[rotate around={\@angle+\@rot:(\pingu@name-wing-#1)}] |
| 3765 |
\pingu@block[thick]{\@col}(\pingu@name-wing-#1)++(\@sidesign*-.225mm,-2mm) -- ++(0,15mm) arc(180:0:\@sidesign*.45mm and .375mm) -- ++(0,-15mm) arc(360:180:\@sidesign*.45mm and .375mm) -- cycle; |
| 3766 |
\path (\pingu@name-wing-#1)++(\@sidesign*.225mm,13mm) node[fill=\@col,rounded corners=2\p@,minimum width=14mm,minimum height=8mm,align=center,rotate=\@angle+\@rot,text=\csname pingu@color@signpost#1@font\endcsname] {\csname pingu@signpost@#1\endcsname}; |
| 3767 |
\endscope |
| 3768 |
} |
| 3769 |
|
| 3770 |
\pingu@create@extra{banner}{% |
| 3771 |
banner/.code = \pingu@set@extra{banner}{true}\@namedef{pingu@banner}{#1}, |
| 3772 |
banner/.default = Bannertext, |
| 3773 |
banner band/.code = \pingu@color{banner@band}{#1}, |
| 3774 |
banner text color/.code = \pingu@color{banner@text@color}{#1}, |
| 3775 |
banner sticks color/.style={/pingu/banner stick left color=#1,/pingu/banner stick right color=#1}, |
| 3776 |
banner stick left color/.code = \pingu@color{banner@stick@left}{#1}, |
| 3777 |
banner stick right color/.code = \pingu@color{banner@stick@right}{#1}, |
| 3778 |
banner sticks length/.style={/pingu/banner stick left length=#1,/pingu/banner stick right length=#1}, |
| 3779 |
banner stick left length/.code = \@namedef{pingu@banner@stick@left@l}{#1}, |
| 3780 |
banner stick right length/.code = \@namedef{pingu@banner@stick@right@l}{#1}, |
| 3781 |
banner raise/.code = \@namedef{pingu@banner@raise}{#1}, |
| 3782 |
banner height/.code = \@namedef{pingu@banner@height}{#1}, |
| 3783 |
banner font/.code = \@namedef{pingu@banner@font}{#1}, |
| 3784 |
banner bent/.code = \@namedef{pingu@banner@bent}{#1} |
| 3785 |
}{banner band=pingu@white!91!pingu@black,banner text color=pingu@black,banner sticks color=pingu@bronze,banner stick left length=20mm, banner stick right length=20mm,banner bent=30,banner raise=-1mm,banner height=4mm,banner font=\bfseries} |
| 3786 |
|
| 3787 |
\usetikzlibrary{decorations.text} |
| 3788 |
\def\pingu@draw@ea@banner{% |
| 3789 |
\pingu@setup@wing{staff}{left}% we do not need the staff color, but we will use it |
| 3790 |
\scope[rotate around={\@angle:(\pingu@name-wing-left)}] |
| 3791 |
\pingu@block{\pingu@color@banner@stick@left}(\pingu@name-wing-left)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@left@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-left) -- ++(0,-\pingu@banner@stick@left@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 3792 |
\path (\pingu@name-s-left)++(.5mm,\pingu@banner@height) coordinate (\pingu@name-s-left-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-left-bot); |
| 3793 |
\endscope |
| 3794 |
\pingu@setup@wing{staff}{right}% we do not need the staff color, but we will use it |
| 3795 |
\scope[rotate around={\@angle:(\pingu@name-wing-right)}] |
| 3796 |
\pingu@block{\pingu@color@banner@stick@right}(\pingu@name-wing-right)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@right@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-right) -- ++(0,-\pingu@banner@stick@right@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle; |
| 3797 |
\path (\pingu@name-s-right)++(-.5mm,\pingu@banner@height) coordinate (\pingu@name-s-right-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-right-bot); |
| 3798 |
\endscope |
| 3799 |
\pingu@block[rounded corners=.3mm]{\pingu@color@banner@band} (\pingu@name-s-left-top) to[bend right=\pingu@banner@bent] (\pingu@name-s-right-top) -- (\pingu@name-s-right-bot) to[bend left=\pingu@banner@bent] (\pingu@name-s-left-bot) -- cycle; |
| 3800 |
\path[postaction={decorate},decoration={text color=\pingu@color@banner@text@color,text along path, raise=\pingu@banner@raise, text={|\pingu@banner@font|\pingu@banner},text align={center,left indent=1mm,right indent=1mm}}] (\pingu@name-s-right) to[bend left=\pingu@banner@bent+3] (\pingu@name-s-left); |
| 3801 |
} |
| 3802 |
% #endregion |
| 3803 |
|
| 3804 |
% #region sport-lib |
| 3805 |
\pingu@create@extra{medal}{% |
| 3806 |
medal/.code = {\pingu@set@extra{medal}{true}\pingu@color{medal}{#1}}, |
| 3807 |
medal/.default = pingu@yellow,% |
| 3808 |
gold medal/.style = {medal, medal text=#1}, gold medal/.default={1}, |
| 3809 |
silver medal/.style = {medal=pingu@silver, medal text=#1}, silver medal/.default={2}, |
| 3810 |
bronze medal/.style = {medal=pingu@bronze, medal text=#1}, bronze medal/.default={3}, |
| 3811 |
medal band/.code = \pingu@color{medal@band}{#1},% |
| 3812 |
medal shade/.code = \pingu@color{medal@shade}{#1},% |
| 3813 |
medal shade width/.code = \def\pingu@medal@shade@w{#1},% |
| 3814 |
medal text/.code = \def\pingu@x@medal@text{#1},% |
| 3815 |
medal text style/.style = {\pingu@color@medal!65!pingu@white}, |
| 3816 |
}{medal band=pingu@red,medal text={},medal shade={\pingu@color@medal!65!pingu@white},medal shade width=.75\p@} |
| 3817 |
|
| 3818 |
\def\pingu@draw@eb@medal{% |
| 3819 |
\coordinate (\pingu@name-medal-center) at ([yshift=1.25mm]\pingu@name-belly-center); |
| 3820 |
\pingu@block{\pingu@color@medal@band} [rounded corners=.15mm] (\pingu@name-head-back-con-right) -- (\pingu@name-medal-center) -- (\pingu@name-head-back-con-left) to[bend left=11] ++(-1.35mm,-.5mm) -- ([yshift=.7mm]\pingu@name-medal-center) -- ([xshift=1.35mm,yshift=-.5mm]\pingu@name-head-back-con-right) to[bend left=11] (\pingu@name-head-back-con-right) -- cycle; |
| 3821 |
\pingu@block{\pingu@color@medal} (\pingu@name-medal-center) circle [radius=2.35mm]; |
| 3822 |
\pingu@draw[line width=\pingu@medal@shade@w]{\pingu@color@medal@shade} (\pingu@name-medal-center) circle [radius=2.35mm]; |
| 3823 |
\node[/pingu/@text,/pingu/medal text style] at (\pingu@name-medal-center) {\pingu@x@medal@text}; |
| 3824 |
} |
| 3825 |
\newif\if@pingu@x@headband@knot@ |
| 3826 |
\newif\if@pingu@x@headband@bands@ |
| 3827 |
\pingu@create@extra{headband}{% |
| 3828 |
headband/.forward to = /pingu/head band, |
| 3829 |
head-band/.forward to = /pingu/head band, |
| 3830 |
head band/.code = \pingu@set@extra{headband}{true}\pingu@color{headband}{#1}, |
| 3831 |
head band/.default = pingu@red, |
| 3832 |
headband bend/.forward to = /pingu/head band bend, |
| 3833 |
head-band bend/.forward to = /pingu/head band bend, |
| 3834 |
head band bend/.code = \def\pingu@x@headband@bend{#1}, |
| 3835 |
headband angle/.forward to = /pingu/head band angle, |
| 3836 |
head-band angle/.forward to = /pingu/head band angle, |
| 3837 |
head band angle/.code = \def\pingu@x@headband@angle{#1}, |
| 3838 |
headband upper angle/.forward to = /pingu/head band upper angle, |
| 3839 |
head-band upper angle/.forward to = /pingu/head band upper angle, |
| 3840 |
head band upper angle/.code = \def\pingu@x@headband@upangle{#1}, |
| 3841 |
% knot |
| 3842 |
headband knot/.forward to = /pingu/head band knot, |
| 3843 |
head-band knot/.forward to = /pingu/head band knot, |
| 3844 |
head band knot/.is if = @pingu@x@headband@knot@, |
| 3845 |
headband knot color/.forward to = /pingu/head band knot color, |
| 3846 |
head-band knot color/.forward to = /pingu/head band knot color, |
| 3847 |
head band knot color/.code = \pingu@color{headband@knot}{#1}, |
| 3848 |
headband knot a color/.forward to = /pingu/head band knot a color, |
| 3849 |
head-band knot a color/.forward to = /pingu/head band knot a color, |
| 3850 |
head band knot a color/.code = \pingu@color{headband@knot@a}{#1}, |
| 3851 |
headband knot b color/.forward to = /pingu/head band knot b color, |
| 3852 |
head-band knot b color/.forward to = /pingu/head band knot b color, |
| 3853 |
head band knot b color/.code = \pingu@color{headband@knot@b}{#1}, |
| 3854 |
headband bands/.forward to = /pingu/head band bands, |
| 3855 |
head-band bands/.forward to = /pingu/head band bands, |
| 3856 |
head band bands/.is if = @pingu@x@headband@bands@, |
| 3857 |
headband bands a color/.forward to = /pingu/head band bands a color, |
| 3858 |
head-band bands a color/.forward to = /pingu/head band bands a color, |
| 3859 |
head band bands a color/.code = \pingu@color{headband@bands@a}{#1}, |
| 3860 |
headband bands b color/.forward to = /pingu/head band bands b color, |
| 3861 |
head-band bands b color/.forward to = /pingu/head band bands b color, |
| 3862 |
head band bands b color/.code = \pingu@color{headband@bands@b}{#1}, |
| 3863 |
}{head band bend=9, head band angle=17,head band upper angle=50, head band knot color=\pingu@color@headband!78!black,head band knot a color=\pingu@color@headband@knot!90!black,head band knot b color=\pingu@color@headband@knot@a,head band bands,head band bands a color=\pingu@color@headband!78!black,head band bands b color=\pingu@color@headband} |
| 3864 |
|
| 3865 |
\def\pingu@draw@ea@headband@wh{1.25mm} |
| 3866 |
\def\pingu@draw@ea@headband{% |
| 3867 |
\path (\pingu@name-head-center)+(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-lower); |
| 3868 |
\path (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-upper); |
| 3869 |
\if@pingu@x@headband@bands@ |
| 3870 |
\pingu@block{\pingu@color@headband@bands@a} (\pingu@name-head-band-lower) to[out=-50,in=75] ++(2.75mm,-4mm) to[bend right] ++(.6mm,0) to[out=80,in=-5] (\pingu@name-head-band-upper) -- cycle; |
| 3871 |
\pingu@block{\pingu@color@headband@bands@b} (\pingu@name-head-band-lower) to[out=-80,in=80] ++(1.75mm,-3.35mm) to[bend right] ++(.45mm,0) to[out=80,in=-8] (\pingu@name-head-band-upper) -- cycle; |
| 3872 |
\fi |
| 3873 |
\pingu@block{\pingu@color@headband} (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) to[bend left=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-a) +(180-\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) arc(180-\pingu@x@headband@upangle:180-\pingu@x@headband@upangle+\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) to[bend right=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-b) (\pingu@name-head-band-lower) arc(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) -- cycle; |
| 3874 |
\path (\pingu@name-headband-center-a) -- (\pingu@name-headband-center-b) coordinate[pos=.5] (\pingu@name-headband-center); |
| 3875 |
\if@pingu@x@headband@knot@ |
| 3876 |
\pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@a} (\pingu@name-headband-center-a)++(-.15mm,-.6mm) to[out=155,in=-5] ++(-3mm,\pingu@one) to[bend right=15] ([xshift=-3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-155,out=5] ++(.285cm,.8mm) -- cycle; |
| 3877 |
\pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@b} (\pingu@name-headband-center-a)++(.15mm,-.6mm) to[out=25,in=-175] ++(3mm,\pingu@one) to[bend left=15] ([xshift=3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-25,out=175] ++(-.285cm,.8mm) -- cycle; |
| 3878 |
\pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot} (\pingu@name-headband-center-a)++(-\pingu@draw@ea@headband@wh,.12mm) to[bend right=9] ++(2*\pingu@draw@ea@headband@wh,0) -- ([xshift=\pingu@draw@ea@headband@wh,yshift=-.12mm]\pingu@name-headband-center-b) to[bend right=9] ++(-2*\pingu@draw@ea@headband@wh, 0) -- cycle; |
| 3879 |
\fi |
| 3880 |
} |
| 3881 |
% #endregion |
| 3882 |
|
| 3883 |
% #region technology-lib |
| 3884 |
\pingu@create@extra{vrheadset}{% |
| 3885 |
vr-headset/.code = \pingu@set@extra{vrheadset}{true}\pingu@color{vrheadset}{#1}, |
| 3886 |
vr-headset/.default = pingu@black!92!gray, |
| 3887 |
vr-headset band/.code = \pingu@color{vrheadset@band}{#1}, |
| 3888 |
vr-headset band top/.code = \pingu@color{vrheadset@band@top}{#1}, |
| 3889 |
vr-headset text/.code = \def\pingu@x@vrheadset@text{#1}, |
| 3890 |
vr-headset text color/.code = \pingu@color{vrheadset@text@color}{#1}, |
| 3891 |
vr-headset hair/.style = {/pingu/hair 2=!hide,/pingu/hair 3=!hide,/pingu/hair 4=!hide} |
| 3892 |
}{vr-headset band=\pingu@color@vrheadset!92!gray,vr-headset text={\textit{\textsf{VR\thinspace\texttrademark}}},vr-headset text color=pingu@white,vr-headset band top=\pingu@color@vrheadset!96!gray} |
| 3893 |
|
| 3894 |
\def\pingu@draw@ea@vrheadset{% |
| 3895 |
\pingu@layer{middle}[] |
| 3896 |
\pingu@block{\pingu@color@vrheadset} [rounded corners=1.25mm]([yshift=3.45mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=2] coordinate[pos=.5] (@) ([yshift=3.45mm]\pingu@name-waist-left|-\pingu@name-eye-left) to[bend left=3] coordinate (\pingu@name-vrh-ol) ++(0,-6.25mm) to[bend left=13] ([yshift=-1mm]\pingu@name-head-center) to[bend left=13] ([yshift=3.45mm-6.25mm]\pingu@name-waist-right|-\pingu@name-eye-right) -- cycle; |
| 3897 |
\path (\pingu@name-vrh-ol)++(-2.25mm,2mm) node[text=\pingu@color@vrheadset@text@color,scale=.25] {\pingu@x@vrheadset@text}; |
| 3898 |
\endpingu@layer |
| 3899 |
\if@pingu@do@back@\else |
| 3900 |
% top band |
| 3901 |
\pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@)++(-1.05mm+.15mm,0) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend left=2] ++(1.6mm,0) to[bend left=2] ([xshift=1.25mm+.15mm]@); |
| 3902 |
\fi |
| 3903 |
% we draw a band for the background |
| 3904 |
\pingu@layer{background}[] |
| 3905 |
\pingu@block[line cap=round]{\pingu@color@vrheadset@band} ([yshift=1mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=3] coordinate[pos=.5] (@b) ([yshift=1mm]\pingu@name-waist-left|-\pingu@name-eye-left) arc(90:-90:.25mm and 1mm) to[bend right=3] ([yshift=-1mm]\pingu@name-waist-right|-\pingu@name-eye-right) arc (270:90:.25mm and 1mm); |
| 3906 |
\pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@b)++(-1.25mm+.2mm,-1.25mm) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend right=2] ++(1.6mm,0) to[bend right=2] ([xshift=1.15mm+.2mm,yshift=-1.25mm]@b) -- cycle; |
| 3907 |
\endpingu@layer |
| 3908 |
} |
| 3909 |
\pingu@create@extra{headphone}{% |
| 3910 |
headphones/.forward to = /pingu/headphone, |
| 3911 |
headphone/.code = \pingu@set@extra{headphone}{true}\pingu@color{headphone}{#1}, |
| 3912 |
headphone/.default = pingu@blue!80!pingu@black, |
| 3913 |
headphone left/.code = \pingu@color{headphone@left}{#1}, |
| 3914 |
headphone right/.code = \pingu@color{headphone@right}{#1}, |
| 3915 |
headphones outer/.forward to = /pingu/headphone outer, |
| 3916 |
headphone outer/.style = {/pingu/headphone left outer=#1,/pingu/headphone right outer=#1}, headphone outer/.default = pingu@black, |
| 3917 |
headphone left outer/.code = \pingu@color{headphone@left@p}{#1}, headphone left outer/.default =pingu@black, |
| 3918 |
headphone right outer/.code = \pingu@color{headphone@right@p}{#1}, headphone right outer/.default=pingu@black, |
| 3919 |
headphones inner/.forward to = /pingu/headphone inner, |
| 3920 |
headphone inner/.style = {/pingu/headphone left inner=#1,/pingu/headphone right inner=#1}, headphone inner/.default = pingu@black, |
| 3921 |
headphone left inner/.code = \pingu@color{headphone@left@i}{#1}, headphone left inner/.default = pingu@black, |
| 3922 |
headphone right inner/.code = \pingu@color{headphone@right@i}{#1}, headphone right inner/.default=pingu@black, |
| 3923 |
}{headphone left=\pingu@color@headphone!65!pingu@black,headphone right=\pingu@color@headphone@left,headphone left outer=\@pingu@none, |
| 3924 |
,headphone right outer=\@pingu@none,,headphone left inner=\@pingu@none, |
| 3925 |
,headphone right inner=\@pingu@none} |
| 3926 |
|
| 3927 |
\def\pingu@draw@ea@headphone{% |
| 3928 |
\if@pingu@do@back@ \pingu@layer{background}[] \fi |
| 3929 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@p} ([xshift=-\pingu@one,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (93:273:.565mm and 2.11mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm); |
| 3930 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@i} ([xshift=\[email protected],yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (87:-93:.565mm and 2.14mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle; |
| 3931 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right} ([xshift=-\pingu@one+.2mm,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (92:272:.565mm and 2.1mm) -- ++(.8mm,-.05mm) arc (270:450:.425mm and 2.1mm) -- cycle; |
| 3932 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@p} ([xshift=\pingu@one,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (87:-93:.565mm and 2.11mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle; |
| 3933 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@i} ([xshift=-\pingu@one+.366mm,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (93:273:.565mm and 2.14mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm); |
| 3934 |
\pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left} ([xshift=\[email protected],yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (88:-92:.565mm and 2.1mm) -- ++(-.8mm,-.05mm) arc (270:90:.425mm and 2.1mm) -- cycle; |
| 3935 |
\pingu@block{\pingu@color@headphone} ([xshift=-\pingu@one,yshift=1.75\pingu@one]\pingu@name-wings-side-right|-\pingu@name-eye-right) |
| 3936 |
arc(180:0:{\pingu@one+\pingu@w@half} and {\pingu@head@[email protected]\pingu@one}) arc(0:-180:.6mm and .33mm) |
| 3937 |
arc(0:180:{\pingu@one+\pingu@w@half-2*.6mm} and {\pingu@head@h@half+.33\pingu@one-2*.6mm-1.8\pingu@one}) |
| 3938 |
arc(0:-180:.6mm and .33mm) -- cycle; |
| 3939 |
\if@pingu@do@back@ \endpingu@layer \fi |
| 3940 |
} |
| 3941 |
|
| 3942 |
\pingu@create@wing@extra{vrcontroller}{% |
| 3943 |
vr-controller \@lr/.code = {\pingu@set@extra{vrcontroller\@lr}{true}\pingu@color{vrcontroller\@lr}{##1}}, |
| 3944 |
vr-controller \@lr/.default = pingu@green, |
| 3945 |
vr-controller \@lr\space handle/.code = \pingu@color{vrcontroller\@lr @handle}{##1},% |
| 3946 |
vr-controller \@lr\space second/.code = \pingu@color{vrcontroller\@lr @second}{##1},% |
| 3947 |
vr-controller \@lr\space second shade/.code = \pingu@color{vrcontroller\@lr @second@shade}{##1}% |
| 3948 |
}{vr-controller \@lr\space handle={\csname pingu@color@vrcontroller\@lr\endcsname!76!pingu@black},vr-controller \@lr\space second={\csname pingu@color@vrcontroller\@lr\endcsname!56!pingu@black},vr-controller \@lr\space second shade={\csname pingu@color@vrcontroller\@lr\endcsname!96!pingu@black}} |
| 3949 |
|
| 3950 |
% #1 wing |
| 3951 |
\def\pingu@draw@wi@vrcontroller#1{% |
| 3952 |
\pingu@setup@wing{vrcontroller}{#1}% |
| 3953 |
\pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,5mm) to[bend right=1] ++(-.25mm,-5.5mm) arc (0:-180:.325mm and .1mm) to[bend right=1] ++(-.7mm,5.5mm) -- cycle coordinate[pos=.5] (@); |
| 3954 |
\def\@y{2.06mm} \def\@@y{.78mm} |
| 3955 |
\pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)},even odd rule]{\csname pingu@color@vrcontroller#1@second\endcsname}([yshift=.1mm]@) arc (90:450:{\@y} and 1mm) coordinate[pos=.25] (@r) coordinate[pos=.75] (@l) ([yshift=-.6mm]@) arc (90:0:{\@@y} and .25mm) arc (0:-180:{\@@y} and .35mm) arc (180:90:{\@@y} and .25mm); |
| 3956 |
% \pingu@draw[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second@shade\endcsname} ([yshift=-.9mm]@)++(180:{\@@y} and .3mm) arc (180:0:{\@@y} and .3mm); |
| 3957 |
\def\@toruslow{(@l) to[bend left=7] ++(-.2mm,-.875mm) to[bend left=15] coordinate[pos=.95] (@c) ++(-2*\@y+.4mm,0) [sharp corners] to[bend left=7] ++(-.2mm,.875mm) to[bend right=30] cycle} |
| 3958 |
\pingu@block[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second\endcsname} \@toruslow; |
| 3959 |
\scope[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}] |
| 3960 |
\clip \@toruslow; |
| 3961 |
\pingu@block[opacity=.1]{black} (@l) to[bend left=14] (@c) -- ++(0,-2mm) -| cycle; |
| 3962 |
\endscope |
| 3963 |
} |
| 3964 |
|
| 3965 |
|
| 3966 |
\pingu@create@wing@extra{laptop}{% |
| 3967 |
laptop \@lr/.code = {\pingu@set@extra{laptop\@lr}{true}\pingu@color{laptop\@lr}{##1}}, |
| 3968 |
laptop \@lr/.default = gray!80!pingu@white, |
| 3969 |
laptop \@lr\space bracket/.code = \pingu@color{laptop\@lr @bracket}{##1}, |
| 3970 |
laptop \@lr\space lower/.code = \pingu@color{laptop\@lr @lower}{##1}, |
| 3971 |
laptop \@lr\space key/.code = \pingu@color{laptop\@lr @key}{##1}, |
| 3972 |
laptop \@lr\space display/.code = \pingu@color{laptop\@lr @display}{##1}, |
| 3973 |
laptop \@lr\space content/.code = \@namedef{pingu@x@laptop\@lr @content}{##1}, % tikz content |
| 3974 |
laptop \@lr\space mid/.code = \@namedef{pingu@x@laptop\@lr @mid}{##1}, % tikz content |
| 3975 |
}{laptop \@lr\space bracket=pingu@black!80!\csname pingu@color@laptop\@lr\endcsname,laptop \@lr\space lower=\csname pingu@color@laptop\@lr\endcsname!95!pingu@black,laptop \@lr\space key=\csname pingu@color@laptop\@lr\endcsname!92!pingu@white,laptop \@lr\space display=\csname pingu@color@laptop\@lr\endcsname!32!pingu@white,laptop \@lr\space content={},laptop \@lr\space mid={}} |
| 3976 |
|
| 3977 |
% #1 wing |
| 3978 |
\def\pingu@draw@wi@laptop#1{% |
| 3979 |
\pingu@setup@wing{laptop}{#1}% |
| 3980 |
\scope[rotate around={\@angle+5:(\pingu@name-wing-#1)},shift={(\pingu@name-wing-#1)}] |
| 3981 |
\pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@lower\endcsname}(-6.9mm,0) -- ++(-.1mm,-4.75mm) -- ++(14mm,0) -- ++(-.1mm,4.75mm) -- cycle; |
| 3982 |
\pingu@block[rounded corners=1pt]{\@col}(-6.9mm,0) -- ++(0,7mm) -- ++(13.8mm,0) -- ++(0,-7mm) -- cycle; |
| 3983 |
\pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@bracket\endcsname}(-6.4mm,.125mm) -- ++(0,-.25mm) -- ++(12.8mm,0) -- ++(0,.25mm) -- cycle; |
| 3984 |
% keys |
| 3985 |
\foreach[count=\y from 0,evaluate=\y as \extpadding using 0.005*\y,evaluate=\y as \rextpadding using 0.05*\y] \row in { |
| 3986 |
% manually account for padding |
| 3987 |
{0,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
| 3988 |
{.63,1.5,1,1,1,1,1,1,1,1,1,1,1}, |
| 3989 |
{0,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
| 3990 |
{0,1,1,1,1,1,4.62,1,1,1,1}, |
| 3991 |
} { |
| 3992 |
\def\lengthincr{-\rextpadding mm} |
| 3993 |
\foreach[count=\i from 0,evaluate=\len as \l using 0.85*\len] \len in \row { |
| 3994 |
\ifnum\i=0 \else % first one is silent: |
| 3995 |
\pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@key\endcsname}(\lengthincr-6.4mm,-\y mm-.5mm) rectangle ++(\l mm,-.75mm) node[midway,centered,text=\@col,scale=.3] {\textbullet}; |
| 3996 |
\fi |
| 3997 |
\xdef\lengthincr{\the\dimexpr\lengthincr+\l mm+.13mm+\extpadding mm} |
| 3998 |
} |
| 3999 |
} |
| 4000 |
% display, we modify the lower shift to adjust height offset |
| 4001 |
\pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@display\endcsname}(-6.7mm,.25mm+.05mm) rectangle ++(13.4mm,6.45mm) node[midway,centered,rotate=\@angle+5,text width=13.2mm,align=center,minimum height=6.2mm] {\csname pingu@x@laptop#1@mid\endcsname}; |
| 4002 |
\scope[shift={(-6.7mm,.25mm+.05mm)}] |
| 4003 |
\csname pingu@x@laptop#1@content\endcsname |
| 4004 |
\endscope |
| 4005 |
\endscope |
| 4006 |
} |
| 4007 |
% #endregion |
| 4008 |
|
| 4009 |
% TODO: alias to flip flop and flip flop |
| 4010 |
\pingu@create@extra{flipflop}{% |
| 4011 |
flip-flops/.code = {\pingu@set@extra{flipflop}{true}\pingu@color{flipflop}{#1}}, |
| 4012 |
flip-flops/.default = pingu@blue!70!pingu@white!60!cyan,% |
| 4013 |
flip-flops base left/.code = \pingu@color{flipflop@base@left}{#1},% |
| 4014 |
flip-flops band left/.code = \pingu@color{flipflop@band@left}{#1},% |
| 4015 |
flip-flops base right/.code = \pingu@color{flipflop@base@right}{#1},% |
| 4016 |
flip-flops band right/.code = \pingu@color{flipflop@band@right}{#1},% |
| 4017 |
flip-flops color right/.code = \pingu@color{flipflop@right}{#1},% |
| 4018 |
}{flip-flops base left=\pingu@color@flipflop!45!pingu@black, flip-flops band left=\pingu@color@flipflop@base@left!35!pingu@red, flip-flops base right=\pingu@color@flipflop@base@left, flip-flops band right=\pingu@color@flipflop@band@left, flip-flops color right=\pingu@color@flipflop} |
| 4019 |
|
| 4020 |
\def\@pingu@x@flipflop@path@right{([xshift=-2.33mm+\@tmpshift,yshift=1.33mm-\@tmpshift]\pingu@name-foot-right) to[out=255,in=180] coordinate[pos=.64] (@a) ++(1mm-.75*\@tmpshift,-2*\pingu@foot@single@h) to[bend right=14] coordinate[pos=.82,yshift=.65mm] (@c) ++(2.85mm+.75*\@tmpshift,1mm) % to[out=-4,in=184] |
| 4021 |
to[out=35,in=-110] coordinate[pos=.51] (@b) ++(.7mm,2*\pingu@foot@single@h) |
| 4022 |
} |
| 4023 |
\def\@pingu@x@flipflop@path@left{([xshift=2.66mm-\@tmpshift,yshift=1.33mm-\@tmpshift]\pingu@name-foot-left) to[out=-180+255,in=0] coordinate[pos=.75] (@b) ++(-1mm+.75*\@tmpshift,-2*\pingu@foot@single@h) to[bend left=14] coordinate[pos=.82,yshift=.65mm] (@c) ++(-3.25mm-.75*\@tmpshift,1mm) % to[out=-4,in=184] |
| 4024 |
to[out=180-35,in=-70] coordinate[pos=.45] (@a) ++(-.7mm,2*\pingu@foot@single@h) |
| 4025 |
} |
| 4026 |
% coordinate[pos=.84] (@a) ++(2.5mm,-2*\pingu@foot@[email protected]) coordinate (@c) to[out=0,in=285] coordinate[pos=.575] (@b) ++(2.5mm,2*\pingu@foot@single@h+1mm)} |
| 4027 |
\def\pingu@draw@eb@flipflop{% |
| 4028 |
\scope[rotate around={-\basicfeetbend+10:(\pingu@name-foot-right)}] % TODO |
| 4029 |
\def\@tmpshift{0mm} |
| 4030 |
\pgfonlayer{very-background} |
| 4031 |
{\def\@tmpshift{.25mm}\pingu@block{\pingu@color@flipflop@base@right} \@pingu@x@flipflop@path@right;} |
| 4032 |
\pingu@block{\pingu@color@flipflop@right} \@pingu@x@flipflop@path@right; |
| 4033 |
\endpgfonlayer |
| 4034 |
\clip\@pingu@x@flipflop@path@right; |
| 4035 |
\pingu@draw[thick,line join=round]{\pingu@color@flipflop@band@right} ([xshift=-1mm]@a) to[out=15,in=140] ([yshift=.2mm]@c) coordinate(@) -- ++(.1mm,-.25mm) (@) to[out=55,in=175] ([xshift=1mm]@b); |
| 4036 |
\endscope |
| 4037 |
\scope[rotate around={\basicfeetbend-10:(\pingu@name-foot-left)}] % TODO |
| 4038 |
\def\@tmpshift{0mm} |
| 4039 |
\pgfonlayer{very-background} |
| 4040 |
{\def\@tmpshift{.25mm}\pingu@block{\pingu@color@flipflop@base@left} \@pingu@x@flipflop@path@left;} |
| 4041 |
\pingu@block{\pingu@color@flipflop} \@pingu@x@flipflop@path@left; |
| 4042 |
\endpgfonlayer |
| 4043 |
\clip\@pingu@x@flipflop@path@left; |
| 4044 |
\pingu@draw[thick,line join=round]{\pingu@color@flipflop@band@left} ([xshift=-1mm]@a) to[out=15,in=115] ([yshift=.2mm]@c) coordinate(@) -- ++(-.1mm,-.25mm) (@) to[out=40,in=175] ([xshift=1mm]@b); |
| 4045 |
\endscope |
| 4046 |
} |
| 4047 |
|
| 4048 |
\pingu@create@extra{shoes}{% |
| 4049 |
shoes/.code = {\pingu@set@extra{shoes}{true}\pingu@color{shoes}{#1}}, |
| 4050 |
shoes/.default = pingu@bronze!70!pingu@red!80!pingu@white!80!brown,% |
| 4051 |
shoes base left/.code = \pingu@color{shoes@base@left}{#1},% |
| 4052 |
shoes base right/.code = \pingu@color{shoes@base@right}{#1},% |
| 4053 |
shoes color right/.code = \pingu@color{shoes@right}{#1},% |
| 4054 |
}{shoes base left=\pingu@color@shoes!45!pingu@white!90!yellow, shoes base right=\pingu@color@shoes@base@left, shoes color right=\pingu@color@shoes} |
| 4055 |
|
| 4056 |
\def\pingu@shoesrot{20} |
| 4057 |
\def\@pingu@x@shoes@path@right{([xshift=-2.33mm+0.95*\@tmpshift,yshift=1.33mm-1.65*\@tmpshift]\pingu@name-foot-right) to[out=245,in=160] ++(1mm-.75*\@tmpshift,-1.9*\pingu@foot@single@h) to[out=-20,in=230] ++(3.2mm+.75*\@tmpshift,.8mm) % to[out=-4,in=184] |
| 4058 |
to[out=50,in=-95] ++(.2mm,1.9*\pingu@foot@single@h) |
| 4059 |
} |
| 4060 |
\def\@pingu@x@shoes@path@left{([xshift=2.33mm-\@tmpshift,yshift=1.33mm-1.65*\@tmpshift]\pingu@name-foot-left) to[out=295,in=20] ++(-1mm+.75*\@tmpshift,-1.9*\pingu@foot@single@h) to[out=200,in=-50] ++(-3.2mm-.75*\@tmpshift,.8mm) % to[out=-4,in=184] |
| 4061 |
to[out=130,in=-85] ++(-.2mm,1.9*\pingu@foot@single@h) |
| 4062 |
} |
| 4063 |
|
| 4064 |
\def\pingu@draw@eb@shoes{% |
| 4065 |
\pgfonlayer{middle} |
| 4066 |
\scope[rotate around={-\basicfeetbend+\pingu@shoesrot:(\pingu@name-foot-right)}] |
| 4067 |
\def\@tmpshift{0mm} |
| 4068 |
\pgfinterruptboundingbox |
| 4069 |
% counter rotate |
| 4070 |
\path[/pingu/@invclip,rotate around={+\basicfeetbend-\pingu@shoesrot:(\pingu@name-foot-right)}] \pingu@path@lowerpingu; \endpgfinterruptboundingbox |
| 4071 |
{\def\@tmpshift{.3mm}\pingu@block{\pingu@color@shoes@base@right} \@pingu@x@shoes@path@right;} |
| 4072 |
\pingu@block{\pingu@color@shoes@right} \@pingu@x@shoes@path@right; |
| 4073 |
\endscope |
| 4074 |
\scope[rotate around={\basicfeetbend-\pingu@shoesrot:(\pingu@name-foot-left)}] % TODO |
| 4075 |
\def\@tmpshift{0mm} |
| 4076 |
\pgfinterruptboundingbox |
| 4077 |
% counter rotate |
| 4078 |
\path[/pingu/@invclip,rotate around={-\basicfeetbend+\pingu@shoesrot:(\pingu@name-foot-left)}] \pingu@path@lowerpingu; \endpgfinterruptboundingbox |
| 4079 |
{\def\@tmpshift{.3mm}\pingu@block{\pingu@color@shoes@base@left} \@pingu@x@shoes@path@left;} |
| 4080 |
\pingu@block{\pingu@color@shoes} \@pingu@x@shoes@path@left; |
| 4081 |
\endscope |
| 4082 |
\endpgfonlayer |
| 4083 |
} |
| 4084 |
|
| 4085 |
\pingu@create@extra{sneaker}{% |
| 4086 |
sneaker/.code = {\pingu@set@extra{sneaker}{true}\pingu@color{sneaker}{#1}}, |
| 4087 |
sneaker/.default = pingu@bronze!70!pingu@red!80!pingu@white!80!brown,% |
| 4088 |
sneaker base left/.code = \pingu@color{sneaker@base@left}{#1},% |
| 4089 |
sneaker base right/.code = \pingu@color{sneaker@base@right}{#1},% |
| 4090 |
sneaker front left/.code = \pingu@color{sneaker@front@left}{#1},% |
| 4091 |
sneaker front right/.code = \pingu@color{sneaker@front@right}{#1},% |
| 4092 |
sneaker side left/.code = \pingu@color{sneaker@side@left}{#1},% |
| 4093 |
sneaker side right/.code = \pingu@color{sneaker@side@right}{#1},% |
| 4094 |
sneaker band left/.code = \pingu@color{sneaker@band@left}{#1},% |
| 4095 |
sneaker band right/.code = \pingu@color{sneaker@band@right}{#1},% |
| 4096 |
sneaker color right/.code = \pingu@color{sneaker@right}{#1},% |
| 4097 |
}{sneaker base left=\pingu@color@sneaker!45!pingu@white!90!yellow, sneaker base right=\pingu@color@sneaker@base@left, sneaker color right=\pingu@color@sneaker,sneaker front left=\pingu@color@sneaker!32!pingu@white!83!yellow,sneaker front right=\pingu@color@sneaker@front@left,sneaker side left=\pingu@color@sneaker!60!pingu@black!85!red!74!brown,sneaker side right=\pingu@color@sneaker@side@left,sneaker band left=\pingu@color@sneaker!60!pingu@black!35!red,sneaker band right=\pingu@color@sneaker@band@left} |
| 4098 |
|
| 4099 |
\def\pingu@sneakerrot{20} |
| 4100 |
\def\@pingu@x@sneaker@path@right{([xshift=-2.33mm+0.95*\@tmpshift,yshift=1.33mm-1.65*\@tmpshift]\pingu@name-foot-right) to[out=245,in=160] coordinate[pos=.71] (\@tmpprefix @a) coordinate[pos=.85] (\@tmpprefix @x) ++(1mm-.75*\@tmpshift,-1.9*\pingu@foot@single@h) to[out=-20,in=230] coordinate[pos=.85] (\@tmpprefix @y) ++(3.2mm+.75*\@tmpshift,.8mm) % to[out=-4,in=184] |
| 4101 |
to[out=50,in=-95] coordinate[pos=.14] (\@tmpprefix @b) ++(.2mm,1.9*\pingu@foot@single@h) |
| 4102 |
} |
| 4103 |
\def\@pingu@x@sneaker@path@left{([xshift=2.33mm-\@tmpshift,yshift=1.33mm-1.65*\@tmpshift]\pingu@name-foot-left) to[out=295,in=20] coordinate[pos=.76] (\@tmpprefix @a) coordinate[pos=.85] (\@tmpprefix @x) ++(-1mm+.75*\@tmpshift,-1.9*\pingu@foot@single@h) to[out=200,in=-50] coordinate[pos=.9] (\@tmpprefix @y) ++(-3.2mm-.75*\@tmpshift,.8mm) % to[out=-4,in=184] |
| 4104 |
to[out=130,in=-85] coordinate[pos=.16] (\@tmpprefix @b) ++(-.2mm,1.9*\pingu@foot@single@h) |
| 4105 |
} |
| 4106 |
|
| 4107 |
\def\pingu@draw@eb@sneaker{% |
| 4108 |
\pgfonlayer{middle} |
| 4109 |
\scope[rotate around={-\basicfeetbend+\pingu@sneakerrot:(\pingu@name-foot-right)}] |
| 4110 |
\let\@tmpprefix\@empty |
| 4111 |
\def\@tmpshift{0mm} |
| 4112 |
\pgfinterruptboundingbox |
| 4113 |
% counter rotate |
| 4114 |
\path[/pingu/@invclip,rotate around={+\basicfeetbend-\pingu@sneakerrot:(\pingu@name-foot-right)}] \pingu@path@lowerpingu; \endpgfinterruptboundingbox |
| 4115 |
{\def\@tmpshift{.3mm}\pingu@block[draw]{\pingu@color@sneaker@base@right} \@pingu@x@sneaker@path@right;} |
| 4116 |
\pingu@block[semithick,draw]{\pingu@color@sneaker@right} \@pingu@x@sneaker@path@right; |
| 4117 |
\scope |
| 4118 |
\def\@tmpprefix{x} |
| 4119 |
\clip\@pingu@x@sneaker@path@right; |
| 4120 |
\pingu@block[draw]{\pingu@color@sneaker@front@right} (@a) to[bend left=13] (@b) to[bend left=90,looseness=1.5] cycle; |
| 4121 |
\pingu@block[draw]{\pingu@color@sneaker@side@right} (@x) to[bend right=30] coordinate[pos=.2] (@x1) coordinate[pos=.32] (@x2) ++(-0.5mm,3*\pingu@foot@single@h) to[bend right=50,looseness=1.5] cycle; |
| 4122 |
\pingu@block[draw]{\pingu@color@sneaker@side@right} (@y) to[bend left=30] coordinate[pos=.24] (@y1) coordinate[pos=.36] (@y2) ++(0.5mm,3*\pingu@foot@single@h) to[bend left=50,looseness=1.5] cycle; |
| 4123 |
\pingu@draw[line cap=round,thin,double=\pingu@color@sneaker@band@right]{black} ([xshift=-.33mm]@x1) to[bend left=20] ([xshift=.33mm]@y1); |
| 4124 |
\pingu@draw[line cap=round,thin,double=\pingu@color@sneaker@band@right]{black} ([xshift=-.5mm]@x2) to[bend left=20] ([xshift=.5mm]@y2); |
| 4125 |
\endscope |
| 4126 |
% redraw |
| 4127 |
\pingu@draw[semithick]{black} \@pingu@x@sneaker@path@right; |
| 4128 |
\endscope |
| 4129 |
\scope[rotate around={\basicfeetbend-\pingu@sneakerrot:(\pingu@name-foot-left)}] |
| 4130 |
\let\@tmpprefix\@empty |
| 4131 |
\def\@tmpshift{0mm} |
| 4132 |
\pgfinterruptboundingbox |
| 4133 |
% counter rotate |
| 4134 |
\path[/pingu/@invclip,rotate around={-\basicfeetbend+\pingu@sneakerrot:(\pingu@name-foot-left)}] \pingu@path@lowerpingu; \endpgfinterruptboundingbox |
| 4135 |
{\def\@tmpshift{.3mm}\pingu@block[draw]{\pingu@color@sneaker@base@left} \@pingu@x@sneaker@path@left;} |
| 4136 |
\pingu@block[semithick,draw]{\pingu@color@sneaker} \@pingu@x@sneaker@path@left; |
| 4137 |
\scope |
| 4138 |
\def\@tmpprefix{x} |
| 4139 |
\clip\@pingu@x@sneaker@path@left; |
| 4140 |
\pingu@block[draw]{\pingu@color@sneaker@front@left} (@a) to[bend right=13] (@b) to[bend right=90,looseness=1.5] (@a); |
| 4141 |
\pingu@block[draw]{\pingu@color@sneaker@side@left} (@x) to[bend left=25] coordinate[pos=.2] (@y1) coordinate[pos=.32] (@y2) ++(-0.5mm,3*\pingu@foot@single@h) to[bend left=50,looseness=1.5] cycle; |
| 4142 |
\pingu@block[draw]{\pingu@color@sneaker@side@left} (@y) to[bend right=25] coordinate[pos=.24] (@x1) coordinate[pos=.36] (@x2) ++(0.5mm,3*\pingu@foot@single@h) to[bend right=50,looseness=1.5] cycle; |
| 4143 |
\pingu@draw[line cap=round,thin,double=\pingu@color@sneaker@band@left]{black} ([xshift=-.33mm]@x1) to[bend left=20] ([xshift=.33mm]@y1); |
| 4144 |
\pingu@draw[line cap=round,thin,double=\pingu@color@sneaker@band@left]{black} ([xshift=-.5mm]@x2) to[bend left=20] ([xshift=.5mm]@y2); |
| 4145 |
\endscope |
| 4146 |
% redraw |
| 4147 |
\pingu@draw[semithick]{black} \@pingu@x@sneaker@path@left; |
| 4148 |
\endscope |
| 4149 |
\endpgfonlayer |
| 4150 |
} |
| 4151 |
|
| 4152 |
\newdimen\pingu@wi@guitar@w@half \pingu@wi@guitar@w@half=4mm |
| 4153 |
\newdimen\pingu@wi@guitar@xshift \pingu@wi@guitar@xshift=1.15mm |
| 4154 |
\newdimen\pingu@wi@guitar@yshift \pingu@wi@guitar@yshift=-.8mm |
| 4155 |
\newdimen\pingu@wi@guitar@threed@x \pingu@wi@guitar@threed@x=.15mm |
| 4156 |
\newdimen\pingu@wi@guitar@threed@y \pingu@wi@guitar@threed@y=.05mm |
| 4157 |
\pingu@create@wing@extra{guitar}{% TODO: update main to color |
| 4158 |
guitar \@lr/.code = {\pingu@set@extra{guitar\@lr}{true}\pingu@color{guitar\@lr}{##1}}, |
| 4159 |
guitar \@lr/.default = pingu@red!90!black, |
| 4160 |
guitar \@lr\space side color/.code = \pingu@color{guitar\@lr @side}{##1}, |
| 4161 |
guitar \@lr\space tint color/.code = \pingu@color{guitar\@lr @tint}{##1}, |
| 4162 |
guitar \@lr\space outline color/.code = \pingu@color{guitar\@lr @outline}{##1}, |
| 4163 |
guitar \@lr\space fret color/.code = \pingu@color{guitar\@lr @fret}{##1}, |
| 4164 |
guitar \@lr\space fret side color/.code = \pingu@color{guitar\@lr @fret@side}{##1}, |
| 4165 |
guitar \@lr\space head color/.code = \pingu@color{guitar\@lr @head}{##1}, |
| 4166 |
guitar \@lr\space strings color/.code = \pingu@color{guitar\@lr @strings}{##1}, |
| 4167 |
guitar \@lr\space peg color/.code = \pingu@color{guitar\@lr @peg}{##1}, |
| 4168 |
guitar \@lr\space strings end color/.code = \pingu@color{guitar\@lr @strings@end}{##1}, |
| 4169 |
guitar \@lr\space pickup color/.code = \pingu@color{guitar\@lr @pickup}{##1}, |
| 4170 |
guitar \@lr\space fret lines color/.code = \pingu@color{guitar\@lr @fret@lines}{##1}, |
| 4171 |
guitar \@lr\space strings shift/.code = \@namedef{pingu@x@guitar\@lr @stringshift}{##1}, %dim |
| 4172 |
}{guitar \@lr\space fret color=brown!80!black,guitar \@lr\space fret lines color=pingu@silver!70!brown!30!white,guitar \@lr\space outline color=black,guitar \@lr\space tint color=white!99.5!\csname pingu@color@guitar\@lr\endcsname,guitar \@lr\space side color=\csname pingu@color@guitar\@lr\endcsname!80!pingu@white,guitar \@lr\space fret side color=\csname pingu@color@guitar\@lr @fret\endcsname!80!pingu@white,guitar \@lr\space head color=brown!89!white,guitar \@lr\space strings color=pingu@silver!70!pingu@black!50!white,guitar \@lr\space strings end color=pingu@black!80!\csname pingu@color@guitar\@lr\endcsname,guitar \@lr\space peg color=pingu@black,guitar \@lr\space pickup color=white!99!pingu@black,guitar \@lr\space strings shift=0pt} |
| 4173 |
|
| 4174 |
\def\pingu@draw@wi@guitar#1{% |
| 4175 |
\pingu@setup@wing{guitar}{#1}% |
| 4176 |
\def\@rot{\if@pingu@wing@item@side@left@10\else-10\fi}% |
| 4177 |
\scope[rotate around={\@angle+\@rot:(\pingu@name-wing-#1)}] % todo: shifts |
| 4178 |
% arc(240:300:\pingu@wi@guitar@w@half\space and 1.6mm) |
| 4179 |
\pingu@block[draw=\csname pingu@color@guitar#1@outline\endcsname,thin]{\csname pingu@color@guitar#1@side\endcsname} (\pingu@name-wing-#1)++(\pingu@wi@guitar@xshift+\pingu@wi@guitar@threed@x,-5mm+\pingu@wi@guitar@threed@y+\pingu@wi@guitar@yshift) coordinate (@) -- ++(1.33mm,0) to[out=-2,in=-40,looseness=1.15] ++(2mm,6.5mm) to[out=150,in=-40] ++(-.1mm,5mm) to[out=140,in=-10] ++(-3mm,-1mm) coordinate (@g-start) -- ++(-1.63mm,0) -- ++(0,1mm) to[out=220,in=-120,looseness=1.33] ++(-.83mm,1.85mm) -- ++(0,.33mm) to[out=200,in=110] ++(-2.3mm,-4.5mm) to[out=-70,in=70] ++(1.1mm,-2mm) to[out=230,in=170] ([xshift=-1.5mm]@) -- cycle; |
| 4180 |
|
| 4181 |
\pingu@block[draw=\csname pingu@color@guitar#1@outline\endcsname,ultra thin]{\csname pingu@color@guitar#1@fret@side\endcsname} ([xshift=.05mm+0.5*\pingu@wi@guitar@threed@x,yshift=-1mm+.5*\pingu@wi@guitar@threed@y]@g-start) arc(180:360:-.5*1.73mm and .66mm) -- ++(.2mm,1.59cm) -- ++(1.1mm,0) -- cycle; |
| 4182 |
|
| 4183 |
\pingu@block[draw=\csname pingu@color@guitar#1@outline\endcsname,rounded corners=.5pt]{\@col}(\pingu@name-wing-#1)++(\pingu@wi@guitar@xshift,-6mm) coordinate (@) -- ++(1.33mm,0) to[out=-2,in=-40,looseness=1.15] ++(2mm,6.5mm) to[out=150,in=-40] ++(-.1mm,5mm) to[out=140,in=-10] ++(-3mm,-1mm) coordinate (@g-start) -- ++(-1.63mm,0) coordinate[pos=.5] (@g-head) coordinate (@g-end) -- ++(0,1mm) to[out=220,in=-120,looseness=1.33] ++(-.83mm,2.5mm) to[out=200,in=110] ++(-2.3mm,-4.5mm) to[out=-70,in=70] ++(1.1mm,-2mm) to[out=230,in=170] ([xshift=-1.5mm]@) -- cycle; |
| 4184 |
|
| 4185 |
\pingu@block{\csname pingu@color@guitar#1@fret\endcsname} ([xshift=.05mm,yshift=-1mm]@g-start) arc(180:360:-.5*1.73mm and .66mm) -- ++(.2mm,1.63cm) coordinate (@g-top-start) -- ++(1.3mm,0) coordinate (@g-top-end) -- cycle; |
| 4186 |
|
| 4187 |
\foreach \l in {1,...,16} { |
| 4188 |
\scope\clip ([xshift=.05mm,yshift=-1mm]@g-start) arc(180:360:-.5*1.73mm and .66mm) -- ++(.2mm,1.63cm) coordinate (@g-top-start) -- ++(1.3mm,0) coordinate (@g-top-end) -- cycle; |
| 4189 |
\pingu@draw[ultra thin]{\csname pingu@color@guitar#1@fret@lines\endcsname} ([yshift=.95mm*\l,yshift=-1.25mm]@g-start) -- ++(-2mm,0); |
| 4190 |
\endscope |
| 4191 |
} |
| 4192 |
\pingu@draw[very thin]{\csname pingu@color@guitar#1@outline\endcsname} ([xshift=.05mm,yshift=-1mm]@g-start) arc(180:360:-.5*1.73mm and .66mm) -- ++(.2mm,1.63cm) coordinate (@g-top-start) -- ++(1.3mm,0) coordinate (@g-top-end) -- cycle; |
| 4193 |
|
| 4194 |
\pingu@block{\csname pingu@color@guitar#1@tint\endcsname,rounded corners=1pt}(\pingu@name-wing-#1)++(\pingu@wi@guitar@xshift+3.85mm,-3.6mm) coordinate (@) to[out=80,in=-55,looseness=1.15] ++(-1.35mm,4mm) to[out=150,in=-40] ++(.32mm,4.8mm) to[out=200,in=30] ++(-3.15mm,-3mm) to[bend left=30] ++(-1.63mm,0) to[bend left=5] ++(0,1mm) to[out=220,in=30,looseness=1.33] ++(-.83mm,-2.5mm) to[out=280,in=130] ([xshift=-1.5mm]@) -- cycle; |
| 4195 |
|
| 4196 |
\pingu@block[draw=\csname pingu@color@guitar#1@outline\endcsname,very thin,rounded corners=.3pt]{\csname pingu@color@guitar#1@head\endcsname}(@g-top-end) to[out=90,in=190] ++(.55mm,.9mm) -- ++(-.55mm,1.9mm) [sharp corners] arc(190:70:.2mm) arc(0:110:.5mm and .8mm) [rounded corners=.3pt] -- ([xshift=-.5mm,yshift=.33mm]@g-top-start) foreach \i in {1,...,4} { coordinate[pos=\i/5-0.1,xshift=.2mm,yshift=-.2mm] (@g-knot-\i) } to[bend left=40] (@g-top-start) -- cycle; |
| 4197 |
\def\DrawLines{\foreach \i in {1,...,4} { |
| 4198 |
\def\@comp{\csname pingu@x@guitar#1@stringshift\endcsname}% |
| 4199 |
\ifnum\i=1 |
| 4200 |
\pingu@draw[very thin]{\csname pingu@color@guitar#1@strings\endcsname} (@g-knot-\i) -- ++(\@comp,-2.525cm) coordinate[pos=.875] (@pad) coordinate (@end); |
| 4201 |
\else |
| 4202 |
\pingu@draw[very thin]{\csname pingu@color@guitar#1@strings\endcsname} (@g-knot-\i) -- ([xshift=\@comp]@g-knot-\i|-@end) coordinate (@very-end); |
| 4203 |
\coordinate (@pad-end) at(@g-knot-\i|-@pad); |
| 4204 |
\fi |
| 4205 |
\pingu@block{\csname pingu@color@guitar#1@peg\endcsname} (@g-knot-\i) circle[radius=.125mm]; |
| 4206 |
}} |
| 4207 |
\DrawLines |
| 4208 |
\pingu@block[draw=\csname pingu@color@guitar#1@pickup\endcsname,rounded corners=.25pt,ultra thick,opacity=.5]{\csname pingu@color@guitar#1@pickup\endcsname} (@pad) rectangle ([yshift=-.66mm]@pad-end); |
| 4209 |
\DrawLines % just overlay poor man |
| 4210 |
\foreach \i in {1,...,4} { |
| 4211 |
\pingu@draw[thin]{\csname pingu@color@guitar#1@peg\endcsname} (@g-knot-\i) -- ++(-.4mm,.2mm); |
| 4212 |
} |
| 4213 |
\pingu@draw[thick]{\csname pingu@color@guitar#1@strings@end\endcsname} ([xshift=.15mm]@end) -- ([xshift=-.15mm]@very-end); |
| 4214 |
\endscope |
| 4215 |
} |
| 4216 |
|
| 4217 |
\pingu@create@extra{drums}{% |
| 4218 |
drums/.code = {\pingu@set@extra{drums}{true}\pingu@color{drums}{#1}}, |
| 4219 |
drums/.default = brown!10!pingu@white,% |
| 4220 |
drums center band/.code = \pingu@color{drums@band@center}{#1},% |
| 4221 |
drums center side/.code = \pingu@color{drums@side@center}{#1},% |
| 4222 |
drums center text/.code = \@namedef{pingu@drums@text}{#1}, |
| 4223 |
drums left base/.code = \pingu@color{drums@base@left}{#1},% |
| 4224 |
drums left band/.code = \pingu@color{drums@band@left}{#1},% |
| 4225 |
drums left color/.code = \pingu@color{drums@left}{#1},% |
| 4226 |
drums left side/.code = \pingu@color{drums@side@left}{#1},% |
| 4227 |
drums right base/.code = \pingu@color{drums@base@right}{#1},% |
| 4228 |
drums right band/.code = \pingu@color{drums@band@right}{#1},% |
| 4229 |
drums right color/.code = \pingu@color{drums@right}{#1},% |
| 4230 |
drums right side/.code = \pingu@color{drums@side@right}{#1},% |
| 4231 |
}{drums left base=\pingu@color@drums!45!pingu@black, drums center band=pingu@black!35!pingu@red,drums center side=pingu@black!35!pingu@red!60!pingu@silver, drums left band=\pingu@color@drums@base@left!35!pingu@red, drums right base=\pingu@color@drums@base@left, drums right band=\pingu@color@drums@band@left, drums left color=\pingu@color@drums, drums right color=\pingu@color@drums,drums left side=pingu@black!35!pingu@red!60!pingu@silver,drums right side=pingu@black!35!pingu@red!60!pingu@silver,drums center text={}} |
| 4232 |
|
| 4233 |
% coordinate[pos=.84] (@a) ++(2.5mm,-2*\pingu@foot@[email protected]) coordinate (@c) to[out=0,in=285] coordinate[pos=.575] (@b) ++(2.5mm,2*\pingu@foot@single@h+1mm)} |
| 4234 |
\def\pingu@draw@ea@drums{% |
| 4235 |
\scope % TODO |
| 4236 |
\pgfonlayer{foreground} |
| 4237 |
\pingu@block[draw=\pingu@color@drums@band@center]{\pingu@color@drums@side@center} ([yshift=-4.5mm,xshift=.1mm]\pingu@name-belly-center) ellipse[x radius=7.2mm,y radius=7.3mm]; |
| 4238 |
\pingu@draw[thick]{\pingu@color@drums@band@center} ([yshift=-4.5mm,xshift=.15mm]\pingu@name-belly-center)+(-60:7.3mm) -- +(-60:9.3mm); |
| 4239 |
\pingu@draw[thick]{\pingu@color@drums@band@center} ([yshift=-4.5mm,xshift=.7mm]\pingu@name-belly-center)+(-120:7.3mm) -- +(-120:9.3mm); |
| 4240 |
\pingu@block[draw=\pingu@color@drums@band@center,very thick]{\pingu@color@drums} ([yshift=-5mm]\pingu@name-belly-center) ellipse[x radius=7.2mm,y radius=7.3mm] node[centered,font=\sffamily\footnotesize,align=center] {\pingu@drums@text}; |
| 4241 |
\pingu@draw[very thick]{\pingu@color@drums@band@center} ([yshift=-5mm]\pingu@name-belly-center)+(-60:7.3mm) -- +(-60:9.3mm); |
| 4242 |
\pingu@draw[very thick]{\pingu@color@drums@band@center} ([yshift=-5mm]\pingu@name-belly-center)+(-120:7.3mm) -- +(-120:9.3mm); |
| 4243 |
|
| 4244 |
\pingu@draw[very thick]{\pingu@color@drums@band@center} ([yshift=-5mm]\pingu@name-belly-center)+(30:7.3mm) -- ++(30:10.3mm) -- ++(0,1.25mm) coordinate (@drum-l); |
| 4245 |
\pingu@block[very thick,draw=\pingu@color@drums@band@left,line join=round]{\pingu@color@drums@side@left} (@drum-l) arc(-90:0:4mm and .75mm) -- ++(0,2.5mm) coordinate (@) arc(0:-180:4mm and .75mm) -- ++(0,-2.5mm) arc(-180:-90:4mm and .75mm); |
| 4246 |
\pingu@block[thick,draw=\pingu@color@drums@band@left]{\pingu@color@drums@left} (@) arc(0:360:4mm and .75mm) -- cycle; |
| 4247 |
|
| 4248 |
\pingu@draw[very thick]{\pingu@color@drums@band@center} ([yshift=-5mm]\pingu@name-belly-center)+(150:7.3mm) -- ++(150:10.3mm) -- ++(0,1.25mm) coordinate (@drum-r); |
| 4249 |
\pingu@block[very thick,draw=\pingu@color@drums@band@right,line join=round]{\pingu@color@drums@side@left} (@drum-r) arc(-90:0:4mm and .75mm) -- ++(0,2.5mm) coordinate (@) arc(0:-180:4mm and .75mm) -- ++(0,-2.5mm) arc(-180:-90:4mm and .75mm); |
| 4250 |
\pingu@block[thick,draw=\pingu@color@drums@band@right]{\pingu@color@drums@right} (@) arc(0:360:4mm and .75mm) -- cycle; |
| 4251 |
\endpgfonlayer |
| 4252 |
\endscope |
| 4253 |
} |
| 4254 |
|
| 4255 |
\endinput |