diff options
Diffstat (limited to 'Master/texmf-dist')
24 files changed, 7914 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tikzpingus/README.md b/Master/texmf-dist/doc/latex/tikzpingus/README.md new file mode 100644 index 00000000000..4cc5c9b20c6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzpingus/README.md @@ -0,0 +1,84 @@ +# Ti*k*Zpingus + +[![made-with-latex](https://img.shields.io/badge/Made%20with-LaTeX-1f425f.svg)](https://www.latex-project.org/) [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/GPL-3.0) [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![build](https://github.com/EagleoutIce/tikzpingus/actions/workflows/compile.yaml/badge.svg)](https://github.com/EagleoutIce/tikzpingus/actions/workflows/compile.yaml) + +This package is a work-in-progress package allowing you to typeset little penguins in LaTeX with PGF/Ti*k*z. +The [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf) will constantly evolve. + +---- + +Ti*k*Zpingus is actively developed by *Florian Sihler* (contact me at: <florian.sihler@uni-ulm.de>) under the [GPLv3 License](LICENSE). I am very happy about every contribution (see [CONTRIBUTING.md](CONTRIBUTING.md)). + +---- +<br /> + +<div style="text-align:center"> + +<!-- While GitHub will cleanse the border-radius, I keep it for the future. --> +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-1.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=1) +</div> + +The purpose of this library is to produce one thing: cute penguins. Using the `\pingu`-macro, you can pass an arbitrary amount of options to endow the penguin with many extras or change its complete appearance. Furthermore, most options allow additional arguments, defining the color, text, ... +<br /> + + +<div style="text-align:center"> + +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-2.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=2) +</div> + +While the [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf) contains a reference of all options that are available (or at least, that is the plan), most extras should be named relatively intuitive. For example, if you want a small penguin, you add the option `small`. +If the penguin should be large, you write `large`. If you want the penguin to hold a cup, you write `cup`. If the cup should have a specific color, like blue, you add this via `cup=blue`, ... +<br /> + +<div style="text-align:center"> + +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-3.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=3) +</div> + +Currently, most options I have added arose from concrete situations and are not part of "sets". However, some sets do exist, like the `santa` or `devil` collection. If there are more sets in the future, I might add them as first-class components. For now, the [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf#appendix.A) contains an [Overview](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf#appendix.A) of the larger gadgets. +<br /> + +<div style="text-align:center"> + +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-4.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=4) +</div> + +If you just load the library by `\usepackage{tikzpingus}` all options will work, and you might want to use the `glows`-option (`\usepackage[glows]{tikzpingus}`) so that lightsabers and other glowing elements look waaay nicer (but may produce artifacts in some pdf-viewers). However, if loading the library takes too long for you, using the `bare` option will drastically reduce the default options available while allowing you to load specific libraries with `\pinguloadlibraries{<list of libraries>}`. +<br /> + +<div style="text-align:center"> + +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-5.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=5) +</div> + +Not all gadgets and wing positions work together. While I try to get as many of them working as possible, selecting two different styles of glasses or hats probably looks weird no matter what code I add. +Nonetheless, there is code implemented to deal with a lot of interactions (e.g., items in different wings, multiple items on the hat, ...), and there are several options to cope with them yourself if the need arises. +Oh, and by the way, when options are named with `left` and `right` they are always from the penguin-perspective. +<br /> + +<div style="text-align:center"> + +[<img style="border-radius:8pt" src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-6.png?raw=true" width="600" />](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=6) +</div> + +Clothes are a work in progress for a long time now. While there are pants, shirts, a cape, and a cloak, they interfere with body types and other interaction codes. They work quite well for "not-too-fancy" and exotic combinations, but for more complex scenarios, I just had no time (for now). So feel free to wrap your head around that and open a PR! I would be happy to assist you! + + +## Testing Files + +These are some test files that showcase additional capabilities of the library:\ +[<img src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/preview-1.png?raw=true" width="600"/>](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/showcase.pdf) + +[<img src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/minimal-1.png?raw=true" width="300"/>](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/minimal.pdf) + +For the title image of a computer-science course on software-product-lines, I created a small and incomplete but really fun feature model:\ +[<img src="https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/spl-1.png?raw=true" width="900"/>](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/spl.pdf) + +## Contributors + +<a href="https://github.com/eagleoutice/tikzpingus/graphs/contributors"> + <img src="https://contrib.rocks/image?repo=eagleoutice/tikzpingus" /> +</a> + +Made with [contrib.rocks](https://contrib.rocks).
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.pdf b/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.pdf Binary files differnew file mode 100644 index 00000000000..d8aadc4b993 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.pdf diff --git a/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.tex b/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.tex new file mode 100644 index 00000000000..0eede4d9f33 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzpingus/tikzpingus-doc.tex @@ -0,0 +1,4879 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\errorcontextlines9999 +\documentclass[parskip=half,english,numbers=noenddot,footnotes=nomultiple,oneside]{scrartcl} + +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{babel} + +\makeatletter\def\input@path{{../tex/}}\makeatother +\usepackage[glows]{tikzpingus} + +% \definecolor{doc-main}{RGB}{204,0,25} +\colorlet{@opcolor}{pingu@blue!75!black} +\colorlet{doc-main}{@opcolor!80!pingu@black} +\usepackage[linkcolor=@opcolor,urlcolor=@opcolor,colorlinks,breaklinks,pdfusetitle]{hyperref} +\usetikzlibrary{shapes.misc,arrows.meta} +\urlstyle{same} +\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks\do-} + +\usepackage[tex,hyper]{listings} +\usepackage[skins,breakable,hooks,xparse,listingsutf8,external]{tcolorbox} +\usepackage{lmodern} +\usepackage{CrimsonPro} + +\usepackage{imakeidx} +\usepackage{tikz} +\usepackage{fontawesome} +\usepackage{csquotes} +\usepackage{enumitem} +\usepackage{microtype} +\usepackage{tikzducks} +\usepackage{datatool} +\usepackage{relsize} +\usepackage{multicol} +\usepackage{footnotebackref} +\usepackage{adjustbox} +\usepackage{xstring} +\usepackage{colorinfo} + +\makeindex[title={Key Overview},columns=2,columnsep=.75cm,noautomatic=true,options=-s indexstyle.ist] +\deffootnote{1.5em}{1em}{\textsuperscript{\hyperref[\BackrefFootnoteTag]{\thefootnotemark}}\thinspace} +\def\thefootnote{$\langle$\arabic{footnote}$\rangle$} +% https://tex.stackexchange.com/questions/78423/how-to-use-the-footnotebackref-package-with-footnotemark-and-footnotetext +\makeatletter +\LetLtxMacro\BHFN@Old@footnotemark\@footnotemark +\def\@footnotemark{% + \refstepcounter{BackrefHyperFootnoteCounter}% + \xdef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}% + \label{\BackrefFootnoteTag}% + \BHFN@Old@footnotemark +} + +\newlist{inlist}{enumerate*}{1} +\setlist[inlist]{itemjoin={{, }},itemjoin*={{, and }},label=$\roman*$),mode=boxed} + +\def\MapDTLList#1{\ifcsname ListnameOf#1\endcsname\csname ListnameOf#1\endcsname\else#1\fi} +\def\ListnameOflefteye{eyes} +\def\ListnameOfbodytype{body type} + +\let\say\enquote +\def\DTLlistformatoxford{,}\def\DTLandname{and} +% TODO: do guard against same keys for different selectors +\long\def\ParseDTLListElement#1"#2"\@nil{\textsuperscript{\smash{\raisebox{2pt}{\ifcsname pingu@@lib@#2@\CurrentList @\endcsname\index{Libraries!\textit{\csname pingu@@lib@#2@\CurrentList @\endcsname}!#2?\hyperref[expl-list:\CurrentList]{\protect\lpingu{#2} {\tiny\sffamily(\MapDTLList{\CurrentList})}}}~$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\color{gray}Library}}}}}}{\text{\textit{\tiny\strut\csname pingu@@lib@#2@\CurrentList @\endcsname}}}$\fi}}}} +\def\DTLlistformatitem#1{\textit{#1\expandafter\ParseDTLListElement :#1\@nil}} +\newcommand*\typesetselection[1][]{\begingroup\ifx!#1!\else\def\DTLlistformatitem##1{#1}\fi\dotypesetselection} +\def\dotypesetselection#1{\label{expl-list:#1}\def\CurrentList{#1}\expandafter\DTLformatlist\expandafter{\csname @pingu@#1@\endcsname}\endgroup} +\makeatletter + +\addtokomafont{sectioning}{\@declaredcolor{gray}} +\addtokomafont{title}{\@declaredcolor{doc-main}} +\addtokomafont{author}{\normalsize} +\addtokomafont{date}{\normalsize} + +\def\optstyle{\@declaredcolor{@opcolor}\slshape} +\colorlet{@softgray}{gray!60!white} +\colorlet{@softgray@b}{gray!75!white} +\colorlet{@darkerblue}{pingu@blue!40!black} +\def\lstfnsize{-.7} +\lstdefinestyle{lstpingu}{% + tabsize=2, breaklines, + basicstyle=\relsize{\lstfnsize}\ttfamily, + commentstyle={\@declaredcolor{gray}\slshape}, + columns=fullflexible, + emphstyle=\slshape, + emphstyle=[2]\optstyle, + emphstyle=[3]\@declaredcolor{@softgray@b}, + emphstyle=[4]\@declaredcolor{@darkerblue}, + texcsstyle=*\@declaredcolor{gray}\bfseries, + texcsstyle=*[2]\@declaredcolor{doc-main}\bfseries, + texcsstyle=*[3]\@declaredcolor{@softgray}, + lineskip=2.5pt, + keepspaces=true, + moredelim=[s][\itshape]{<}{>}, +} +\lstset{style=lstpingu} +\def\ipingu#1{\lstinline'#1'} +\def\lpingu#1{\lstinline[style=lstpingu,language=pingulang]'#1'} +\def\ltex#1{\lstinline[style=lstpingu,language=pinguinternallang]'#1'} + +\lstdefinelanguage{pinguinternallang}{ + language={[LaTeX]TeX}, + moreemph={tikzpicture}, + alsoletter={@}, + moretexcs=[2]{pingu@block,pingu@draw}, + moretexcs={pingu@eye@shift,pingu@color@eye@left,pingu@color@eye@right,pingu@name,@pingu@eyes@s,@pingu@none} +} + +\def\t@lst@addToLiterate#1{\protected@edef\lst@literate{\unexpanded\expandafter{\lst@literate}\unexpanded{#1}}} +\lst@Key{add to literate}{}{\t@lst@addToLiterate{#1}} +\let\lst@ifxliterate\iftrue % make literate a star literate + +\lstdefinelanguage{pingulang}{ + language={[LaTeX]TeX}, + moreemph={tikzpicture}, + alsoletter={.-!:0123456789},%disable number + deletetexcs={begin,end}, % -> lift 3 + moretexcs=[2]{pingu,duck,node,pingudefaults,pingudefaultsappend,pinguloadlibrary,pinguloadlibraries}, + moretexcs=[3]{begin,end,pgfmathsetseed}, + moreemph=[3]{!hide,.style}, + add to literate={/pingu/}{{\@declaredcolor{gray}/pingu/}}7 + {\{tikzpicture\}}{{\@declaredcolor{@softgray}\{tikzpicture\}}}{13} + {\{\\number\\pdfrandomseed\}}{{\@declaredcolor{@softgray}\{\textbackslash number\textbackslash pdfrandomseed\}}}{23} + % otherwise these would interfere with random + {!random}{{\@declaredcolor{darkgray}\itshape!random}}7 +} + +\def\@CreateCodeHyperLink#1#2#3{\lstset{add to literate={#2}{{\hyperref[#3]{\optstyle#2}}}{#1}}} +% #1 Keys | #2 length (optimized) +\def\CreateCodeHyperLink#1#2{% \StrLen{\@elem}[\@cclen] + \@for\@elem:=#1\do{\ifx\@elem\@empty\else + % space to space cmd % TODO: do this on store and just keep store? + \StrSubstitute{\@elem}{ }{\noexpand\ }[\@sub]\relax + \edef\@tmp{\noexpand\@CreateCodeHyperLink{#2}{\@sub}{pk:/pingu/\@elem}}\@tmp\fi}% +} +% store all. we use their precalculated length to ensure prefixes we go from small to large on set +\def\cmdsstore#1#2{\csxdef{allcmds@#1}{#2}} +\def\allcmdsmin{3}% think +\def\allcmdsmax{3}% +\AtEndDocument{% + \pgfkeys{/pingu/.cd,defaults}% this way we have active defaults + \foreach \i in {\allcmdsmin,...,\allcmdsmax} {% + \immediate\write\@auxout{\noexpand\cmdsstore{\i}{\csuse{allcmds@\i}}}% + }% + \immediate\write\@auxout{% + \noexpand\gdef\noexpand\allcmdsmin{\allcmdsmin}% + \noexpand\gdef\noexpand\allcmdsmax{\allcmdsmax}% + \noexpand\gdef\noexpand\pengu@all@showcases{\pengu@all@showcases}% + }% +} + + +\def\RawShowcase#1#2{\scalebox{.68}{%\begin{tcbexternal}{showcase-#2#1}% +\tikzpicture[baseline={(pingu-bottom-center)}] +\pingu[body=pingu@main!30!white,bill color=pingu@yellow!30!white,feet color=pingu@yellow!30!white,eyes color=pingu@black!30!white,name=pingu,#1#2] +\pgfonlayer{foreground} +\node[below=3mm] at(pingu-bottom-center) {\strut}; % buffer +\pgfinterruptboundingbox +\node[below=3mm,fill=white,fill opacity=.52,text opacity=1,rounded corners=1pt] at(pingu-bottom-center) {\textsf{\strut\smash{#1}}}; +\endpgfinterruptboundingbox +\endpgfonlayer +\endtikzpicture +%\end{tcbexternal}% +}} + +\setbox0=\hbox{\RawShowcase{}{}} +\newdimen\pingu@showcase@height +\pingu@showcase@height=\dimexpr\ht0+\dp0\relax + +\def\ShowcasePengu#1=#2;{{\hypersetup{linkcolor=.}% +\hyperref[pk:/pingu/#1]{% + \parbox[b][\pingu@showcase@height]{.14\linewidth}{\centering\ifx!#2!\def\Arg{}\else\def\Arg{=#2}\fi\edef\MakeShowcase{\noexpand\RawShowcase{#1}{\Arg}}~\clap{\MakeShowcase}~}% +}}} +\def\pengu@all@showcases{} +% we mix them somewhat funny +\def\@showcase@pre{pre} +\let\@showcase@cur\@showcase@pre +\def\@toggle@showcase{\ifx\@showcase@cur\@showcase@pre\global\let\@showcase@cur\@empty\else \global\let\@showcase@cur\@showcase@pre\fi} +\newcommand\ShowcaseThis[2][]{\ifx\@showcase@cur\@showcase@pre \global\let\@showcase@cur\@empty\expandafter\gpreto\else \global\let\@showcase@cur\@showcase@pre\expandafter\gappto\fi\pengu@all@showcases{{#2=#1},}} + +\RedeclareSectionCommand[runin=false,afterskip=-2mm]{section} +\RedeclareSectionCommand[runin=false,afterskip=-2mm]{subsection} + +\tcbset{% + colframe=gray,enhanced,breakable, arc=2mm, + fonttitle=\bfseries, sidebyside, + boxrule=.35mm,listing options={style=lstpingu,language=pingulang}, + center lower,segmentation at break=false, + righthand width=4.75cm, bottom=0pt, top=0pt,boxsep=2.25pt, + before lower app={}, colback=white +} +\lstMakeShortInline[style=lstpingu,language=pingulang,basicstyle=\relsize{-1}\ttfamily\@declaredcolor{black!90!white},moredelim={[s][\itshape]{<}{>}}]{|} + +\def\explaincolor{@opcolor!8!white} +\def\cursub{} +\def\keyexplainindent{2.5em}% +% allow the oxes to have minor overlaps +\newenvironment{keyexplain}[4][/pingu/]{\minipage{\linewidth} + \parskip\smallskipamount + \StrSubstitute{#2}{ }{-}[\keyexternalname]% + \tcbset{@/.style={externalize listing=key-\keyexternalname}}% set for externalize + \phantomsection\label{pk:#1#2}\index{\cursub#2?\hyperref[pk:#1#2]{\protect\lpingu{#2}}}% + % get its length: + \StrLen{#2}[\@cclen]% + \csgappto{allcmds@\@cclen}{#2,}% + % update the range + \ifnum\@cclen>\allcmdsmax\relax \xdef\allcmdsmax{\@cclen}\fi + \ifnum\@cclen<\allcmdsmin\relax \xdef\allcmdsmin{\@cclen}\fi + \expandafter\gdef\csname pinguopt#2\endcsname{#3}% + \expandafter\gdef\csname pingudefa#2\endcsname{#4}% + \begingroup\pgfkeys{/pingu/.cd,defaults}\protected@edef\@tmp{#4}% + \protected@edef\@tmpb{#3}% + \hspace*{-\keyexplainindent}\tcbox[left=3pt,right=3pt,top=3pt,bottom=3pt,colframe=white,colback=\explaincolor,on line]{% + \parbox{\dimexpr\linewidth-2\fboxsep+\keyexplainindent}{\small + \ifx\@tmpb\@empty\lpingu{#1#2}\else\lpingu{#1#2 =\ }\texttt{<\textit{\@tmpb}>}\fi\hfill + \ifx\@tmp\@empty\else{\@declaredcolor{gray}(}#4{\@declaredcolor{gray})}\fi + } + }\ifcsname pingu@@lib@#2@\endcsname\index{Libraries!\textit{\csname pingu@@lib@#2@\endcsname}!#2?\hyperref[pk:#1#2]{\protect\lpingu{#2}}}\rlap{~\quad\raisebox{2.75pt}{$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\color{gray}Library}}}}}}{\text{\textit{\footnotesize\strut\csname pingu@@lib@#2@\endcsname}}}$}}\fi\par\endgroup +} +{\endminipage\smallskip\par} + +\def\singleshortcut#1#2"#3"#4{\def\cursub{#2?\hyperref[pk:#1#2]{\protect\lpingu{#2}}!}\keyexplain[#1]{#2 #3}{\csname pinguopt#4\endcsname}{\csname pingudefa#4\endcsname}% + \textcolor{gray}{\footnotesize This is a shortcut for: \texttt{\keyref[#1]{#2}\relsize{-1}{\ =\ {\optstyle#3}}}. The \enquote{\texttt{\textit{\csname pinguopt#4\endcsname}}} argument is passed to \keyref[#1]{#4}.} +\endkeyexplain} +\newcommand*\shortcuts[4][/pingu/]{\begingroup +\protected@edef\@tmp{#3}% +\def\explaincolor{@softexplaincolor}% +\foreach \type in \@tmp {% +\edef\tmp{\noexpand\singleshortcut{#1}{#2}\type{#4}}\tmp +}\endgroup} + +\newcommand*\keyref[2][/pingu/]{\hyperref[pk:#1#2]{\lpingu{#1#2}}} +\newcommand*\dkeyref[2][/pingu/]{\hyperref[pk:#1#2]{\lpingu{#2}}} +\colorlet{@softexplaincolor}{gray!8!white} +\newenvironment{subkeyexplain}[5][/pingu/]{% +\begingroup +\def\explaincolor{@softexplaincolor}\def\keyexplainindent{0em}% +\def\cursub{#2?\hyperref[pk:#1#2]{\protect\lpingu{#2}}!}% +\keyexplain[#1]{#3}{#4}{#5}% + {\@declaredcolor{gray}\footnotesize This command is only in effect if \keyref[#1]{#2} is active.}\par +}{\endkeyexplain\endgroup} + +\def\consumeshowkeyexplain#1(#2){\ShowcaseThis[#2]{#1}} +\newenvironment{showkeyexplain}[4][/pingu/]{% +\keyexplain[#1]{#2}{#3}{#4}% +\@ifnextchar({\consumeshowkeyexplain{#2}}{\consumeshowkeyexplain{#2}()} +}{\endkeyexplain} + +\newcommand\keyalias[3][/pingu/]{\begingroup +\def\explaincolor{@softexplaincolor}\def\keyexplainindent{0em}% +\def\cursub{#3?\hyperref[pk:#1#3]{\protect\lpingu{#3}}!}% +\keyexplain[#1]{#2}{\csname pinguopt#3\endcsname}{\csname pingudefa#3\endcsname}% + {\@declaredcolor{gray}\footnotesize This is an alias for \keyref[#1]{#3}.}% +\endkeyexplain\endgroup} +\newcommand\subkeyalias[4][/pingu/]{\begingroup +\def\explaincolor{@softexplaincolor}\def\keyexplainindent{0em}% +\def\cursub{#4?\hyperref[pk:#1#4]{\protect\lpingu{#4}}!#3?\hyperref[pk:#1#3]{\protect\lpingu{#3}}!}% +\keyexplain[#1]{#2}{\csname pinguopt#3\endcsname}{\csname pingudefa#3\endcsname}% + {\@declaredcolor{gray}\footnotesize This is an alias for \keyref[#1]{#3}.}% +\endkeyexplain\endgroup} + +\def\lib#1{\tikz[baseline=-.6ex]\node[draw=teal,fill=teal!3!white,very thick,rounded corners=2pt,inner ysep=0pt]{\sffamily\strut#1};} + +\def\TikZ{Ti\textit{k}Z} +\def\tikzpingus{\TikZ pingus} + +\tcbset{external/prefix=sub_} +\tcbEXTERNALIZE % we do not need the other configurationshttps://www.freecodecamp.org/news/deploy-a-react-app-to-github-pages/ in the externalized images :D + +\hfuzz=12pt + +% this should not happen in the external images +\AtBeginDocument{% +% we do not use foreach to avoid groups +\count@=\allcmdsmin +\edef\@cntmax@{\the\numexpr\allcmdsmax+1\relax}% +\@whilenum\count@<\@cntmax@\do{% + \edef\i{\number\count@}\relax + \ifcsname allcmds@\i\endcsname + \edef\allcmds{\csname allcmds@\i\endcsname}% if undefined => empty + \expandafter\CreateCodeHyperLink\expandafter{\allcmds}{\i}% + \csxdef{allcmds@\i}{}% + \fi% csx kill to stop infinite + \global\advance\count@\@ne +}% +} +\def\TypesetShowcases{\@tempcnta\z@ +\begingroup\parskip\z@ \parindent\z@ +\@for\@elem:=\pengu@all@showcases\do{% + \advance\@tempcnta\@ne + \ifnum\@tempcnta>5 \global\@tempcnta\@ne\par\fi + \ifx\@elem\@empty\else + % space to space cmd + \edef\@tmp{\noexpand\ShowcasePengu\@elem;}\hfill\@tmp\hfill +\fi}% +\endgroup\global\let\pengu@all@showcases\@empty} + +\def\PenguinTitle{% +\setbox0=\hbox{\tikz{\pingu[body type=tilt-right,eyes wink,conical hat,cane right,bow tie=pingu@purple,left wing grab,cup=doc-main]}}% +\begin{tikzpicture}[overlay,remember picture] + \node[below left=1.5cm,rotate=-10] at (current page.north east) {\box0}; +\end{tikzpicture}% +} + +\title{The \texorpdfstring{\tikzpingus}{tikzpingus} package} +% \subtitle{Penguins with \TikZ} +\author{% + \texorpdfstring{Florian Sihler\\* + \url{https://github.com/EagleoutIce/tikzpingus} + }{Florian Sihler}} +\date{Version v1.0 \textendash\ 2022/08/24} + +\begin{document} +\maketitle +\PenguinTitle + +\begingroup +\vspace*{-4em}\newsavebox\pinguboxA +\savebox\pinguboxA{\tikz{\pingu[wings raise,santa hat,eyes wink,bow tie=pingu@yellow]}} +\newsavebox\pinguboxB +\savebox\pinguboxB{\tikz{\pingu[wings raise,head band,eyes angry,sunglasses,bow tie=doc-main,body type=chubby]}} +\begin{center} +\begin{tikzpicture} + \node[text width=.95\linewidth, inner sep=11pt] (m) {% + For my slides at university, I started to use the famous \LaTeX-package \textsl{\href{https://github.com/samcarter/tikzducks}{tikzducks}} a few years ago. + Yet, it seemed somewhat of a necessity to extend the range of available \say{cute} animals in \LaTeX. + Therefore I started writing this package: \textsl{tikzpingus}.\footnotemark\medskip\\ + \textit{Please note:} While tikzpingus is certainly inspired by tikzducks, it does offer a different set of features (e.g., multiple wing positions,~\ldots).\medskip\\ + I would be happy for any feedback or issues on the \href{https://github.com/EagleoutIce/tikzpingus}{tikzpingus}-GitHub. + }; +\pgfonlayer{background} + \node[below,xshift=1.1cm,yshift=19.5pt,scale=.4] at(m.south west) {\usebox\pinguboxA}; + \node[below,xshift=-1cm,yshift=13.5pt,scale=.4] at(m.south east) {\usebox\pinguboxB}; + \draw[rounded corners,gray,fill=white] (m.north west) -- (m.north east) -- (m.south east) -- ++(-.45cm,0) to[bend right=40] ++(-1.2cm,0) -- ([xshift=1.65cm]m.south west) to[bend right=40] ++(-1.2cm,0) -- ++(-.45cm,0) -- cycle; + \endpgfonlayer + \node[above=3mm,font=\bfseries\sffamily\Large] at(current bounding box.north) {Motivation}; +\end{tikzpicture}\vspace*{-\baselineskip} +\end{center} +\footnotetext{Why \say{pingu} and not \say{pengu}? Well, this is the third try on achieving cute penguins without using any templates or vector formats as a basis. As a german, the short form \say{pingu} was merely a typo that originated from the german word \say{pinguin} for \say{penguin}. It somewhat sticked\ldots} +\endgroup\vfill + +\begin{center} + \newsavebox\pinguA \newsavebox\pinguB \newsavebox\pinguC \newsavebox\pinguD \newsavebox\pinguE \newsavebox\pinguF \newsavebox\pinguG + \def\Table#1(#2)#3{\scope[shift={(#2)},xshift=1.75cm,yshift=1.75cm]\pingu[#1]\endscope\pgfonlayer{foreground}\draw[lightgray,line width=6pt,rounded corners=2pt,line cap=round](#2) |- ++(4.5,1.35) -- ++(0,-1.35);\fill[draw=lightgray,fill=white,line width=3pt,rounded corners=2pt] (#2)++(3pt-1.5pt,-3pt+1.5pt+2mm) rectangle ++(1.15,1.15) node[midway,centered]{\Large$\mathsf{#3}$};\endpgfonlayer}% + \setbox\pinguA=\hbox{\tikz{\pingu[santa hat,santa beard,eyes vertical,blush]}}% + \setbox\pinguB=\hbox{\tikz{\pingu[:back,right wing wave,rook=pingu@silver!80!white,rook hatch=false]}}% +\resizebox*!{4.5cm}{\begin{tikzpicture} +\Table{right wing wave,horse right,crown, eyes wink, crown position={1:(-.1cm,-.255cm){1.33}}}(2.5,3.5){\text{\sffamily f}(x)} +\Table{right wing wave,eyes wink,shirt=gray,tie,blush}(0,0)+ +\Table{right wing wave,eyes vertical,cloak=gray,body type=legacy,cup,left wing grab,blush}(5,0)* + +\Table{right wing wave,left wing shock,eyes shock,halo,heart=gray!40!pingu@white}(-2.5,-4)\div +\Table{right wing wave,cake-hat,eyes wink,flag right}(2.5,-4)\ln +\pgfonlayer{foreground} +\node[scale=.125,circle,fill=white] at (a) {\rotatebox{13}{\copy\pinguA}}; % a sets flag core +\endpgfonlayer +\Table{right wing wave,vr-headset,vr-headset hair}(7.5,-4)\bmod +\pgfonlayer{foreground} + \node[scale=2] at([yshift=-3.45cm]current bounding box.south) {\copy\pinguB}; +\endpgfonlayer +\end{tikzpicture}}\hskip6em% +% todo: regroup that +\setbox\pinguA=\hbox{\tikz{% + \pingu[wings wave,name=pingu,eyes wink,body type=legacy,eye patch right] + \draw[line cap=round,lightgray,line width=1.5pt] (pingu-wing-right-tip) circle[radius=2mm]; + \draw[line cap=round,lightgray,line width=1.5pt] (pingu-head-back-con-left) circle[radius=3mm]; + \draw[line cap=round,lightgray,line width=1.5pt] (pingu-waist-right) circle[radius=4mm]; + \draw[line cap=round,lightgray,line width=1.5pt] (pingu-foot-left) circle[radius=3.5mm]; + \draw[line cap=round,lightgray,line width=1.5pt] (pingu-head) circle[radius=2.5mm]; + \draw[line cap=round,-Kite,lightgray,line width=1.5pt] ([xshift=1mm,yshift=-1mm]pingu-wing-left-tip) to[bend left] ++(3mm,-1cm); + \draw[line cap=round,Kite-Kite,lightgray,line width=1.5pt] ([xshift=4mm]pingu-foot-left) -- ++(1cm,0); + \draw[line cap=round,Kite-Kite,lightgray,line width=1.5pt] ([yshift=-1.75cm]pingu-head-top)++(60:1.75cm and 2cm) arc(60:120:1.75cm and 2cm); +}}% +\newsavebox\whitepingu +\setbox\whitepingu=\hbox{\tikz{\pingu[@block/.style={fill=pingu@white,draw=pingu@white},wings wave]}} +\setbox\pinguB=\hbox{\rlap{\kern2.8pt\box\whitepingu}\tikz{ + \pingu[wings wave,:line,name=pingu] + \path[line width=1.5pt] (pingu-wing-right-tip) circle[radius=2mm]; +}}% +\setbox\pinguC=\hbox{\tikz{\pingu[eyes shiny,hat, hat position={1:(0cm,-.09cm){1.33}}]}}% +\setbox\pinguD=\hbox{\tikz{\pingu[eyes shiny,lightsaber right=pingu@purple,hat, hat position={1:(0cm,-.09cm){1.33}},right item angle=-13,medal]}}% +\setbox\pinguE=\hbox{\tikz{\pingu[eyes shiny,hat,cane left, hat position={1:(0cm,-.09cm){1.33}},left item angle=-13,tie,tie dots]}}% +\setbox\pinguF=\hbox{\tikz{\pingu[eyes shiny,hat,cane left, hat position={1:(0cm,-.09cm){1.33}},left item angle=-13,shirt=gray,second shirt,bill=flat,tie,tie dots]}}% +\setbox\pinguG=\hbox{\tikz{\pingu}} +\resizebox*!{4.5cm}{\begin{tikzpicture} + \node[scale=2] (a) at(0,0) {\copy\pinguA}; + \node[above=1.5cm,scale=2] at(a.north) {\small\copy\pinguB}; + + \node[right] (x) at(7.5,8) {\copy\pinguC}; + \node[below right=1cm](e) at(x.south) {\copy\pinguE}; + \node[below left=1cm] (d) at(x.south) {\copy\pinguD}; + \node[below=1cm] (f) at(e.south) {\copy\pinguF}; + + \node[above left=1cm] (g) at(x.north) {\copy\pinguG}; + + \draw[lightgray,line width=3pt,{Triangle[round,open,fill=white,scale=1.42]}-] (g) -- (x); + \draw[lightgray,line width=3pt,{Triangle[round,open,fill=white,scale=1.42]}-] (x) -- (e); + \draw[lightgray,line width=3pt,{Triangle[round,open,fill=white,scale=1.42]}-] (x) -- (d); + \draw[lightgray,line width=3pt,{Triangle[round,open,fill=white,scale=1.42]}-] (e) -- (f); +\end{tikzpicture}} +\end{center} +\vfill\null + +\clearpage\section{Introduction} +\subsection{Dependencies} + +As this package is constantly work in progress, the concrete dependencies may change any time. +At the moment, it loads \href{https://www.ctan.org/pkg/pgf}{\TikZ}, which loads a lot of other packages (e.g. \href{https://www.ctan.org/pkg/xcolor}{xcolor}), and \href{https://www.ctan.org/pkg/etoolbox}{etoolbox}. +Furthermore, the following \TikZ-Libraries are in use:\footnote{A lot of the libraries loaded are important only for specific extras. I plan on cleaning them up.} \textit{intersections}, \textit{shadings}, \textit{patterns.meta}, \textit{decorations.pathmorphing}, and \textit{shapes.symbols}. + +\subsection{Copyright} + +Copyright \textcopyright\ \textit{Florian Sihler}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the GNU General Public License, version~3.0 (to be found online at: \url{https://opensource.org/licenses/gpl-3.0.html}). + +The shown example penguins are purely fictional characters, any resemblance to real penguins or real persons is purely coincidental and no copyright infringement is intended. + +\vfill +\section{Usage}\label{Usage} + +If you just want a penguin, import the package and start with the following: +\begin{tcblisting}{title={One small penguin},externalize listing=small-pengu} +\begin{tikzpicture} + \pingu +\end{tikzpicture} +\end{tcblisting} + +There are \textit{a lot} of configuration-options which can be passed as an optional argument via the known |<key>=<value>|-style. See \autoref{Gadget-Overview} for a complete gadget overview. +\begin{tcblisting}{title={Happy penguin with cup!},externalize listing=happy-cup} +\begin{tikzpicture} + \pingu[left wing wave, right wing grab, + eyes shiny, cup] +\end{tikzpicture} +\end{tcblisting} +Please note, that \say{left} and \say{right} have been chosen from the penguin-perspective. + +\clearpage Besides the keys defined by this package, you can use the keys of \TikZ\ and |pgf| as well (the duck was generated by the lovely \href{https://github.com/samcarter/tikzducks}{tikzducks} package): +\begin{tcblisting}{title={The Reunion},externalize listing=pengu-duck} +\begin{tikzpicture} + \duck + \pingu[xshift=2.8cm, yshift=14mm, + eyes wink] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Using the Coordinates} +\label{mrk:coordinates}While there are a lot of gadgets available already, +every penguin is accompanied by \textit{several} adaptive coordinates +to place custom items, texts,~\ldots\ % TODO: links +They can be visualized by the \keyref{meta-dots} option. +Furthermore, some extras create further coordinates themselves! +All coordinates are available with |<pingu-name>-<coordinate>|. +While the default name of a penguin is \say{pingu}, it can be +changed with the name option: +\begin{tcblisting}{title={Lotta dots},externalize listing=dotted-pengu} +\begin{tikzpicture} + \pingu[meta dots,left wing wave, + right wing grab, name=paula] + \node at (paula-belly-center) {X}; + \node at (paula-foot-left) {Foot}; +\end{tikzpicture} +\end{tcblisting} +Lets look at those coordinates in more detail (all labels are to be prefixed by |<pingu-name>-|): +\newsavebox\pinguwingright +\savebox\pinguwingright{% +\begin{tikzpicture}% + \scope + \path[clip] (.25,-1.25) rectangle (-1.1,.7); + \pgfonlayer{foreground}\path[clip] (.25,-1.25) rectangle (-1.1,.7);\endpgfonlayer + \pingu[@block/.append style={fill=#1!35!white},wings hug,eyes shiny,heart=gray!30!white,feet=none] + \path[draw,pink,thick] (pingu-wing-right-start) -- (pingu-wing-right); + \endscope + \foreach \c/\a/\n in {wing-right/left/.75mm,wing-right-low/left/.75mm,wing-right-up/above/.75mm,wing-right-start-low/below left/1.75mm,wing-right-start-up/above left/.75mm} { + \path[fill=teal] (pingu-\c) circle [radius=1.125pt]; + \node[\a=\n,font=\ttfamily,scale=.35,inner sep=2.5pt] (expl-\c) at (pingu-\c) {\c}; + \draw[teal,thin] (expl-\c) -- (pingu-\c); + } +\end{tikzpicture}} +\makeatletter +\newsavebox\pinguwingleft +\savebox\pinguwingleft{% +\begin{tikzpicture}% + \scope + \path[clip] (\pingu@w@half*2-.25cm,-1.25) rectangle ++(1.25,1.95); + \pgfonlayer{foreground}\path[clip] (\pingu@w@half*2-.25cm,-1.25) rectangle ++(1.25,1.95);\endpgfonlayer + \pingu[@block/.append style={fill=#1!35!white}, wings wave,eyes shiny,heart=gray!30!white,feet=none] + \path[draw,pink,thick] (pingu-wing-left-start) -- (pingu-wing-left); + \endscope + \foreach \c/\a/\n in {wing-left/right/.75mm,wing-left-low/below right/.75mm,wing-left-up/above/.75mm,wing-left-start-low/below right/1.25mm,wing-left-start-up/below right/1.5mm} { + \path[fill=teal] (pingu-\c) circle [radius=1.125pt]; + \node[\a=\n,font=\ttfamily,scale=.35,inner sep=1.5pt] (expl-\c) at (pingu-\c) {\c}; + \draw[teal,thin] (expl-\c) -- (pingu-\c); + } +\end{tikzpicture}% +} +\vfill +\def\PinguCoords#1{\begin{tikzpicture} + \pingu[@block/.append style={fill=##1!35!white}, wings wave,eyes shiny,heart=gray!30!white,#1] + \pgfonlayer{foreground} + \foreach \c/\a in {belly-center/above,head/below,head-top/above,foot-left/right,foot-right/left,eye-right/above left,eye-left/above right,bill/right,bill-bottom/below,wings-side-left/right,wings-side-right/left,wing-left-start/below right,wing-left-tip/right,wing-right-start/below left,wing-right-tip/left,head-right/left,head-left/right,head-center/below,head-back-con-left/above right,head-back-con-right/above left,bottom-center/above,waist-left/right,waist-right/left} { + \path[fill=green] (pingu-\c) circle [radius=1.125pt]; + \node[\a=.5mm,font=\ttfamily,scale=.35,inner sep=1.5pt] (expl-\c) at (pingu-\c) {\c}; + \draw[green,thin] (expl-\c) -- (pingu-\c); + } + \endpgfonlayer +\end{tikzpicture}}% +\begin{center} + \edef\measurepage{\the\dimexpr\pagegoal-\pagetotal-2\baselineskip\relax}% + \ifdim\measurepage<4\baselineskip\clearpage\edef\measurepage{\the\dimexpr\pagegoal-\pagetotal-2\baselineskip\relax}\fi + \resizebox*!{\measurepage}{% + \PinguCoords{}% + } +\end{center} + +\paragraph{The Wings} +This view excluded a lot of special data collected on the wings! +While there is more information stored for each wing, the following five coordinates are the most important to place items into penguins hand:\vspace*{-1.5em} +\begin{center} + \null\hfill\parbox[c]{2.5\wd\pinguwingright}{\scalebox{2.5}{\usebox\pinguwingright}}\hfill\parbox[c]{4cm}{\centering\small\@declaredcolor{gray}\sffamily And yes, the wings are deliberately placed asymmetrical.\endgraf}\hfill + \parbox[c]{2.5\wd\pinguwingleft}{\scalebox{2.5}{\usebox\pinguwingleft}}\hfill\null +\end{center} + +\paragraph{The Body} Similarly to the wing position, different +body types can change the coordinates (left the \keyref{body type} \textit{chubby} and right the \keyref{body type} \textit{legacy}): +\begin{center} + \resizebox\linewidth!{% + \PinguCoords{body type=chubby,wings hug}\quad\PinguCoords{body type=legacy,wings hug} + } +\end{center} + +\subsection{Colors} +A lot of options allow for a color to be passed. In general, you can provide any color that \TikZ\ is happy with! Yet, there are some predefined pingu-colors shipped with this package: +\def\getCol#1{\pgfmathparse{int(round(#1*255))}\pgfmathresult} +\def\parseRGB#1,#2,#3;{r:~\getCol{#1}, g:~\getCol{#2}, b:~\getCol{#3}} +\begin{multicols}{4} +\begin{itemize} + \foreach \col in {main,black,silver,bronze,white,yellow,lightblue,blue,green,red,purple} { + \item[{\tikz[baseline=-.6ex]{\fill[pingu@\col,semithick,draw=black] circle (4pt);}}] \footnotesize\strut + % somehow outputs, therefore box + \setbox0=\hbox{\colorInfoRGB{pingu@\col}\xdef\colorValue{\colorValue}}\rlap{\smash{\raisebox{-2.9mm}{\sffamily\color{gray}\tiny\expandafter\parseRGB\colorValue;}}}% + \texttt{pingu@\col}% + } + \item[] \footnotesize\strut% buffer +\end{itemize} +\end{multicols} +Furthermore, there is the special color {\makeatletter\say{\expandafter\ipingu\expandafter{\@pingu@none}}} which is available for most\footnote{Why just \say{most}? Well, this package is work in progress and I have added the option late, so I may have forgotten to patch some keys.} extras and wing-items. This color prohibits the compartments from being drawn. To be more precise, the package defines the macro \ltex{\\@pingu@none}, which is matched against the selected color. + +As an example, lets take a look at the \keyref{cup}-extra, which provides an additional key \keyref{cup straw} to color the straw: +\begin{tcblisting}{title={Cup without a straw},externalize listing=extra-options} +\begin{tikzpicture} + \pingu[wings grab, cup=pingu@purple, + cup straw=pingu@blue] + \pingu[wings grab, cup, xshift=2.8cm, + cup straw=!hide] +\end{tikzpicture} +\end{tcblisting} +As you can see, using \lpingu{!hide}, the straw will not be drawn. + +\subsection{Setting the defaults} +You do not have to re-state every key. +With \lstinline[language=pingulang]'\pingudefaults' and \lstinline[language=pingulang]'\pingudefaultsappend' (similar, but extends the current options) you can set default-options for all penguins to come: +\begin{tcblisting}{title={Change the mainstream},externalize listing=update-defaults} +\begin{tikzpicture} + \pingudefaults{wings grab, eyes shiny} + \pingu + \pingu[left wing shock, xshift=2.8cm] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Libraries} +\label{Libraries}\index{Libraries}I've split the penguin features into a set of libraries. While all of them are loaded by default, the |bare| package-option disables the automatic loading of all libraries. They can be loaded (locally to the current group) using |\pinguloadlibrary| and |\pinguloadlibraries| passing on a comma separated list of desired libraries. +See the full reference or the index to learn which key comes from which library. +Please note that~--- at the moment~--- not all components of a library are labeled correctly. +% TODO: already count that? % global let? +\foreach[count=\i] \l/\xs in \pingu@defaultlibs{\xdef\pingu@defaultlibs@count{\i}}% +Currently there are the following libraries: +\foreach[count=\i] \l/\xs in \pingu@defaultlibs{% + \ifx\l\empty\else + \index{Libraries!\textit{\l}}\textit{\l}\ifnum\numexpr\pingu@defaultlibs@count-1>\i,\space\else + \ifnum\pingu@defaultlibs@count=\i\else,~and\space\fi\fi + \fi +}. + +\subsection{Changing the wings} +\label{subsec:wings}As already demonstrated, it is possible to change the wing positions! +All selected wing-items will adapt to the wing-position (although not all wing-items will make sense with every wing-position). +Currently, there are the following wing-positions: +\typesetselection{leftwing}. \say{none} is a special wing-position: it omits the drawing of wings (teaser: every selection has a none-option, which prohibits the part from being drawn)! + +For each valid wing-position you can use |wings <position>| to change both wings or |left wing <position>| and |right wing <position>| to change only one wing respectively. The default wing-position is \say{normal}. If you supply multiple options for a wing, only the last one survives.\footnote{For the sake of completeness: \ipingu{wings <position>}, \ipingu{left wing <position>}, and \ipingu{right wing <position>} are just alternatives i prefer: \ipingu{wings=<position>}, \ipingu{left wing=<position>} and \ipingu{right wing=<position>}.} +This is shown in Box~\say{\nameref{wing-showcase}}. + +\begin{tcblisting}{sidebyside=false, title=Wing-Showcase,nameref=Wing-Showcase,externalize listing=wings-showcase,float,phantomlabel=wing-showcase} +\begin{tikzpicture} + \pingu[left wing none, heart=green] + \pingu[wings wave, heart=teal, xshift=3.5cm] + \pingu[wings hug, heart=orange, xshift=7cm] + \pingu[left wing grab, right wing shock, heart=purple, xshift=10.5cm] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Changing the eyes} +\label{mrk:pengu-eye}Just like the wings, there are a couple of different eye-styles to choose from: \typesetselection{lefteye}. +Similar to the wings, there is a \say{none} and a \say{normal}-option (which is the default). +Furthermore, the convenient selectors |eyes <style>|, |left eye <style>|, and |right eye <style>| exist as well. All of this is showcased in~Box~\say{\nameref{eye-showcase}}. + +\begin{tcblisting}{sidebyside=false,title=Eye-Showcase,nameref=Eye-Showcase,externalize listing=eyes-showcase,float,phantomlabel=eye-showcase} +\begin{tikzpicture} + \pingu[left eye none, heart=green] + \pingu[eyes wink, heart=teal, xshift=3.5cm] + \pingu[eyes shock, heart=orange, xshift=7cm] + \pingu[left eye devil, right eye angry, heart=purple, xshift=10.5cm] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Changing other components} +\label{mrk:pengu-change-comps}Just like for the wings and the eyes, you can change the following body parts: +\begin{itemize} + \itemsep0pt\relax + \item The \textit{body type} itself\\* + Select from: \typesetselection{bodytype}. + \item The \textit{feet} (again with separate left and right)\\* + Select from: \typesetselection{leftfoot}. + \item The \textit{bill} (does not have left and right, as there is just one)\\* + Select from: \typesetselection{bill}. + \item The \textit{hairstyle} (does not have left and right)\\* + Select from: \typesetselection{hairstyle}. +\end{itemize} +For each selection, \say{none} will prohibit the drawing, and \say{normal} is the default chosen. See Box~\say{\nameref{bodyparts-showcase}} for a example. +\begin{tcblisting}{sidebyside=false,title=Bodyparts-Showcase,nameref=Bodyparts-Showcase,externalize listing=bodyparts-showcase,float,phantomlabel=bodyparts-showcase} +\begin{tikzpicture} + \pingu[bill angry, heart=green] + \pingu[feet back, hairstyle none, heart=teal, xshift=3.5cm] + \pingu[bill flat, feet simple, heart=orange, xshift=7cm] + \pingu[feet none, bill none, heart=purple, xshift=10.5cm] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Predefined Styles} +While the penguin options offer the modification of basically every drawing routine (through other styles like |@block|), it is tedious to change them every time. +So I have started to create some predefined styles, that do change some of the penguins appearance (and are completely new, so beware of bugs): +\begin{multicols}{2} +\begin{itemize} + \itemsep0pt + \foreach \tx/\s in {{draw everything with a line}/{:line}, {fill main penguin}/{:fill}, {draw components with transparency}/{:ghost parts}, {draw all layers with transparency}/{:ghost}, {set main \say{devil}-components}/{:devil},{flip the penguin (swaps left \& right)}/{:back},{do not draw main pingu}/{:hide}} { + \item \parbox[t]{.8\linewidth}{\raggedright\texttt{\s}, \tx.} \hfill + \parbox[t]{.175\linewidth}{\scalebox{.4}{% + \begin{tikzpicture}[baseline=.35\baselineskip]% + \pingu[\s] + \end{tikzpicture}% + }} + } + \item[] \parbox[t][2.25\baselineskip]{0pt}{}% buffer +\end{itemize} +\end{multicols} +Currently, only some of the styles do affect other items. As an example, consider |:line|, that changes the draw-style of wing-items and extras: +\begin{tcblisting}{title={Line Penguin},externalize listing=line-pengu} +\begin{tikzpicture} + \pingu[:line, princess crown, silver medal] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Randomness} +Each selection (like the wings or the eyes) can receive a special command \lpingu{!random}. If given, the penguin will receive a randomly picked component. +Please note, that \textit{none} (the component removing it) will never be picked. +The first line in the example in Box~\say{\nameref{random-penguin}} sets the seed. % we do not externalize this one +\begin{tcblisting}{title={Random Penguin},nameref={Random Penguin},label=random-penguin,float} +\pgfmathsetseed{\number\pdfrandomseed} +\begin{tikzpicture} + \pingu[wings=!random,eyes=!random, + body type=!random, + left foot=!random, + bill=!random, + hairstyle=!random] +\end{tikzpicture} +\end{tcblisting} + +In a more general fashion, there is a \keyref{random from} key for completely random penguins. + +\keyexplain{random from}{list}{} + You can pass any list of penguin keys and exactly one of them will be selected. You can nest \keyref{random from}-calls. Please note, that the items are not separated by comma but in braces. The first line in the example sets the seed:% do not externalize +\begin{tcblisting}{} +\pgfmathsetseed{\number\pdfrandomseed} +\begin{tikzpicture} + \pingu[random from={{eye patch left}{eye patch right}{halo,halo raise=4mm}},random from={{right eye color=pingu@blue}{random from={{bow tie}{gold medal}}}},random from={{eyes=!random}{wings=!random}},body type=legacy] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\subsection{Extras} +An extra is considered everything, that is attached to the main penguin and not to the wings (as those items may be placed separately for both wings). +Most extras are activated with the format |<extra>=<color>| (the |<color>| option is not mandatory) +and try to adapt with other extras that have been placed (yet you can place multiple hats if you really like to). A lot of the extras do offer more keys to customize their appearance. +They are explained in the full reference (\autoref{sec:full-ref}). + +Consider the somewhat overkill-example of \say{\nameref{lord-gadget}}. +\begin{tcblisting}{title={Lord-Gadget, the penguin},externalize listing=lord-gadget,nameref={Lord-Gadget, the penguin},label=lord-gadget,float} +\begin{tikzpicture} + \pingu[crown 2d=pingu@bronze, + medal=pingu@purple, tie, + eye patch left=teal, + eye patch right=orange, + right wing wave, sunglasses, + glow thick=yellow] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Wing-Items} +Wing items are basically just like extras, but they can be selected separately for the left and right wing. Furthermore, they adapt their \textit{default} appearance to the active wing positions (\autoref{subsec:wings}). +Currently there are the following wing items: +% add a extra guard not present with the wing items +\typesetselection[\textit{#1\expandafter\ParseDTLListElement :"#1"\@nil}]{wingitems}. +They are selected using |<wing item> <left/right>|. + +Additionally, they can be customized by \keyref{left item angle} and \keyref{right item angle}, as well as \keyref{left item flip} and \keyref{right item flip}. +Lets consider an example\ldots +\begin{tcblisting}{title={Penguin with full wings!}} +\begin{tikzpicture}[scale=.75] + \pingu[lightsaber right=orange, + lollipop left, + right item angle=70, + right wing raise, left wing grab] + \pingu[cane left, right item flip, + sign post right={Hi!}, xshift=35mm] +\end{tikzpicture} +\end{tcblisting} + +\subsection{Clothing} +Clothing is the newest extension to the collection, at and the moment there is not one \say{real} clothing, that really adapts to the penguins-position. +I am working on the \textit{cloak}-Clothing at the moment: +\begin{tcblisting}{title={Pengu-Clothes},externalize listing=clothes} +\begin{tikzpicture}[scale=.75] + \pingu[cloak] +\end{tikzpicture} +\end{tcblisting} + +% \section{Examples} + +\appendix +\section{Gadget Overview}\label{Gadget-Overview} + +\TypesetShowcases + +\section{Full Reference}\label{sec:full-ref} + +\def\percenttargetreductionpengus{63}\def\lstfnsize{-1.65} +\tcbset{% + before lower={\begin{adjustbox}{scale=.\percenttargetreductionpengus}}, + after lower={\end{adjustbox}},% + boxsep=1pt% +} + +\begin{center} + \textit{Please note, that all preview-penguins have been reduced in scale to \percenttargetreductionpengus\,\% to save space and make the documentation more concise.} +\end{center} + +Aliases may set custom defaults. Those defaults are not listed as they may change. + +\subsection{Penguin Keys} + +\keyexplain{name}{text}{\pingu@name} + Sets the name of the penguin. This name is used for all the automatically generated coordinates (see~\autoref{mrk:coordinates}). +\endkeyexplain + +\keyexplain{scale}{floating point}{active scale} + Changes the scale for the penguin. This is not supported by all items by default (as some scales have to be re-calculated according to their rotation). + Yet, it should work with most. + + Furthermore, this value can be used to make the penguin independent of the outer scaling. +\endkeyexplain + + +\keyexplain{meta-dots}{true/false}{\if@pingu@draw@metadots true\else false\fi} + Can be used to enable and disable the meta dots (\autoref{mrk:coordinates}). + Passed true by default. +\endkeyexplain + +\keyalias{meta dots}{meta-dots} + +\subsubsection{The Feet} + +\keyexplain{left foot}{foot-selector}{\@pingu@select@leftfoot@} + Change the style of the left foot. All valid values are listed in \autoref{mrk:pengu-change-comps}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{simple}}}} +\begin{tikzpicture} + \pingu[left foot=simple] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{left foot color}{color}{\pingu@color@foot@left} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[left foot color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{left foot}{\@pingu@leftfoot@}{left foot color} + +\keyexplain{right foot}{foot-selector}{\@pingu@select@rightfoot@} + Change the style of the right foot. All valid values are listed in \autoref{mrk:pengu-change-comps}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{simple}}}} +\begin{tikzpicture} + \pingu[right foot=simple] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{right foot color}{color}{\pingu@color@foot@right} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[right foot color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{right foot}{\@pingu@rightfoot@}{right foot color} + +\keyexplain{feet}{foot-selector}{} + Change the style of both feet by calling \keyref{left foot} and \keyref{right foot} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{simple}}}} +\begin{tikzpicture} + \pingu[feet=simple] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{feet color}{color}{} + Sets the color of both feet (using \keyref{left foot color} and \keyref{right foot color}). +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[feet color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{feet}{\@pingu@leftfoot@}{feet color} + +\subsubsection{The Body} + +\keyexplain{body main}{color}{\pingu@color@body@main} + Set the main color of the penguin. This will affect \keyref{hair} as well, as this chooses its default value from the main color.% +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[body main=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{body head}{color}{\pingu@color@body@head} + Set the color of the penguin head.% +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[body head=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{body}{color}{} + Sets the color of the main penguin and the head, by calling \keyref{body main} and \keyref{body head} with the same value. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[body=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{body front}{color}{\pingu@color@body@front} + Sets the frontal color of the penguin. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[body front=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{body type}{body type}{normal} + Change the active body type. All valid values are listed in \autoref{mrk:pengu-change-comps}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[body type=legacy] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\subsubsection{The Size} + + +\keyexplain{height}{length}{\the\pingu@side@h@half} + Change the height of the penguin manually. You probably should not use this key directly and refer to \keyref{small size}, \keyref{normal size}, and \keyref{large size}: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang}} +\begin{tikzpicture} + \pingu[height=17mm] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{small size}{}{} + Will use \keyref{height} to create a small pingu: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang}} +\begin{tikzpicture} + \pingu[small size] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{small}{small size} +\keyalias{small height}{small size} + + +\keyexplain{normal size}{}{} + Will use \keyref{height} to create a normal pingu: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang}} +\begin{tikzpicture} + \pingu[normal size] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{normal}{normal size} +\keyalias{normal height}{normal size} + + +\keyexplain{large size}{}{} + Will use \keyref{height} to create a large pingu: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang}} +\begin{tikzpicture} + \pingu[large size] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{large}{large size} +\keyalias{large height}{large size} + +\subsubsection{The Eyes} +\keyexplain{left eye}{eye-selector}{\@pingu@select@lefteye@} + Change the style of the left eye. All valid values are listed in \autoref{mrk:pengu-eye}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wink}}}} +\begin{tikzpicture} + \pingu[left eye=wink] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{left eye color}{color}{\pingu@color@eye@left} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[left eye color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{left eye second color}{color}{\pingu@color@eye@second@left} + Change the secondary color of the left eye. It will be used in some styles selected by \keyref{left eye} (e.g. \textit{shiny}): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{shiny}}}} +\begin{tikzpicture} + \pingu[left eye=shiny, + left eye second color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{left eye}{\@pingu@lefteye@}{left eye color} + +\keyexplain{right eye}{eye-selector}{\@pingu@select@righteye@} + Change the style of the right eye. All valid values are listed in \autoref{mrk:pengu-eye}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wink}}}} +\begin{tikzpicture} + \pingu[right eye=wink] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{right eye color}{color}{\pingu@color@eye@right} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[right eye color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{right eye second color}{color}{\pingu@color@eye@second@right} + Change the secondary color of the right eye. It will be used in some styles selected by \keyref{right eye} (e.g. \textit{shiny}): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{shock}}}} +\begin{tikzpicture} + \pingu[right eye=shock, + right eye second color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{right eye}{\@pingu@righteye@}{right eye color} + +\keyexplain{eyes}{eye-selector}{} + Change the style of both eyes by calling \keyref{left eye} and \keyref{right eye} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wink}}}} +\begin{tikzpicture} + \pingu[eyes=wink] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{eyes color}{color}{} + Change the main color of both eyes by calling \keyref{left eye color} and \keyref{right eye color} with the same value. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[eyes color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{eyes second color}{color}{} + Change the secondary color of both eyes by calling \keyref{left eye second color} and \keyref{right eye second color} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{shock,shiny}}}} +\begin{tikzpicture} + \pingu[left eye=shock, right eye=shiny, + eyes second color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{eyes}{\@pingu@lefteye@}{eyes color} + +\subsubsection{The Wings} + +\keyexplain{left wing}{wing-selector}{\@pingu@select@leftwing@} + Change the style of the left wing. All valid values are listed in \autoref{subsec:wings}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wave}}}} +\begin{tikzpicture} + \pingu[left wing=wave] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{left wing color}{color}{\pingu@color@left@wing} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[left wing color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{left wing}{\@pingu@leftwing@}{left wing color} + +\keyexplain{right wing}{wing-selector}{\@pingu@select@rightwing@} + Change the style of the right wing. All valid values are listed in \autoref{subsec:wings}. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wave}}}} +\begin{tikzpicture} + \pingu[right wing=hug] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{right wing color}{color}{\pingu@color@right@wing} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[right wing color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{right wing}{\@pingu@rightwing@}{right wing color} + +\keyexplain{wings}{wing-selector}{} + Change the style of both wings by calling \keyref{left wing} and \keyref{right wing} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{wink}}}} +\begin{tikzpicture} + \pingu[wings=grab] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{wings color}{color}{} + Change the main color of both wings by calling \keyref{left wing color} and \keyref{right wing color} with the same value. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[wings color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{wings}{\@pingu@leftwing@}{wings color} + +\subsubsection{The Hair} + + +\keyexplain{hair 1 color}{color}{\pingu@color@hair@a} + Set the color of the first hair (this may be used differently by other hairstyles): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,moreemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[hair 1 color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{hair 2 color}{color}{\pingu@color@hair@b} + Set the color of the second hair (this may be used differently by other hairstyles): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,moreemph={[2]{2}}}} +\begin{tikzpicture} + \pingu[hair 2 color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{hair 3 color}{color}{\pingu@color@hair@c} + Set the color of the third hair (this may be used differently by other hairstyles): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,moreemph={[2]{3}}}} +\begin{tikzpicture} + \pingu[hair 3 color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{hair 4 color}{color}{\pingu@color@hair@d} + Set the color of the fourth hair (this may be used differently by other hairstyles): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,moreemph={[2]{4}}}} +\begin{tikzpicture} + \pingu[hair 4 color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{hair 5 color}{color}{\pingu@color@hair@e} + Set the color of the fifth hair (this may be used differently by other hairstyles): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,moreemph={[2]{5}}}} +\begin{tikzpicture} + \pingu[hair 5 color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{hairs color}{color}{} + Set the color of all hairs by calling \keyref{hair 1 color}, \keyref{hair 2 color}, \keyref{hair 3 color}, \keyref{hair 4 color}, and \keyref{hair 5 color} with the same argument: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hairs color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{hairs}{hairs color} +\keyalias{hair}{hairs color} + +\keyexplain{hairstyle}{hair-selector}{\@pingu@select@hairstyle@} + Change the hairstyle (\autoref{mrk:pengu-change-comps}): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hairstyle=none] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{hair style}{hairstyle} +\shortcuts{hairstyle}{\@pingu@hairstyle@}{hairs color} + +\subsubsection{The Bill} +\keyexplain{bill}{bill-selector}{\@pingu@select@bill@} + Change the style of the bill (\autoref{mrk:pengu-change-comps}): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{flat}}}} +\begin{tikzpicture} + \pingu[bill=flat] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{bill color}{color}{\pingu@color@bill} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bill color=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\shortcuts{bill}{\@pingu@bill@}{bill color} + +\subsection{Drawing Styles} +\index{Styles} +\def\cursub{Styles!} +\keyexplain{:line}{}{} + Disable glows, shades and fills and enforce a line. This line will be darker + than the original fill color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:line] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{:fill}{}{} + Makes the whole penguin in one solid color (basically a shortcut for setting all main penguin colors to the same): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:fill] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{:ghost parts}{opacity}{.5} + Set the opacity of each penguin component individually. At the moment, this + excludes some glow calculations. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:ghost parts] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{:ghost}{opacity}{.5} + Set the opacity of the complete penguin. At the moment, this + excludes some glow calculations. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:ghost] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{:devil}{color}{pingu@purple} + Enable all devil components (not the wing items) and set their main color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:devil=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + + +\keyexplain{:hide}{}{} + Do not draw the main pingu: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa hat,:hide] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{:back}{}{} + Mirror the penguin, this swaps left and right, the rotation and more. + Yet, at least at the time of writing, this does not swap the drawing order in each layer, but just the layers: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[:back, left wing wave, + cane left, left item angle=70] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\def\cursub{} + +\subsection{Extras} +\subsubsection{The heart} +\showkeyexplain{heart}{node-options}{}(pingu@main) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[heart=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subsubsection{The tie} +\showkeyexplain{tie}{color}{pingu@green} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[tie] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@tie{<tie-color>} +\subkeyexplain{tie}{tie knot}{color}{\pingu@color@tie@knot} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[tie, tie knot=orange] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + +\subkeyexplain{tie}{tie length}{length}{\expandafter\detokenize\expandafter{\pingu@x@tie@length}} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[tie, tie length=1.25cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{tie}{tie offset}{length}{\pingu@x@tie@offset} + Change the upper vertical offset of the tie: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[tie, tie offset=.75cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{tie}{tie width}{length}{\pingu@x@tie@width} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[tie, tie width=.5cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{tie}{tie pattern}{tex-code}{} + Change the tie pattern. +\endsubkeyexplain + +\subkeyexplain{tie}{tie dots}{color}{pingu@white} + Change the \keyref{tie pattern} to dots: + \begin{tcblisting}{@} + \begin{tikzpicture} + \pingu[tie, tie dots] + \end{tikzpicture} + \end{tcblisting} +\endsubkeyexplain + +\subsubsection{The bowtie} +\showkeyexplain{bow tie}{color}{pingu@blue} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bow tie] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{bowtie}{bow tie} +\keyalias{bow-tie}{bow tie} + +\subkeyexplain{bow tie}{bow tie b}{color}{<bowtie-color>} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bow tie, bow tie b=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{bowtie b}{bow tie b}{bow tie} +\subkeyalias{bow-tie b}{bow tie b}{bow tie} + +{\def\pingu@color@bowtie{<bowtie-color>} +\subkeyexplain{bow tie}{bow tie knot}{color}{\pingu@color@bowtie@knot} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bow tie, bow tie knot=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{bowtie knot}{bow tie knot}{bow tie} +\subkeyalias{bow-tie knot}{bow tie knot}{bow tie} +} + +\subkeyexplain{bow tie}{bow tie offset}{length}{\pingu@x@bowtie@offset} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bow tie, bow tie offset=8mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{bowtie offset}{bow tie offset}{bow tie} +\subkeyalias{bow-tie offset}{bow tie offset}{bow tie} + +\subsubsection{The cup} + +\showkeyexplain{cup}{color}{pingu@green} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cup] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@cup{<cup-color>} +\subkeyexplain{cup}{cup straw}{color}{\pingu@color@cup@straw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cup, cup straw=!hide] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The medal} +\showkeyexplain{medal}{color}{pingu@yellow} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[medal] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{medal}{medal band}{color}{\pingu@color@medal@band} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[medal, medal band=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@medal{<medal-color>} +\subkeyexplain{medal}{medal shade}{color}{\pingu@color@medal@shade} +Change the color of the outer medal ring: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[medal, medal shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{medal}{medal shade width}{length}{.75pt} +Change the width of the outer medal ring: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[medal, medal shade=green, + medal shade width=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{medal}{medal text}{text}{\pingu@x@medal@text} +Set the text displayed in the medal. The style can be changed by +updating the substyle \texttt{medal text style}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[medal, medal text=XY, + medal text style/.style={black}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\keyexplain{gold medal}{text}{1} +Basically the same as the normal medal. This will activate \keyref{medal}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[gold medal] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{silver medal}{text}{2} +Basically the same as the normal medal, but with a silver color. This will activate \keyref{medal}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[silver medal] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{bronze medal}{text}{3} +Basically the same as the normal medal, but with a bronze color. This will activate \keyref{medal}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[bronze medal] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\subsubsection{The eye patches} + +\showkeyexplain{eye patch left}{color}{<pingu-main-color>}(pingu@main) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[eye patch left] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{eyepatch left}{eye patch left} +\keyalias{eye-patch left}{eye patch left} + +\showkeyexplain{eye patch right}{color}{<pingu-main-color>}(pingu@main) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[eye patch right] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{eyepatch right}{eye patch right} +\keyalias{eye-patch right}{eye patch right} + +\subsubsection{The monocle} + +\showkeyexplain{monocle left}{color}{pingu@black}(pingu@black) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle left] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{monocle left}{monocle left glass}{color}{\pingu@color@monocleleft@glass} +Set the color of the glass of the left monocle. The opacity of this color is set by \keyref{monocle left opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle left, + monocle left glass=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{monocle left fill}{monocle left glass}{monocle left} + + +\subkeyexplain{monocle left}{monocle left opacity}{factor}{\pingu@x@monocleleft@opacity} +Set the opacity of the glass color of the left monocle (set by \keyref{monocle left glass}): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[monocle left, + monocle left opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{monocle left fill opacity}{monocle left opacity}{monocle left} + +{\def\pingu@color@monocleleft{<left-monocle-color>} +\subkeyexplain{monocle left}{monocle left string}{color}{\pingu@color@monocleleft@string} +Set the color of the string of the left monocle: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle left, + monocle left string=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{monocle left}{monocle left string length}{length}{\pingu@x@monocleleft@string@l} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle left, + monocle left string length=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@monocleleft{<left-monocle-color>} +\subkeyexplain{monocle left}{monocle left blob}{color}{\pingu@color@monocleleft@blob} +Set the color of the blob at the end of the string of the left monocle: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle left, + monocle left blob=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\showkeyexplain{monocle right}{color}{pingu@black}(pingu@black) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle right] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{monocle right}{monocle right glass}{color}{\pingu@color@monocleright@glass} +Set the color of the glass of the right monocle. The opacity of this color is set by \keyref{monocle right opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle right, + monocle right glass=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{monocle right fill}{monocle right glass}{monocle right} + +\subkeyexplain{monocle right}{monocle right opacity}{factor}{\pingu@x@monocleright@opacity} +Set the opacity of the glass color of the right monocle (set by \keyref{monocle right glass}): +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[monocle right, + monocle right opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{monocle right fill opacity}{monocle right opacity}{monocle right} + +{\def\pingu@color@monocleright{<right-monocle-color>} +\subkeyexplain{monocle right}{monocle right string}{color}{\pingu@color@monocleright@string} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle right, + monocle right string=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + + +\subkeyexplain{monocle right}{monocle right string length}{length}{\pingu@x@monocleright@string@r} +Set the length of the right monocle string: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle right, + monocle right string length=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@monocleright{<right-monocle-color>} +\subkeyexplain{monocle right}{monocle right blob}{color}{\pingu@color@monocleright@blob} +Set the color of the blob at the end of the string of the right monocle: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[monocle right, + monocle right blob=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The pants} +\showkeyexplain{pants}{color}{pingu@red} +Sets the color of the pants: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{pants}{pants bands}{true/false}{false} +Switch the bands of the pants on and of: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants bands] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\subkeyexplain{pants}{pants button left}{color}{\pingu@color@pants@button@left} +Set the color of the left pant button: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants button left=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pants}{pants button right}{color}{\pingu@color@pants@button@right} +Set the color of the right pant button: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants button right=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pants}{pants buttons}{color}{\pingu@color@pants@button@left} +Sets \keyref{pants button left} and \keyref{pants button right} with the same color. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants buttons=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@pants@button@left{<left-button-color>}% +\subkeyexplain{pants}{pants button left shade}{color}{\pingu@color@pants@button@left@shade} +Set the color of the left pant button shade: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, + pants button left shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@pants@button@left{<right-button-color>}% +\subkeyexplain{pants}{pants button right shade}{color}{\pingu@color@pants@button@right@shade} +Set the color of the right pant button shade: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, + pants button right shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@pants@button@left{<left-button-color>}% +\subkeyexplain{pants}{pants buttons shade}{color}{\pingu@color@pants@button@left@shade} +Sets \keyref{pants button left shade} and \keyref{pants button right shade} with the same color. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants buttons shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{pants}{pants no buttons}{}{} +Remove the buttons from the pants: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants no buttons] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pants}{pants extra height}{length}{\pingu@x@pants@extra@height} +Raise the pants: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pants, pants extra height=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{pants without buttons}{pants no buttons}{pants} + +\subsubsection{The glow} + +\showkeyexplain{glow}{color}{pingu@white}(orange,glow solid=orange) + Active a glow around the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glow=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyexplain{glow thick}{color}{} +Will pass on the color to \keyref{glow} and use a \keyref{glow width function} width a thicker line width: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glow thick=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyexplain{glow solid}{color}{} +Will pass on the color to \keyref{glow} and use a \keyref{glow width function} combined with \keyref{glow function} to create a solid glow: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glow solid=green, wings wave] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\subkeyexplain{glow}{glow steps}{list}{\pingu@x@extra@glow@steps} + Comma separated list of discrete intervals for the glow calculation: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glow=green, glow steps={.3,.5,1}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\i{\textbackslash i~}% +\subkeyexplain{glow}{glow function}{function}{\pingu@x@extra@glow@func} + Function using the token \lpingu{\i} to refer to the current \keyref{glow steps}. Its evaluation will be used to determine the opacity of the current step: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glow=green, + glow function={.5/\i}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\i{\textbackslash i~}% +\subkeyexplain{glow}{glow width function}{function}{\pingu@x@extra@glow@width@func} + Function using the token \lpingu{\i} to refer to the current \keyref{glow steps}. Its evaluation will be used to determine the width of the current step: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glow=green, + glow width function={5mm-\i mm}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The eye frame} + +\keyexplain{eye frame}{color}{pingu@black} +This is more of a test extra that adds a frame around both eyes: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[eye frame=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{eyeframe}{eye frame} +\keyalias{eye-frame}{eye frame} + +\subsubsection{The glasses} + +\showkeyexplain{glasses}{color}{pingu@black} +Display glasses for the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{glasses}{glasses left fill}{color}{\pingu@color@glasses@fill@l} + Sets the fill color of the left glass. The opacity is determined by \keyref{glasses left opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses, + glasses left fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses right fill}{color}{\pingu@color@glasses@fill@r} + Sets the fill color of the right glass. The opacity is determined by \keyref{glasses right opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses, + glasses right fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses fill}{color}{} + Change the color of both glasses by calling \keyref{glasses left fill} and \keyref{glasses right fill} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{simple}}}} +\begin{tikzpicture} + \pingu[glasses, glasses fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses left opacity}{factor}{\pingu@x@glasses@op@l} +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses, + glasses left fill=green, + glasses left opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses right opacity}{factor}{\pingu@x@glasses@op@r} + Sets the fill opacity of the right glass: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses, + glasses right fill=green, + glasses right opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses opacity}{factor}{} + Change the opacity of both glasses by calling \keyref{glasses left opacity} and \keyref{glasses right opacity} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses, + glasses fill=teal, + glasses opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses}{glasses line width}{length}{1.125pt} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses, glasses line width=1mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{sun glasses}{color}{pingu@black} +Configure the \keyref{glasses} to display sunglasses. The color is passed on to \keyref{glasses fill} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sun glasses=orange] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{sunglasses}{sun glasses} + +\subsubsection{The rounded glasses} + +\showkeyexplain{glasses round}{color}{pingu@black} +Behaves equivalent to \keyref{glasses} but produces a round counterpart: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses round=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{glasses round}{glasses round left fill}{color}{\pingu@color@glassesround@fill@l} + Sets the fill color of the left glass. The opacity is determined by \keyref{glasses round left opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses round, + glasses round left fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round right fill}{color}{\pingu@color@glassesround@fill@r} + Sets the fill color of the right glass. The opacity is determined by \keyref{glasses round right opacity}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses round, + glasses round right fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round fill}{color}{} + Change the color of both glasses by calling \keyref{glasses round left fill} and \keyref{glasses round right fill} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{simple}}}} +\begin{tikzpicture} + \pingu[glasses round, glasses round fill=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round left opacity}{factor}{\pingu@x@glassesround@op@l} +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses round, + glasses round left fill=green, + glasses round left opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round right opacity}{factor}{\pingu@x@glassesround@op@r} + Sets the fill opacity of the right glass: +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses round, + glasses round right fill=green, + glasses round right opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round opacity}{factor}{} + Change the opacity of both glasses round by calling \keyref{glasses round left opacity} and \keyref{glasses round right opacity} with the same value. +\begin{tcblisting}{listing options={style=lstpingu,language=pingulang,deleteemph={[2]{1}}}} +\begin{tikzpicture} + \pingu[glasses round, + glasses round fill=teal, + glasses round opacity=1] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{glasses round}{glasses round line width}{length}{1.125pt} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[glasses round, glasses round line width=1mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{sun glasses round}{color}{pingu@black} +Configure the \keyref{glasses round} to display sunglasses round. The color is passed on to \keyref{glasses round fill} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sun glasses round=orange] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{sunglasses round}{sun glasses round} + +\subsubsection{The devil horns} + +\showkeyexplain{devil horns}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil horns=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{devilhorns}{devil horns} +\keyalias{devil-horns}{devil horns} + +\subsubsection{The devil wings} + +\showkeyexplain{devil wings}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil wings=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{devilwings}{devil wings} +\keyalias{devil-wings}{devil wings} + +\subkeyexplain{devil wings}{devil wings b}{color}{<devil--color>} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil wings, devil wings b=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{devilwings b}{devil wings b}{devil wings} +\subkeyalias{devil-wings b}{devil wings b}{devil wings} + +\subsubsection{The head band} + +\showkeyexplain{head band}{color}{pingu@red} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{headband}{head band} +\keyalias{head-band}{head band} + + +\subkeyexplain{head band}{head band bend}{angle}{\pingu@x@headband@bend} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band bend=25] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband bend}{head band bend}{head band} +\subkeyalias{head-band bend}{head band bend}{head band} + +\subkeyexplain{head band}{head band angle}{angle}{\pingu@x@headband@angle} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band angle=25] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband angle}{head band angle}{head band} +\subkeyalias{head-band angle}{head band angle}{head band} + +\subkeyexplain{head band}{head band upper angle}{angle}{\pingu@x@headband@angle} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band upper angle=25] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband upper angle}{head band upper angle}{head band} +\subkeyalias{head-band upper angle}{head band upper angle}{head band} + +\subkeyexplain{head band}{head band knot}{true/false}{\if@pingu@x@headband@knot@ true\else false\fi} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band knot] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband knot}{head band knot}{head band} +\subkeyalias{head-band knot}{head band knot}{head band} + +{\def\pingu@color@headband{<headband-color>} +\subkeyexplain{head band}{head band knot color}{color}{\pingu@color@headband@knot} +If \keyref{head band knot} is enabled, this setting changes the color of the knot: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band knot, + head band knot color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband knot color}{head band knot color}{head band} +\subkeyalias{head-band knot color}{head band knot color}{head band}} + +{\def\pingu@color@headband{<headband-color>} +\subkeyexplain{head band}{head band knot a color}{color}{\pingu@color@headband@knot@a} +If \keyref{head band knot} is enabled, this setting changes the color of the left headband wing (this will, by default, affect the right wing was well): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band knot, + head band knot a color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband knot a color}{head band knot a color}{head band} +\subkeyalias{head-band knot a color}{head band knot a color}{head band}} + +{\def\pingu@color@headband{<headband-color>} +\subkeyexplain{head band}{head band knot b color}{color}{\pingu@color@headband@knot@b} +If \keyref{head band knot} is enabled, this setting changes the color of the left headband wing (this will, by default, affect the right wing was well): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band knot, + head band knot a color=blue, + head band knot b color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband knot b color}{head band knot b color}{head band} +\subkeyalias{head-band knot b color}{head band knot b color}{head band}} + +\subkeyexplain{head band}{head band bands}{true/false}{\if@pingu@x@headband@bands@ true\else false\fi} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band bands=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband bands}{head band bands}{head band} +\subkeyalias{head-band bands}{head band bands}{head band} + +{\def\pingu@color@headband{<headband-color>} +\subkeyexplain{head band}{head band bands a color}{color}{\pingu@color@headband@bands@a} +If \keyref{head band bands} is enabled, this setting changes the color of the large one of the both bands: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band bands, + head band bands a color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband bands a color}{head band bands a color}{head band} +\subkeyalias{head-band bands a color}{head band bands a color}{head band}} + +{\def\pingu@color@headband{<headband-color>} +\subkeyexplain{head band}{head band bands b color}{color}{\pingu@color@headband@bands@b} +If \keyref{head band bands} is enabled, this setting changes the color of the left headband wing (this will, by default, affect the right wing was well): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[head band, head band bands, + head band bands a color=blue, + head band bands b color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headband bands b color}{head band bands b color}{head band} +\subkeyalias{head-band bands b color}{head band bands b color}{head band}} + +\subsubsection{The rook} + +\showkeyexplain{rook}{color}{pingu@silver} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[rook=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@rook{<rook-color>} +\subkeyexplain{rook}{rook back}{color}{\pingu@color@rook@back} +Change the color of the rook-costume background: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[rook, rook back=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{rook}{rook hatch}{true/false}{\if@pingu@x@rook@draw@hatch@ true\else false\fi} +Toggles the opening in the rook costume: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[rook, rook hatch=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@rook{<rook-color>} +\subkeyexplain{rook}{rook shade}{color}{\pingu@color@rook@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[rook, rook shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The halo} +\showkeyexplain{halo}{color}{pingu@lightblue} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[halo=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{halo}{halo raise}{length}{\pingu@x@halo@raise} +Define the vertical raise of the halo above the penguins head: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[halo, halo raise=4mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{halo}{halo glow}{true/false}{\if@pingu@x@halo@glow true\else false\fi} +Disable or enable the glow of the halo. The default is controlled by the \texttt{glows}-package option. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[halo, halo glow=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{halo}{halo above}{true/false}{\if@pingu@x@halo@above true\else false\fi} +Draws the halo above, which is useful in case of other gadgets: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[halo, halo above=true] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The strawhat} +\showkeyexplain{strawhat}{color}{brown!50!white} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[strawhat=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{straw hat}{strawhat} + +\subkeyexplain{strawhat}{strawhat ribbon}{color}{\pingu@color@strawhat@ribbon} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[strawhat, strawhat ribbon=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{straw hat ribbon}{strawhat ribbon}{strawhat} + +\subkeyexplain{strawhat}{strawhat position}{angle>:(<x>,<y>)<scale}{\pingu@x@strawhat@angle:(\pingu@x@strawhat@xshift,\pingu@x@strawhat@yshift)\{\pingu@x@strawhat@scale\}} +Currently, this is a very cumbersome command to change various strawhat parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[strawhat, + strawhat position={33:(-.8cm,.14cm){1.4}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{straw hat position}{strawhat position}{strawhat} + +\subsubsection{The hat} +\showkeyexplain{hat}{color}{brown!50!white} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hat=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@hat{<hat-color>} +\subkeyexplain{hat}{hat ribbon}{color}{\pingu@color@hat@ribbon} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hat, hat ribbon=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@hat{<hat-color>} +\subkeyexplain{hat}{hat base}{color}{\pingu@color@hat@base} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hat, hat base=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@hat{<hat-color>} +\subkeyexplain{hat}{hat coronal}{color}{\pingu@color@hat@coronal} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hat, hat coronal=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{hat}{hat position}{angle>:(<x>,<y>)<scale}{\pingu@x@hat@angle:(\pingu@x@hat@xshift,\pingu@x@hat@yshift)\{\pingu@x@hat@scale\}} +Currently, this is a very cumbersome command to change various hat parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hat, hat position={1:(0cm,-.09cm){1.33}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The conical hat} +\showkeyexplain{conical hat}{color}{pingu@yellow} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{conical hat}{conical hat rounding}{length}{\pingu@x@conicalhat@rounding} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat, + conical hat rounding=.25pt] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{ +\def\pingu@color@conicalhat{<canonical-hat-color>} +\subkeyexplain{conical hat}{conical hat shade}{length}{\pingu@x@conicalhat@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat, conical hat shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + +\subkeyexplain{conical hat height}{conical hat height}{length}{\pingu@x@conicalhat@height} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat, conical hat height=10mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{conical hat width}{conical hat width}{length}{\pingu@x@conicalhat@width} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat, conical hat width=3cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{conical hat}{conical hat position}{angle>:(<x>,<y>)<scale}{\pingu@x@conicalhat@angle:(\pingu@x@conicalhat@xshift,\pingu@x@conicalhat@yshift)\{\pingu@x@conicalhat@scale\}} +Currently, this is a very cumbersome command to change various conical hat parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[conical hat, + conical hat position={1:(-.1cm,-.275cm){1.33}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The cap} +\showkeyexplain{cap}{color}{pingu@bronze} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cap=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{cap padding}{cap padding}{length}{\pingu@x@cap@padding} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cap, cap padding=4mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\subkeyexplain{cap extra height}{cap extra height}{length}{\pingu@x@cap@height} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cap, cap extra height=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The construction helmet} +\showkeyexplain{construction helmet}{color}{pingu@yellow} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[construction helmet=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{construction helmet}{construction helmet padding}{length}{\pingu@x@constructionhelmet@padding} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[construction helmet, + construction helmet padding=4mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{construction helmet extra height}{construction helmet extra height}{length}{\pingu@x@constructionhelmet@height} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[construction helmet, + construction helmet extra height=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{construction helmet}{construction helmet position}{angle>:(<x>,<y>)<scale}{\pingu@x@constructionhelmet@angle:(\pingu@x@constructionhelmet@xshift,\pingu@x@constructionhelmet@yshift)\{\pingu@x@constructionhelmet@scale\}} +Currently, this is a very cumbersome command to change various construction helmet parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[construction helmet, + construction helmet position={1:(-.1cm,-.275cm){1.33}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The crown} +\showkeyexplain{crown}{color}{pingu@yellow} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{crown}{crown 3d}{true/false}{\if@pingu@x@crown@ddd@ true\else false\fi} +Toggle the 3d-Design of the crown. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown 3d=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@crown{<crown-color>} +\subkeyexplain{crown}{crown back}{color}{\pingu@color@crown@back} +Change the back color of the crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown back=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{crown}{crown front bend}{angle}{\pingu@x@crown@f@bend} +Change the front lower bend of the crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown front bend=52] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{crown}{crown back bend}{angle}{\pingu@x@crown@b@bend} +Change the back lower bend of the crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown back bend=46] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{crown}{crown gem shade}{true/false}{\if@pingu@x@crown@shade@ true\else false\fi} +Toggle the gem shading of the crown. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown gem shade=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{crown}{crown gem colors}{a><b><c><d><e><f}{\{\pingu@color@crown@gem@a\}\{\pingu@color@crown@gem@b\}\ldots} +Change the color of all the seven gems of the crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown gem colors={green}{green} + {green}{white}{green}{green}{green}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@crown{<crown-color>} +\subkeyexplain{crown}{crown gem ring}{color}{\pingu@color@crown@gem@ring} +Change the color of the rings around the crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, crown gem ring=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{crown}{crown position}{angle>:(<x>,<y>)<scale}{\pingu@x@crown@angle:(\pingu@x@crown@xshift,\pingu@x@crown@yshift)\{\pingu@x@crown@scale\}} +Currently, this is a very cumbersome command to change various crown parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown, eyes wink, + crown position={1:(-.1cm,-.275cm){1.33}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\keyexplain{crown 2d}{color}{pingu@yellow} +Enables the \keyref{crown} with the given color and disables \keyref{crown 3d}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[crown 2d=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\subsubsection{The princess crown} +Similar to \keyref{crown} but smaller. + +\showkeyexplain{princess crown}{color}{pingu@yellow} +Enable the smaller crown with a specific color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{princess crown}{princess crown 3d}{true/false}{\if@pingu@x@princesscrown@ddd@ true\else false\fi} +Toggle the 3d-Design of the smaller crown. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, princess crown 3d=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@princesscrown{<princess-crown-color>} +\subkeyexplain{princess crown}{princess crown back}{color}{\pingu@color@princesscrown@back} +Change the back color of the smaller crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, princess crown back=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{princess crown}{princess crown front bend}{angle}{\pingu@x@princesscrown@f@bend} +Change the front lower bend of the smaller crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, princess crown front bend=52] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{princess crown}{princess crown back bend}{angle}{\pingu@x@princesscrown@b@bend} +Change the back lower bend of the smaller crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, princess crown back bend=46] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{princess crown}{princess crown gem shade}{true/false}{\if@pingu@x@princesscrown@shade@ true\else false\fi} +Toggle the gem shading of the smaller crown. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, + princess crown gem shade=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{princess crown}{princess crown bobbles}{true/false}{\if@pingu@x@princesscrown@bobbles@ true\else false\fi} +Toggle the bobbles of the smaller crown. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, princess crown bobbles=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{princess crown}{princess crown gem colors}{a><b><c><d}{\{\pingu@color@princesscrown@gem@a\}\{\pingu@color@princesscrown@gem@b\}\ldots} +Change the color of all the seven gems of the smaller crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, + princess crown gem colors={green}{green}{white} + {green}{green}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@princesscrown{<princess-crown-color>} +\subkeyexplain{princess crown}{princess crown gem ring}{color}{\pingu@color@princesscrown@gem@ring} +Change the color of the rings around the small crown: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, + princess crown gem ring=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{princess crown}{princess crown position}{angle>:(<x>,<y>)<scale}{\pingu@x@princesscrown@angle:(\pingu@x@princesscrown@xshift,\pingu@x@princesscrown@yshift)\{\pingu@x@princesscrown@scale\}} +Currently, this is a very cumbersome command to change various princess crown parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown, eyes wink, + princess crown position={1:(-.19cm,-.2cm){2.2}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\keyexplain{princess crown 2d}{color}{pingu@yellow} +Enables the \keyref{princess crown} with the given color and disables \keyref{princess crown 3d}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[princess crown 2d=green] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\subsubsection{The cake hat} + +\showkeyexplain{cake-hat}{color}{pingu@white!92!<pingu-cake-hat-top>} +Enable a cake hat with a specific color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{cake-hat}{cake-hat top}{color}{\pingu@color@cakehat@top} +Change the color of the cake hat top: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat top=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat shade}{color}{\pingu@color@cakehat@shade} +Change the color of the heavily transparent cake hat shading: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat candle}{color}{\pingu@color@cakehat@candle} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat candle fire}{color}{\pingu@color@cakehat@candle@fire} +Change the color of the cake hats' candle most outer fire: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle fire=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@cakehat@candle@fire{<cake-hat-candle-fire>} +\subkeyexplain{cake-hat}{cake-hat candle fire 2}{color}{\pingu@color@cakehat@candle@fire@b} +Change the color of the cake hats' candle middle fire: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle fire 2=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@cakehat@candle@fire{<cake-hat-candle-fire>} +\subkeyexplain{cake-hat}{cake-hat candle fire 3}{color}{\pingu@color@cakehat@candle@fire@b} +Change the color of the cake hats' candle inner fire: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle fire 3=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{cake-hat}{cake-hat candle wick}{color}{\pingu@color@cakehat@candle@wick} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle wick=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat candle shade}{color}{\pingu@color@cakehat@candle@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat candle back}{color}{\pingu@color@cakehat@candle@back} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat candle back=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@cakehat{<cake-hat-color>} +\subkeyexplain{cake-hat}{cake-hat outline}{color}{\pingu@color@cakehat@outline} +Change the color of the cake hats' outline (width by \keyref{cake-hat outline width}): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat outline=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{cake-hat}{cake-hat outline width}{color}{\pingu@x@cakehat@outline@w} +Change the width of the cake hats' outline (color by \keyref{cake-hat outline}): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, cake-hat outline width=1mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{cake-hat}{cake-hat position}{angle>:(<x>,<y>)<scale}{\pingu@x@cakehat@angle:(\pingu@x@cakehat@xshift,\pingu@x@cakehat@yshift)\{\pingu@x@cakehat@scale\}} +Currently, this is a very cumbersome command to change various cake hat parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cake-hat, + cake-hat position={1:(-.085cm,-.2cm){1.275}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The pumpkin hat} + +\showkeyexplain{pumpkin-hat}{color}{pingu@bronze!97!white} +Enable a pumpkin hat with a specific color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@pumpkinhat{<pumpkinhat-color>} +\subkeyexplain{pumpkin-hat}{pumpkin-hat stalk}{color}{\pingu@color@pumpkinhat@stalk} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat stalk=teal] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\subkeyexplain{pumpkin-hat}{pumpkin-hat stalk top}{color}{<pumpkinhat-stalk-color>!95!pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat stalk top=teal] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{pumpkin-hat}{pumpkin-hat stripe a}{color}{\pingu@color@pumpkinhat@stripe@a} +Change the color of the first stripe. By default the other stripes share this ones color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat stripe a=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pumpkin-hat}{pumpkin-hat stripe b}{color}{\pingu@color@pumpkinhat@stripe@b} +Change the color of the second stripe. By default the third stripe share this ones color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat stripe b=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pumpkin-hat}{pumpkin-hat stripe c}{color}{\pingu@color@pumpkinhat@stripe@c} +Change the color of the third stripe: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat stripe c=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pumpkin-hat}{pumpkin-hat outline}{color}{\pingu@color@pumpkinhat@outline} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat outline=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pumpkin-hat}{pumpkin-hat outline width}{color}{\pingu@x@pumpkinhat@outline@w} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat,pumpkin-hat outline width=3pt] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{pumpkin-hat}{pumpkin-hat position}{angle>:(<x>,<y>)<scale}{\pingu@x@pumpkinhat@angle:(\pingu@x@pumpkinhat@xshift,\pingu@x@pumpkinhat@yshift)\{\pingu@x@pumpkinhat@scale\}} +Currently, this is a very cumbersome command to change various pumpkin hat parameters at the same time: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pumpkin-hat, + pumpkin-hat position={1:(-.085cm,-.15cm){1.275}}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The VR-Headset} + +\showkeyexplain{vr-headset}{color}{pingu@black!92!gray} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@vrheadset{<vr-headset>} +\subkeyexplain{vr-headset}{vr-headset band}{color}{\pingu@color@vrheadset@band} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset, vr-headset band=purple] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@vrheadset{<vr-headset>} +\subkeyexplain{vr-headset}{vr-headset band top}{color}{\pingu@color@vrheadset@band@top} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset, vr-headset band top=purple] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{vr-headset}{vr-headset hair}{}{} +Change the hair to support the headset: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset, vr-headset hair] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{vr-headset}{vr-headset text}{text}{omitted} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset, vr-headset text={ABCD}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{vr-headset}{vr-headset text color}{color}{\pingu@color@vrheadset@text@color} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[vr-headset, vr-headset text color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The headphones} + +\showkeyexplain{headphone}{color}{pingu@blue!80!pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{headphones}{headphone} + +{\def\pingu@color@headphone{<headphone>} +\subkeyexplain{headphone}{headphone left}{color}{\pingu@color@headphone@left} +Change the color of the left headphone (automatically sets the color of \keyref{headphone right}): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone left=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@headphone{<headphone>} +\subkeyexplain{headphone}{headphone right}{color}{\pingu@color@headphone@right} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone right=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{headphone}{headphone left outer}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone left outer=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{headphone}{headphone right outer}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone right outer=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{headphone}{headphone outer}{color}{pingu@black} +Set \keyref{headphone left outer} and \keyref{headphone right outer} with the same value: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone outer=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headphones outer}{headphone outer}{headphone} + +\subkeyexplain{headphone}{headphone left inner}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone left inner=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{headphone}{headphone right inner}{color}{pingu@black} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone right inner=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{headphone}{headphone inner}{color}{pingu@black} +Set \keyref{headphone left inner} and \keyref{headphone right inner} with the same value: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[headphone, headphone inner=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{headphones inner}{headphone inner}{headphone} + +\subsubsection{The santa hat} + +\showkeyexplain{santa hat}{color}{pingu@red!87!pingu@black} +Show the merry christmas: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa hat=pingu@red] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@santahat{<santa hat>} +\subkeyexplain{santa hat}{santa hat second}{color}{\pingu@color@santahat@second} +Change the wool color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa hat,santa hat second=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{ +\subkeyexplain{santa hat}{santa hat bobble}{color}{<santa hat second>} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa hat,santa hat bobble=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The santa beard} + +\showkeyexplain{santa beard}{color}{pingu@white!96!pingu@red!98!pingu@black!92!gray}(pingu@white!96!pingu@red!98!pingu@black!92!gray,santa beard string=pingu@main) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa beard=brown!20!white] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@body@main{<body main>} +\subkeyexplain{santa beard}{santa beard string}{color}{\pingu@color@santabeard@string} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[santa beard,santa beard string=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The mask} +\showkeyexplain{mask}{color}{pingu@white!61!gray}(pingu@white!61!gray,mask band=pingu@main) +Keep the penguin safe: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[mask=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{mask}{mask band}{color}{\pingu@color@mask@band} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[mask,mask band=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{mask}{mask line width}{length}{\pingu@x@mask@line@width} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[mask,mask line width=1.5pt] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@mask{<mask-color>} +\subkeyexplain{mask}{mask band inner}{color}{\pingu@color@mask@band@inner} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[mask,mask band inner=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@mask{<mask-color>} +\subkeyexplain{mask}{mask band outer}{color}{\pingu@color@mask@band@outer} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[mask,mask band outer=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subsubsection{The blush} + +\showkeyexplain{blush}{color}{pingu@red}(pingu@red,blush opacity=.4) +Make it cute: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[eyes wink, blush=pingu@purple] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{blush}{blush second}{color}{<blush>} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[blush, blush second=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{blush}{blush opacity}{factor}{\pingu@x@blush@opacity} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[blush, blush opacity=.86] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The banner} + +\showkeyexplain{banner}{text}{Bannertext} +Give the penguin a banner to hold (it adapts to the wing positions): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[left wing wave, banner=Hello] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{banner}{banner band}{color}{\pingu@color@banner@band} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner band=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner text color}{color}{\pingu@color@banner@text@color} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[wings wave, banner, banner text color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner stick left color}{color}{\pingu@color@banner@stick@left} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner stick left color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner stick right color}{color}{\pingu@color@banner@stick@right} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner stick right color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner sticks color}{color}{\pingu@color@banner@stick@left} +Calls \keyref{banner stick left color} and \keyref{banner stick right color} with the same color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner sticks color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner stick left length}{length}{\pingu@banner@stick@left@l} +Changes the banners left stick length: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner stick left length=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner stick right length}{length}{\pingu@banner@stick@right@l} +Changes the banners right stick length: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner stick right length=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner sticks length}{color}{\pingu@banner@stick@left@l} +Calls \keyref{banner stick left length} and \keyref{banner stick right length} with the same length: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner sticks length=9mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner raise}{length}{\pingu@banner@raise} +Change the raise of the banner text: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner raise=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner height}{length}{\pingu@banner@height} +Change the height of the banner (this modifies the half): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner height=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner font}{font}{<fat font>} +Change the height of the banner: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner font=\itshape] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{banner}{banner bent}{angle}{\pingu@banner@bent} +Change the bending of the banner: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[banner, banner bent=0] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsection{Wing Items} +\label{sub:wing-items}Most wing items created have a two variants: one for the left and one for the right wing. For consistency, both of them are represented in the documentation~--- many times, they are not just mirrored but two different shapes that appear to be mirrored with special care. + + +\keyexplain{left wing item angle}{angle}{\pingu@wing@left@item@angle@user} + Relative rotation of the \hyperref[sub:wing-items]{wing items} placed in the left wing: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane left, cane right, + left wing item angle=70] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{left item angle}{left wing item angle} + + +\keyexplain{left wing item flip}{true/false}{\if@pingu@wi@flip@left true\else false\fi} + Some \hyperref[sub:wing-items]{wing items} do have a different style, depending on the wing they are in (e.g. they are mirrored). This option toggles the stile for the left wing. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left, flag right, + left wing item flip] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{left item flip}{left wing item flip} + + +\keyexplain{right wing item angle}{angle}{\pingu@wing@right@item@angle@user} + Relative rotation of the \hyperref[sub:wing-items]{wing items} placed in the right wing: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane left, cane right, + right wing item angle=70] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{right item angle}{right wing item angle} + + +\keyexplain{right wing item flip}{true/false}{\if@pingu@wi@flip@right true\else false\fi} + Some \hyperref[sub:wing-items]{wing items} do have a different style, depending on the wing they are in (e.g. they are mirrored). This option toggles the stile for the right wing. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left, flag right, + right wing item flip] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{right item flip}{right wing item flip} + +\subsubsection{The lollipop} + +\showkeyexplain{lollipop left}{color}{pingu@green} + Enable the left lollipop for the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{lollipop left}{lollipop left handle}{color}{\pingu@color@lollipopleft@handle} + Change the handle color of the left lollipop: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop left, lollipop left handle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lollipop left}{lollipop left second}{color}{\pingu@color@lollipopleft@second} + Change the second color of the left lollipop, used for the ring: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop left, lollipop left second=blue] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{lollipop right}{color}{pingu@green} + Enable the right lollipop for the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{lollipop right}{lollipop right handle}{color}{\pingu@color@lollipopright@handle} + Change the handle color of the right lollipop: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop right, lollipop right handle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lollipop right}{lollipop right second}{color}{\pingu@color@lollipopright@second} + Change the second color of the right lollipop, used for the ring: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[lollipop right, lollipop right second=blue] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\subsubsection{The cane} + +\showkeyexplain{cane left}{color}{pingu@bronze} + Enable the left cane for the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{cane left}{cane left raise}{length}{\pinug@x@cane@raise@left} + Raise the cane of the pingu: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane left,cane left raise=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{cane right}{color}{pingu@bronze} + Enable the right cane for the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{cane right}{cane right raise}{length}{\pinug@x@cane@raise@right} + Raise the cane of the pingu: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cane right,cane right raise=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The hand cast} + +\keyexplain{hand cast left}{text}{X} + Show a symbol above the left wing of the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hand cast left=ABCDEFG] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{handcast left}{hand cast left} + +\subkeyexplain{hand cast left}{hand cast left color}{color}{\pingu@color@handcast@left@color} + Change the color of the left hand cast: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hand cast left, + hand cast left color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\keyalias{handcast left color}{hand cast left color} + +\keyexplain{hand cast right}{text}{X} + Show a symbol above the right wing of the penguin: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hand cast right=ABCDEFG] +\end{tikzpicture} +\end{tcblisting} +\endkeyexplain + +\keyalias{handcast right}{hand cast right} + +\subkeyexplain{hand cast right}{hand cast right color}{color}{\pingu@color@handcast@right@color} + Change the color of the right hand cast: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[hand cast right, + hand cast right color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\keyalias{handcast right color}{hand cast right color} + +\subsubsection{The sign post} + +\showkeyexplain{sign post left}{text}{}(Example) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post left=ABC] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{signpost left}{sign post left} + +\subkeyexplain{sign post left}{sign post left color}{color}{\pingu@color@signpostleft} + Change the color of the sign post: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post left, sign post left color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{signpost left color}{sign post left color}{sign post left} + +\subkeyexplain{sign post left}{sign post left font color}{color}{\pingu@color@signpostleft@font} + Change the font color of the sign post: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post left=ABCD, + sign post left font color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{signpost left fontcolor}{sign post left font color}{sign post left} + +\showkeyexplain{sign post right}{text}{}(Example) +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post right=ABC] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\keyalias{signpost right}{sign post right} + +\subkeyexplain{sign post right}{sign post right color}{color}{\pingu@color@signpostright} + Change the color of the sign post: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post right, sign post right color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{signpost right color}{sign post right color}{sign post right} + +\subkeyexplain{sign post right}{sign post right font color}{color}{\pingu@color@signpostright@font} + Change the font color of the sign post: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[sign post right=ABCD, + sign post right font color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyalias{signpost right fontcolor}{sign post right font color}{sign post right} + +\subsubsection{The lightsaber} + +\showkeyexplain{lightsaber left}{color}{pingu@blue}(pingu@blue) +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left handle}{color}{\pingu@color@lightsaberleft@handle} + Change the color of the penguins lightsabers' handle: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left handle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left deco}{color}{\pingu@color@lightsaberleft@deco} + Change the color of the penguins lightsabers' decoration elements: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left deco=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left ribbs}{color}{\pingu@color@lightsaberleft@ribbs} + Change the color of the penguins lightsabers' ribbs: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left ribbs=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left button}{color}{\pingu@color@lightsaberleft@button} + Change the color of the penguins lightsabers' first button: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left button=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left button b}{color}{\pingu@color@lightsaberleft@button@b} + Change the color of the penguins lightsabers' second button: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left button b=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left double}{true/false}{\if@pingu@x@lightsaber@double@left true\else false\fi} +Toggle the visibility of the second lightsaber: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left double, + left wing item angle=90] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\@col{<lightsaber-color>} +\subkeyexplain{lightsaber left}{lightsaber left color b}{color}{\pingu@color@lightsaberleft@color@b} + Change the color of the penguins second lightsaber, which is only shown if \keyref{lightsaber left double} is enabled: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left double, + lightsaber left color b=green, + left wing item angle=90] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{lightsaber left}{lightsaber left length}{length}{\pingu@x@lightsaber@length@left} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left length=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left length b}{length}{\pingu@x@lightsaber@length@b@left} + Change the length of the penguins second lightsaber (active with \keyref{lightsaber left double}): +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left double, + lightsaber left length b=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\subkeyexplain{lightsaber left}{lightsaber left yshift}{length}{\pingu@x@lightsaber@yshift@left} + Shift the penguins lightsaber in the y direction: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left yshift=12mm, + lightsaber left length=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left glow}{true/false}{\if@pingu@x@lightsaber@glow@left true\else false\fi} +Toggle the glow of the lightsaber. The default is controlled by the \texttt{glows}-package option. +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left glow=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left solid}{}{} +Disables the \keyref{lightsaber left glow}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left solid] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left glow core}{color}{\pingu@color@lightsaberleft@glow@core} +Change the color of the lightsabers glow core: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left glow=true, + lightsaber left glow core=cyan] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left outer glow factor}{factor}{\pingu@x@lightsaber@ogf@left} +Modify the glow factor of the left lightsaber: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, + lightsaber left outer glow factor=.3] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber left}{lightsaber left disabled}{}{} +Disables the lightsaber so only the handle is visible: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber left, lightsaber left disabled] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\showkeyexplain{lightsaber right}{color}{pingu@blue}(pingu@blue) +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right handle}{color}{\pingu@color@lightsaberright@handle} + Change the color of the penguins lightsabers' handle: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right handle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right deco}{color}{\pingu@color@lightsaberright@deco} + Change the color of the penguins lightsabers' decoration elements: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right deco=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right ribbs}{color}{\pingu@color@lightsaberright@ribbs} + Change the color of the penguins lightsabers' ribbs: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right ribbs=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right button}{color}{\pingu@color@lightsaberright@button} + Change the color of the penguins lightsabers' first button: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right button=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right button b}{color}{\pingu@color@lightsaberright@button@b} + Change the color of the penguins lightsabers' second button: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right button b=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right double}{true/false}{\if@pingu@x@lightsaber@double@right true\else false\fi} +Toggle the visibility of the second lightsaber: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right double, + right wing item angle=90] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\@col{<lightsaber-color>} +\subkeyexplain{lightsaber right}{lightsaber right color b}{color}{\pingu@color@lightsaberright@color@b} + Change the color of the penguins second lightsaber, which is only shown if \keyref{lightsaber right double} is enabled: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right double, + lightsaber right color b=green, + right wing item angle=90] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{lightsaber right}{lightsaber right length}{length}{\pingu@x@lightsaber@length@right} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right length=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right length b}{length}{\pingu@x@lightsaber@length@b@right} + Change the length of the penguins second lightsaber (active with \keyref{lightsaber right double}): +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right double, + lightsaber right length b=6mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + + +\subkeyexplain{lightsaber right}{lightsaber right yshift}{length}{\pingu@x@lightsaber@yshift@right} + Shift the penguins lightsaber in the y direction: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right yshift=12mm, + lightsaber right length=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right glow}{true/false}{\if@pingu@x@lightsaber@glow@right true\else false\fi} +Toggle the glow of the lightsaber. The default is controlled by the \texttt{glows}-package option. +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right glow=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right solid}{}{} +Disables the \keyref{lightsaber right glow}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right solid] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right glow core}{color}{\pingu@color@lightsaberright@glow@core} +Change the color of the lightsabers glow core: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right glow=true, + lightsaber right glow core=cyan] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right outer glow factor}{factor}{\pingu@x@lightsaber@ogf@right} +Modify the glow factor of the right lightsaber: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, + lightsaber right outer glow factor=.3] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{lightsaber right}{lightsaber right disabled}{}{} +Disables the lightsaber so only the handle is visible: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[lightsaber right, lightsaber right disabled] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The lightstaff} + +\showkeyexplain{light-staff left}{color}{pingu@green} +Color similar to \keyref{light-staff left head}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{light-staff left}{light-staff left length}{length}{\pingu@lightstaff@left@length} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left length=18mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left glow length}{length}{\pingu@lightstaff@left@glow@length} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left glow length=16mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left head}{color}{pingu@green} +Same as assigning the color to \keyref{light-staff left}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left head=pingu@purple] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left staff}{color}{\pingu@color@lightstaff@left@staff} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left staff=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left core}{color}{\pingu@color@lightstaff@left@head@core} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left core=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left core width}{length}{\pingu@lightstaff@left@core@width} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left core width=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff left}{light-staff left outer glow factor}{factor}{\pingu@x@lightstaff@ogf@left} +Similar to \keyref{lightsaber left outer glow factor}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff left, + light-staff left outer glow factor=.5] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{light-staff right}{color}{pingu@green} +Color similar to \keyref{light-staff right head}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{light-staff right}{light-staff right length}{length}{\pingu@lightstaff@right@length} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right length=18mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right glow length}{length}{\pingu@lightstaff@right@glow@length} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right glow length=16mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right head}{color}{pingu@green} +Same as assigning the color to \keyref{light-staff right}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right head=pingu@purple] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right staff}{color}{\pingu@color@lightstaff@right@staff} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right staff=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right core}{color}{\pingu@color@lightstaff@right@head@core} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right core=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right core width}{length}{\pingu@lightstaff@right@core@width} +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right core width=2mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{light-staff right}{light-staff right outer glow factor}{factor}{\pingu@x@lightstaff@ogf@right} +Similar to \keyref{lightsaber right outer glow factor}: +\begin{tcblisting}{} +\begin{tikzpicture} + \pingu[light-staff right, + light-staff right outer glow factor=.5] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The flag} +The flag is special in that it is meant to be customized by commands so that the visible insignia is to the users liking. + +\showkeyexplain{flag left}{color}{pingu@purple} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{flag left}{flag left pole}{color}{\pingu@color@flagleft@pole} +Change the color of the flag pole: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left, flag left pole=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{flag left}{flag left bobble}{color}{\pingu@color@flagleft@bobble} +Change the color of the flag poles top bobble: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left, flag left bobble=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{flag left}{flag left code}{\LaTeX-code}{omitted} +Set the flag code which is effectively the drawing code of the flag. +You can use the styles \lpingu{/pingu/@flag@first} and \lpingu{/pingu/@flag} to inherit the default flag styles and to stay compliant with the modifications of the other macros: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag left, flag left code={ + \node[/pingu/@flag@first, + /pingu/@flag={blue}{5mm}] + (upper) at (0,0) {}; + \node[below,/pingu/@flag={black}{4mm}] + (lower) at (upper.south) {}; + }] +\end{tikzpicture} +\end{tcblisting} +Note that \lpingu{/pingu/@flag} expects two arguments: the color of the flag segment and its thickness. +\endsubkeyexplain + +\@toggle@showcase % just so that they are aligned on the same side +\showkeyexplain{pride flag left}{color}{pingu@bronze} + Uses \keyref{flag left}, \keyref{flag left code}, and \keyref{flag left pole} to set a pride flag. The color argument is passed to \keyref{flag left pole}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pride flag left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain +\@toggle@showcase % and back + + +\showkeyexplain{german flag left}{color}{pingu@bronze} + Uses \keyref{flag left}, \keyref{flag left code}, and \keyref{flag left pole} to set a german flag. The color argument is passed to \keyref{flag left pole}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[german flag left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + + +\showkeyexplain{flag right}{color}{pingu@purple} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{flag right}{flag right pole}{color}{\pingu@color@flagright@pole} +Change the color of the flag pole: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag right, flag right pole=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{flag right}{flag right bobble}{color}{\pingu@color@flagright@bobble} +Change the color of the flag poles top bobble: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag right, flag right bobble=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{flag right}{flag right code}{\LaTeX-code}{omitted} +Set the flag code which is effectively the drawing code of the flag. +You can use the styles \lpingu{/pingu/@flag@first} and \lpingu{/pingu/@flag} to inherit the default flag styles and to stay compliant with the modifications of the other macros: + \begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[flag right, flag right code={ + \node[/pingu/@flag@first, + /pingu/@flag={blue}{5mm}] + (upper) at (0,0) {}; + \node[below,/pingu/@flag={black}{4mm}] + (lower) at (upper.south) {}; + }] +\end{tikzpicture} +\end{tcblisting} +Note that \lpingu{/pingu/@flag} expects two arguments: the color of the flag segment and its thickness. +\endsubkeyexplain + +\@toggle@showcase % just so that they are aligned on the same side +\showkeyexplain{pride flag right}{color}{pingu@bronze} + Uses \keyref{flag right}, \keyref{flag right code}, and \keyref{flag right pole} to set a pride flag. The color argument is passed to \keyref{flag right pole}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[pride flag right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain +\@toggle@showcase + +\showkeyexplain{german flag right}{color}{pingu@bronze} + Uses \keyref{flag right}, \keyref{flag right code}, and \keyref{flag right pole} to set a german flag. The color argument is passed to \keyref{flag right pole}. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[german flag right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subsubsection{The staff} + +\showkeyexplain{staff left}{color}{pingu@bronze} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[staff left=green, left item angle=70] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{staff left}{staff left length}{length}{\pingu@staff@left@length} +Change the staff length: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[staff left, staff left length=20mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{staff right}{color}{pingu@bronze} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[staff right=green, right item angle=70] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{staff right}{staff right length}{length}{\pingu@staff@right@length} +Change the staff length: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[staff right, staff right length=20mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The laptop} + +\showkeyexplain{laptop left}{color}{gray!80!pingu@white} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@laptopleft{laptop-left-color} +\subkeyexplain{laptop left}{laptop left bracket}{color}{\pingu@color@laptopleft@bracket} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left bracket=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop left}{laptop left lower}{color}{\pingu@color@laptopleft@lower} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left lower=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop left}{laptop left key}{color}{\pingu@color@laptopleft@key} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left key=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop left}{laptop left display}{color}{\pingu@color@laptopleft@display} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left display=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop left}{laptop left content}{tikz-code}{\pingu@x@laptopleft@content} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left content={\draw circle[radius=2mm];}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop left}{laptop left mid}{code}{\pingu@x@laptopleft@mid} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop left, laptop left mid={Hey}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + + +\showkeyexplain{laptop right}{color}{gray!80!pingu@white} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +{\def\pingu@color@laptopright{laptop-right-color} +\subkeyexplain{laptop right}{laptop right bracket}{color}{\pingu@color@laptopright@bracket} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right bracket=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop right}{laptop right lower}{color}{\pingu@color@laptopright@lower} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right lower=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop right}{laptop right key}{color}{\pingu@color@laptopright@key} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right key=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop right}{laptop right display}{color}{\pingu@color@laptopright@display} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right display=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop right}{laptop right content}{tikz-code}{\pingu@x@laptopright@content} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right content={\draw circle[radius=2mm];}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{laptop right}{laptop right mid}{code}{\pingu@x@laptopright@mid} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[laptop right, laptop right mid={Hey}] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + +\subsubsection{The devil fork} + +\showkeyexplain{devil fork left}{color}{pingu@red} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{devil fork left}{devil fork left second}{color}{\pingu@color@devilforkleft@second} +Staff color of the \keyref{devil fork left}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork left, + devil fork left second=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{devil fork left}{devil fork left length}{color}{\pingu@devilfork@left@length} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork left, devil fork left length=7mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{devil fork right}{color}{pingu@red} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{devil fork right}{devil fork right second}{color}{\pingu@color@devilforkright@second} +Staff color of the \keyref{devil fork right}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork right, + devil fork right second=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{devil fork right}{devil fork right length}{color}{\pingu@devilfork@right@length} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[devil fork right, + devil fork right length=7mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The Horse} + +\showkeyexplain{horse left}{color}{pingu@bronze!80!pingu@black} + Give it a horse: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{horse left}{horse left flip}{true/false}{false} +By default, the left horse will be flipped. The right horse won't. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left flip=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left has base}{true/false}{false} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@horseleft{<horse-left-color>} +\subkeyexplain{horse left}{horse left draw}{color}{\pingu@color@horseleft@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left mane}{color}{\pingu@color@horseleft@mane} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left mane=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseleft@mane{<horse-left-mane-color>} +\subkeyexplain{horse left}{horse left mane draw}{color}{\pingu@color@horseleft@mane@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left mane draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left thatch}{color}{\pingu@color@horseleft@thatch} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left thatch=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseleft@thatch{<horse-left-thatch-color>} +\subkeyexplain{horse left}{horse left thatch draw}{color}{\pingu@color@horseleft@thatch@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left thatch draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left tail}{color}{\pingu@color@horseleft@tail} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left tail=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseleft@tail{<horse-left-tail-color>} +\subkeyexplain{horse left}{horse left tail draw}{color}{\pingu@color@horseleft@tail@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left tail draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left eyes}{color}{\pingu@color@horseleft@eyes} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left eyes=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +\subkeyalias{horse left eye}{horse left eyes}{horse left} + +\subkeyexplain{horse left}{horse left mouth}{color}{\pingu@color@horseleft@mouth} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left mouth=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left nose}{color}{\pingu@color@horseleft@nose} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left nose=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left ears}{color}{\pingu@color@horseleft@ears} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left ears=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left base}{color}{\pingu@color@horseleft@base} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base, + horse left base=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseleft@base{<horse-left-base-color>} +\subkeyexplain{horse left}{horse left base draw}{color}{\pingu@color@horseleft@base@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base, + horse left base draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left base shade}{color}{\pingu@color@horseleft@base@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base, + horse left base shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseleft@base@shade{<horse-left-base-shade-color>} +\subkeyexplain{horse left}{horse left base shade draw}{color}{\pingu@color@horseleft@base@shade@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base, + horse left base shade draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left xshift}{color}{\pingu@x@horseleft@xshift} +This key reacts with the \keyref{horse left flip} option! +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left xshift=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left yshift}{color}{\pingu@x@horseleft@yshift} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left yshift=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse left}{horse left on base}{}{} +Uses \keyref{horse left xshift} and \keyref{horse left yshift} to align a horse on a base to be set on the penguin-wing: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse left,horse left has base, + horse left on base] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + +\showkeyexplain{horse right}{color}{pingu@bronze!80!pingu@black} + Give it a horse: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{horse right}{horse right flip}{true/false}{false} +By default, the right horse will be flipped. The right horse won't. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right flip=false] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right has base}{true/false}{false} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@horseright{<horse-right-color>} +\subkeyexplain{horse right}{horse right draw}{color}{\pingu@color@horseright@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right mane}{color}{\pingu@color@horseright@mane} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right mane=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseright@mane{<horse-right-mane-color>} +\subkeyexplain{horse right}{horse right mane draw}{color}{\pingu@color@horseright@mane@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right mane draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right thatch}{color}{\pingu@color@horseright@thatch} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right thatch=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseright@thatch{<horse-right-thatch-color>} +\subkeyexplain{horse right}{horse right thatch draw}{color}{\pingu@color@horseright@thatch@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right thatch draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right tail}{color}{\pingu@color@horseright@tail} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right tail=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseright@tail{<horse-right-tail-color>} +\subkeyexplain{horse right}{horse right tail draw}{color}{\pingu@color@horseright@tail@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right tail draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right eyes}{color}{\pingu@color@horseright@eyes} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right eyes=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +\subkeyalias{horse right eye}{horse right eyes}{horse right} + +\subkeyexplain{horse right}{horse right mouth}{color}{\pingu@color@horseright@mouth} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right mouth=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right nose}{color}{\pingu@color@horseright@nose} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right nose=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right ears}{color}{\pingu@color@horseright@ears} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right ears=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right base}{color}{\pingu@color@horseright@base} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base, + horse right base=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseright@base{<horse-right-base-color>} +\subkeyexplain{horse right}{horse right base draw}{color}{\pingu@color@horseright@base@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base, + horse right base draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right base shade}{color}{\pingu@color@horseright@base@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base, + horse right base shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\def\pingu@color@horseright@base@shade{<horse-right-base-shade-color>} +\subkeyexplain{horse right}{horse right base shade draw}{color}{\pingu@color@horseright@base@shade@draw} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base, + horse right base shade draw=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right xshift}{color}{\pingu@x@horseright@xshift} +This key reacts with the \keyref{horse right flip} option! +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right xshift=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right yshift}{color}{\pingu@x@horseright@yshift} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right yshift=1cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{horse right}{horse right on base}{}{} +Uses \keyref{horse right xshift} and \keyref{horse right yshift} to align a horse on a base to be set on the penguin-wing: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[horse right,horse right has base, + horse right on base] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain +} + + +\subsection{Clothes} + +Clothes are currently completely work in progress as the goal is to create an elegant way to offer clothes that adapt to the wing positions of the penguin. +Currently there is only one cloth type that may be heavily edited in the course of development\ldots + +\subsubsection{The cloak} + +Originally developed just as a cape, the cloak is no a whole extension. + +\showkeyexplain{cloak}{color}{pingu@bronze} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\begin{tcblisting}{sidebyside=false, title=Cloak-Showcase} +\begin{tikzpicture} + \pingu[wings wave, cloak] + \pingu[wings shock, cloak, xshift=3.5cm] + \pingu[right wing wave, left wing hug, cloak, xshift=7cm] + \pingu[right wing grab, left wing raise, cloak, xshift=10.5cm] +\end{tikzpicture} +\end{tcblisting} + +{\def\pingu@color@cloak{<cloak-color>} +\subkeyexplain{cloak}{cloak cap}{color}{\pingu@color@cloak@cap} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak, cloak cap=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@cloak{<cloak-color>} +\subkeyexplain{cloak}{cloak wings color}{color}{\pingu@color@cloak@wings} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak, cloak wings color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@cloak{<cloak-color>} +\subkeyexplain{cloak}{cloak bottom color}{color}{\pingu@color@cloak@bottom} + Should change the cloaks bottom color (currently ineffective): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak, cloak bottom color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@cloak{<cloak-color>} +\subkeyexplain{cloak}{cloak front color}{color}{\pingu@color@cloak@front} + Should change the cloaks front color (currently ineffective): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak, cloak front color=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{cloak}{cloak padding}{length}{\pingu@x@cloak@padding} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cloak, cloak padding=13mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\showkeyexplain{cape}{color}{pingu@bronze} + Uses \keyref{cloak} but disables all parts that are not part of a cape: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[cape=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subsubsection{The shirt} + +\showkeyexplain{shirt}{color}{pingu@bronze} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt=green] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{shirt}{shirt raise}{length}{\pingu@shirt@raise} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt raise=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt padding}{length}{\pingu@shirt@padding} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt padding=4mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt button top}{color}{\pingu@color@shirt@button@top} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button top=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt button middle}{color}{\pingu@color@shirt@button@middle} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button middle=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt button bottom}{color}{\pingu@color@shirt@button@bottom} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button bottom=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt buttons}{color}{} +Set \keyref{shirt button top}, \keyref{shirt button middle} and \keyref{shirt button bottom}, that is all the buttons, with the same color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt buttons=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@shirt@button@top{<shirt-button-top>}\def\pingu@color@shirt{<shirt-color>} +\subkeyexplain{shirt}{shirt button top shade}{color}{\pingu@color@shirt@button@top@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button top shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@shirt@button@middle{<shirt-button-middle>}\def\pingu@color@shirt{<shirt-color>} +\subkeyexplain{shirt}{shirt button middle shade}{color}{\pingu@color@shirt@button@middle@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button middle shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +{\def\pingu@color@shirt@button@top{<shirt-button-top>}\def\pingu@color@shirt{<shirt-color>} +\subkeyexplain{shirt}{shirt button bottom shade}{color}{\pingu@color@shirt@button@bottom@shade} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt button bottom shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\subkeyexplain{shirt}{shirt buttons shade}{color}{} +Set all shadings of the buttons: \keyref{shirt button top shade}, \keyref{shirt button middle shade} and \keyref{shirt button bottom shade} with the same color: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt buttons shade=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt no buttons}{}{} +Disable all buttons (by setting their colors to \lpingu{!hide}): +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, shirt no buttons] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subkeyexplain{shirt}{shirt above}{}{} +This is interesting in combination with other extras as it allows the \keyref{shirt} to be drawn above them. +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[shirt, tie, shirt above] + \pingu[shirt, tie, xshift=3cm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +\subsubsection{The second shirt} +\showkeyexplain{second shirt}{color}{pingu@red} + Display a shirt below the \keyref{shirt}: +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[second shirt=green, shirt] +\end{tikzpicture} +\end{tcblisting} +\endshowkeyexplain + +\subkeyexplain{second shirt}{second shirt raise}{length}{\pingu@secondshirt@raise} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[second shirt, second shirt raise=5mm] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain + +{\def\pingu@color@secondshirt{<second-shirt-color>} +\subkeyexplain{second shirt}{second shirt neck}{color}{\pingu@color@secondshirt@neck} +\begin{tcblisting}{@} +\begin{tikzpicture} + \pingu[second shirt, second shirt neck=green] +\end{tikzpicture} +\end{tcblisting} +\endsubkeyexplain} + +\lstset{breakatwhitespace}\printindex +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/makeindex/tikzpingus/indexstyle.ist b/Master/texmf-dist/makeindex/tikzpingus/indexstyle.ist new file mode 100644 index 00000000000..928338d014a --- /dev/null +++ b/Master/texmf-dist/makeindex/tikzpingus/indexstyle.ist @@ -0,0 +1,51 @@ +% comment - in case of need :D +heading_prefix "\n% Header (guard) + \\ifcsname needspace\\endcsname \\needspace{3\\baselineskip}\\fi + \\ifcsname tikz\\endcsname + \\def\\ledx@head#1{\\tikz{\\node[text width=3cm,align=center] (hr)at(0,0){\\textbf{#1}};\\draw[rounded corners=3pt,thick,line cap=round]([yshift=-.125cm]hr.north west)|-(hr.north east)--++(0,-.125cm);\\draw[rounded corners=2.5pt,thick,line cap=round] ([yshift=.125cm]hr.south west)|-(hr.south east)--++(0,.125cm);}} + \\else\\let\\ledx@head\\textbf\\fi\\medskip\\par\\color{black}{\\centering\\ledx@head{" +heading_suffix "}\\nopagebreak\\medskip\\par}\\nopagebreak " +headings_flag 1 +preamble "\\begin{theindex}% + \\providecommand*\\indexgroup[1]{\\item\\textbf{#1}\\nopagebreak}~\\par\\providecommand\\idxfsize{\\normalsize}\\makeatletter +\\ifcsname hyperpage\\endcsname +\\LetLtxMacro\\ledx@h\\hyperpage +\\newif\\ifledx@rc@ +\\def\\ledx@@s{% + \\def\\ledx@fs{Y}\\gdef\\ledx@@u{}\\gdef\\ledx@@b{}% + \\def\\hyperpage##1{\\g@addto@macro\\ledx@@u{##1}\\global\\let\\ledx@@b\\ledx@@u\\ledx@h{##1}}}% +\\def\\ledx@@sl{% + \\def\\ledx@fs{Y}\\ledx@rc@true\\global\\let\\ledx@@u\\ledx@@b + \\def\\hyperpage##1{\\ifledx@rc@\\def\\ledx@@u{}\\ledx@rc@false\\fi\\g@addto@macro\\ledx@@u{##1}\\ledx@h{##1}}}% +\\def\\ledx@@d{% + \\def\\ledx@fs{}% + \\def\\hyperpage##1{\\g@addto@macro\\ledx@cpb{##1}\\ledx@h{##1}}}% +\\else\\def\\ledx@@s{}\\def\\ledx@@d{}\\fi +\\def\\ledx@@msub{\\ifx\\ledx@fs\\@empty,\\space\\else\\subsubitem\\ledx@@d\\color{gray}\\footnotesize\\fi}% +\\def\\ledx@lb@encap#1{\\gdef\\ledx@cpb{}\\sbox\\z@{#1}\\ifx\\ledx@@u\\ledx@cpb\\else\\textsuperscript{(#1)\\kern-.1em}\\fi} +" +postamble "\n\n\\end{theindex}\n" +group_skip "%\n\\indexspace\n" +numhead_positive "\\small Numbers" +numhead_negative "\\small Numbers" +symhead_positive "\\small Symbole" +symhead_negative "\\small Symbole" +delim_0 "\\thinspace\\dotfill\\thinspace {" +delim_1 "\:~~{" +delim_2 "\\ledx@lb@encap{\\relax " +item_0 "\n\n \\item\\ledx@@s\\color{black}\\idxfsize " +item_01 "\n \\subitem\\ledx@@s\\color{black}\\small " +item_x1 "\n \\subitem\\ledx@@sl\\color{black}\\small " +item_1 "\n \\subitem\\ledx@@sl\\color{black}\\small " +item_12 "\n \\subsubitem\\ledx@@d\\color{gray}\\footnotesize " +item_x2 "\n \\subsubitem\\ledx@@d\\color{gray}\\footnotesize " +item_2 "\\ledx@@msub " +encap_prefix "\\" +encap_infix "{" +encap_suffix "}" +quote '#' +actual '?' +delim_t "}\\relax " +delim_n ", " +indent_space "\t\t" +indent_length 16
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-christmas.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-christmas.lib.tex new file mode 100644 index 00000000000..b0a598a5e00 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-christmas.lib.tex @@ -0,0 +1,42 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{santahat}{% + santa hat/.code = \pingu@set@extra{santahat}{true}\pingu@color{santahat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none}, + santa hat/.default = pingu@red!87!pingu@black, + santa hat second/.code = \pingu@color{santahat@second}{#1}, + santa hat bobble/.code = \pingu@color{santahat@bobble}{#1} +}{santa hat second={pingu@white!97!\pingu@color@santahat},santa hat bobble={\pingu@color@santahat@second}} +\def\pingu@draw@ea@santahat{% +\path (\pingu@name-head-center)+(152:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-right); +\path (\pingu@name-head-center)+(5:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-left); +\pingu@layer{middle}[] +\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) +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; +\endpingu@layer +\pingu@layer{background}[] +\pingu@block{\pingu@color@santahat} (\pingu@name-santa-ur) arc(145:-25:11.85mm and 14.915mm) + 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; +\pingu@block{\pingu@color@santahat@bobble} (\pingu@name-santa-lc) circle[radius=2.625mm]; +\endpingu@layer +} +\pingu@create@extra{santabeard}{% + santa beard/.code = \pingu@set@extra{santabeard}{true}\pingu@color{santabeard}{#1}, + santa beard/.default = pingu@white!96!pingu@red!98!pingu@black!92!gray, + santa beard string/.code = \pingu@color{santabeard@string}{#1} +}{santa beard string=\pingu@color@body@main!85!pingu@black} +\def\pingu@draw@ea@santabeard{% +% \coordinate (\pingu@name-santa-beard-center) at ([yshift=1.25mm]\pingu@name-belly-center); +\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)}}] +([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; +\ifx\pingu@color@santabeard\@pingu@none\else% to allow for random +\xdef\@pmaxY{18}\xdef\@pmaxYI{17}% +\foreach[evaluate=\j as \maxj using int(\@pmaxY-\j),evaluate=\j as \widthred using \j/23pt] \j in {0,...,\@pmaxYI} { +\foreach[remember=\i as \li (initially 0)] \i in {1,...,\maxj} { + \pgfmathsetmacro\@ptmp{94+rand*2.6} + \pingu@block{\pingu@color@santabeard!\@ptmp!pingu@black} (\pingu@name-santa-beard-\i) circle [radius=1.85pt-\widthred pt+rand*.35pt]; + \ifnum\li>0 % make middle of last + \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 + \fi +}}\fi +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-cloak.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-cloak.lib.tex new file mode 100644 index 00000000000..cef863291e2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-cloak.lib.tex @@ -0,0 +1,78 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\newif\if@pingu@x@cloak@wings +\pingu@create@extra{cloak}{% + cloak/.code = \pingu@set@extra{cloak}{true}\pingu@color{cloak}{#1}, + cloak/.default = pingu@bronze, + cloak cap/.code = \pingu@color{cloak@cap}{#1}, + cloak wings color/.code = \pingu@color{cloak@wings}{#1}, + cloak bottom color/.code = \pingu@color{cloak@bottom}{#1}, + cloak front color/.code = \pingu@color{cloak@front}{#1}, + cloak padding/.code = \def\pingu@x@cloak@padding{#1}, + cloak wings/.is if = @pingu@x@cloak@wings, + 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}, + cape/.default = pingu@bronze, +}{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} +\def\pingu@draw@cloth@cloak@behind{% + \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; +} + +\def\pingu@draw@cloth@cloak@middle{\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front} +(\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] +([xshift=1.3mm,yshift=.4mm]\pingu@name-wings-side-right) to[bend right=3] ([yshift=.65mm]\pingu@name-wings-side-right); +\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front} +(\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] +([xshift=-1.3mm,yshift=.4mm]\pingu@name-wings-side-left) to[bend left=3] ([yshift=.65mm]\pingu@name-wings-side-left);} + +% TODO: if flags to draw parts +\def\pingu@draw@cloth@cloak{% +\scope[rounded corners=.6\p@] + % wings + \if@pingu@x@cloak@wings + \edef\@la{\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname} + \ifnum\@la>0 % wing is going inverted up or down / \ => left + \pingu@layer{foreground}[] + \ifnum\@la>70 + \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); + \else % down + \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); + \fi + \endpingu@layer + \else + \ifnum\@la<-90% normal up \ / => left side + \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; + \else % normal and hugging down => right + \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)}; + \fi + \fi + \edef\@ra{\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname} + \ifnum\@ra>0 % wing is going inverted up or down => right + \pingu@layer{foreground}[] + \ifnum\@ra>70 + \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; + \else + \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); + \fi + \endpingu@layer + \else + \ifnum\@ra<-90% normal up => right side + \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; + \else % normal and hugging down => left + \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)}; + \fi + \fi +\fi + % cape + \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] + (\pingu@name-head) + to[bend right=3] + ([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) + to[bend left=8] + ([xshift=-.66mm]\pingu@name-wings-side-right) + [rounded corners=.15mm] + to[bend left=32] ++(\pingu@w@half+.66mm,\pingu@w@half+1.2\pingu@one) + to[bend left=32] ++(\pingu@w@half+.66mm,-\pingu@w@half-1.2\pingu@one) + to[bend left=8] cycle; +\endscope +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-devil.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-devil.lib.tex new file mode 100644 index 00000000000..58433a912f8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-devil.lib.tex @@ -0,0 +1,90 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{devilhorns}{% + devilhorns/.forward to = /pingu/devil horns, + devil-horns/.forward to = /pingu/devil horns, + devil horns/.code = \pingu@set@extra{devilhorns}{true}\pingu@color{devilhorns}{#1}, + devil horns/.default = pingu@purple, + devil horns b/.code = \pingu@color{devilhorns@b}{#1}, + devilhorns b/.forward to = /pingu/devil horns b, + devil-horns b/.forward to = /pingu/devil horns b +}{devil horns b=\pingu@color@devilhorns} + +\pgfmathsetmacro\pingu@devilhorns@baseang@l{90-360*(1-\pinguanglehl)} +\pgfmathsetmacro\pingu@devilhorns@baseang@r{90-360*(1-\pinguanglehr)} +\def\pingu@devilhorns@baseoff{12} +\def\pingu@devilhorns@yshift{.65mm} +\def\pingu@draw@ea@devilhorns{% + % 90 - 360*.06 + \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; + \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; + \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; + \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; +} + +% wip hack +\colorlet{pingu@devil@ring}{pingu@black} +\def\pingu@devil@x@opacity{.75} +\@pingu@eyes@s{devil}{% +\pingu@layer{foreground}[] + \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]; + \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]; + \fill[\pingu@color@eye@left,/pingu/@glow] (\pingu@name-eye-left) circle [radius=1.325mm]; + \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; + \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; + \fill[\pingu@color@eye@left!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-left) circle [radius=.5pt]; % + \pingu@block{pingu@white} (\pingu@name-eye-left) circle [radius=.15pt]; +\endpingu@layer +}{% +\pingu@layer{foreground}[] + \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]; + \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]; + \fill[\pingu@color@eye@right,/pingu/@glow] (\pingu@name-eye-right) circle [radius=1.325mm]; + \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; + \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; + \fill[\pingu@color@eye@right!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-right) circle [radius=.5pt]; % + \pingu@block{pingu@white} (\pingu@name-eye-right) circle [radius=.15pt]; +\endpingu@layer +}[pingu@purple] + +\pingu@create@wing@extra{devilfork}{% + devil fork \@lr/.code = {\pingu@set@extra{devilfork\@lr}{true}\pingu@color{devilfork\@lr}{##1}}, + devil fork \@lr/.default = pingu@red, + devil fork \@lr\space second/.code= \pingu@color{devilfork\@lr @second}{##1}, + devil fork \@lr\space length/.code =\expandafter\def\csname pingu@devilfork@\@lr @length\endcsname{##1} +}{devil fork \@lr\space length=20mm,devil fork \@lr\space second=pingu@bronze!10!black} +\def\pingu@draw@wi@devilfork#1{% + \pingu@setup@wing{devilfork}{#1}% +\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] + \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; + \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; +\endscope +} + +\pingu@create@extra{devilwings}{% + devilwings/.forward to = /pingu/devil wings, + devil-wings/.forward to = /pingu/devil wings, + devil wings/.code = \pingu@set@extra{devilwings}{true}\pingu@color{devilwings}{#1}, + devil wings/.default = pingu@black, + devil wings b/.code = \pingu@color{devilwings@b}{#1}, + devilwings b/.forward to = /pingu/devil wings b, + devil-wings b/.forward to = /pingu/devil wings b +}{devil wings b=\pingu@color@devilwings} + +% taken over and adapted from the old penguins +% lower wing based on https://tex.stackexchange.com/a/464828 +\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)} + +\def\pingu@draw@eb@devilwings{% +\pgfonlayer{background} + \scope[scale=0.225,shift={(\pingu@name-head-back-con-right)}] + \pingu@block[thick,rounded corners=.75mm]{\pingu@color@devilwings} \@pingu@devilwings@lower@wing@code; + \pingu@block[thick]{\pingu@color@devilwings} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1); + \endscope + \scope[scale=0.225,shift={(\pingu@name-head-back-con-left)},xscale=-1] + \pingu@block[thick,rounded corners=0.75mm]{\pingu@color@devilwings@b} \@pingu@devilwings@lower@wing@code; + \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); + \endscope +\endpgfonlayer +} diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-emotions.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-emotions.lib.tex new file mode 100644 index 00000000000..a5226d02cc9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-emotions.lib.tex @@ -0,0 +1,48 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\@pingu@eyes@s{sad}{% + \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); + \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; +}{% + \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); + \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; +} + +\@pingu@eyes@s{angry}{% + \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); + \pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left) ellipse [x radius=.1225cm, y radius=.1275cm]; + \pingu@block{\pingu@color@body@front} (\pingu@name-eye-left) ++(120:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm]; +}{% + \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); + \pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right) ellipse [x radius=.1225cm, y radius=.1275cm]; + \pingu@block{\pingu@color@body@front} (\pingu@name-eye-right) ++(60:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm]; +} + +\@pingu@bill@s{angry}{% +\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) + to[out=-90,in=170] ++(1.9mm,-2.25mm) coordinate (\pingu@name-bill-bottom) + to[out=10,in=-90] ++(1.9mm,2.25mm) + to[bend right=.25cm] cycle; +} + +\pingu@create@extra{blush}{% + blush/.code = \pingu@set@extra{blush}{true}\pingu@color{blush}{#1}, + blush/.default = pingu@red, + blush second/.code = \pingu@color{blush@second}{#1}, + blush opacity/.code = \def\pingu@x@blush@opacity{#1}, +}{blush opacity=.2525,blush second=\pingu@color@blush} +\def\pingu@draw@eb@blush{% + \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]; + \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]; +} + +\@pingu@eyes@s{hearts}{% + \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left); + \pingu@block[rounded corners=0pt]{\pingu@color@eye@left} ([yshift=.3mm]\pingu@name-eye-left) arc(0:180:.065cm) + to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle; +}{% + \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right); + \pingu@block{\pingu@color@eye@right} ([yshift=.3mm]\pingu@name-eye-right) arc(0:180:.065cm) + to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle; +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-flags.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-flags.lib.tex new file mode 100644 index 00000000000..3e1955bb1ad --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-flags.lib.tex @@ -0,0 +1,45 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@wing@extra{flag}{% + flag \@lr/.code = {\pingu@set@extra{flag\@lr}{true}\pingu@color{flag\@lr}{##1}}, + flag \@lr/.default = pingu@purple, + flag \@lr\space pole/.code = \pingu@color{flag\@lr @pole}{##1}, + flag \@lr\space code/.code = \expandafter\def\csname pingu@flag@\@lr @code\endcsname{##1}, + flag \@lr\space bobble/.code = {\pingu@color{flag\@lr @bobble}{##1}}, + pride flag \@lr/.style = {% + /pingu/flag \@lr\space code = {% + \noexpand\node[/pingu/@flag@first,/pingu/@flag={{rgb:yellow,1;red,5;magenta,2;black,1}}{1.9mm}] (a) at (0,0) {}; + \noexpand\node[below,/pingu/@flag={{rgb:yellow,5;red,5;green,1;white,1}}{1.9mm}] (b) at (a.south) {}; + \noexpand\node[below,/pingu/@flag={yellow}{1.9mm}] (c) at (b.south) {}; + \noexpand\node[below,/pingu/@flag={{rgb:blue,1;cyan,1;green,4;black,2}}{1.9mm}] (d) at (c.south) {}; + \noexpand\node[below,/pingu/@flag={{rgb:magenta,3;blue,5;cyan,4;black,3}}{1.9mm}] (e) at (d.south) {}; + \noexpand\node[below,/pingu/@flag={{rgb:red,2;magenta,2;blue,5}}{1.9mm}] (f) at (e.south) {}; + }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}% + },% + @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}, + pride flag \@lr/.default = pingu@bronze,% + german flag \@lr/.style = {% + /pingu/flag \@lr\space code = {% + \noexpand\node[/pingu/@flag@first,/pingu/@flag={black}{3.33mm}] (a) at (0,0) {}; + \noexpand\node[below,/pingu/@flag={red}{3.33mm}] (b) at (a.south) {}; + \noexpand\node[below,/pingu/@flag={yellow}{3.33mm}] (c) at (b.south) {}; + }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}% + },% + german flag \@lr/.default = pingu@bronze% +}{flag \@lr\space bobble=pingu@bronze, flag \@lr\space pole=pingu@bronze, flag \@lr\space code = {% + \noexpand\node[/pingu/@flag@first,/pingu/@flag={\noexpand\@col}{9.75mm}] (a) at (0,0) {}; +}} +\def\pingu@draw@wi@flag#1{% + \pingu@setup@wing{flag}{#1}% +\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] + % NOTE: not full foreground if placed under the wing + \pingu@layer{foreground}[shift={(\pingu@name-wing-#1)},shift={(\@sidesign*.15mm,17.5mm-3.5\p@)}] + \if@pingu@wing@item@side@left@\pgfqkeys{/pingu}{@flag@first/.style={below right}}\else\pgfqkeys{/pingu}{@flag@first/.style={below left}}\fi + \csname pingu@flag@#1@code\endcsname + \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; + \endpingu@layer + \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; + \pingu@block{\csname pingu@color@flag#1@bobble\endcsname} (\pingu@name-wing-#1)++(\@sidesign*.15mm,17.5mm) circle [radius=2.15\p@]; +\endscope +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-formal.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-formal.lib.tex new file mode 100644 index 00000000000..1debb78f9c4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-formal.lib.tex @@ -0,0 +1,100 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{tie}{% + tie/.code = \pingu@set@extra{tie}{true}\pingu@color{tie}{#1}, + tie/.default = pingu@green, + tie knot/.code = \pingu@color{tie@knot}{#1}, + tie length/.code = \def\pingu@x@tie@length{#1}, + tie offset/.code = \def\pingu@x@tie@offset{#1}, + tie width/.code = \def\pingu@x@tie@width{#1}, + tie pattern/.code = \def\pingu@x@tie@pattern{#1}, + tie dots/.style = {% + tie pattern={% + \pingu@block[postaction={pattern={Dots[angle=40,distance=1.5pt,radius=.35pt]},pattern color=#1}]{\pingu@color@tie} \pingupathxtie; + \pingu@block[postaction={pattern={Dots[angle=-30,distance=1.45pt,radius=.35pt@]},pattern color=#1}]{\pingu@color@tie@knot} \pingupathxtieknot; + }% + }, + tie dots/.default={pingu@white}% +}{% defaults + tie length=.625\pingu@side@h@half, tie offset=.399cm,% + tie knot=\pingu@color@tie!92!black, tie width=.21cm,% + tie pattern={% + \pingu@block{\pingu@color@tie} \pingupathxtie; + \pingu@block{\pingu@color@tie@knot} \pingupathxtieknot; + }% +} +\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@tie@length-.125cm) -- cycle} +\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} +\def\pingu@draw@eb@tie{% + \path (\pingu@name-bill)++(0,-\pingu@x@tie@offset) coordinate(\pingu@name-tie-start); + \pingu@x@tie@pattern +} + +\pingu@create@extra{bowtie}{% + bowtie/.forward to = /pingu/bow tie, + bow-tie/.forward to = /pingu/bow tie, + bow tie/.code = \pingu@set@extra{bowtie}{true}\pingu@color{bowtie}{#1}, + bow tie/.default = pingu@blue, + bow tie b/.code = \pingu@color{bowtie@b}{#1}, + bowtie b/.forward to = /pingu/bow tie b, + bow-tie b/.forward to = /pingu/bow tie b, + bowtie offset/.forward to = /pingu/bow tie offset, + bow-tie offset/.forward to = /pingu/bow tie offset, + bow tie offset/.code = \def\pingu@x@bowtie@offset{#1}, + bowtie knot/.forward to = /pingu/bow tie knot, + bow-tie knot/.forward to = /pingu/bow tie knot, + bow tie knot/.code = \pingu@color{bowtie@knot}{#1}, +}{% defaults + bow tie knot=\pingu@color@bowtie!92!black,bow tie offset=.315cm,% + bow tie b=\pingu@color@bowtie% +} + +\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} +\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} +\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} +\def\pingu@draw@eb@bowtie{% + \path (\pingu@name-bill)++(0,-\pingu@x@bowtie@offset) coordinate(\pingu@name-bow-tie-start); + \pingu@block{\pingu@color@bowtie} \pingupathxbowtieleft; + \pingu@block{\pingu@color@bowtie@b} \pingupathxbowtieright; + \pingu@block{\pingu@color@bowtie@knot} \pingupathxbowtieknot; +} + +\newif\if@pingu@x@pants@bands +\pingu@create@extra{pants}{% + pants/.code = \pingu@set@extra{pants}{true}\pingu@color{pants}{#1}, + pants/.default = pingu@red, + pants bands/.is if = @pingu@x@pants@bands, + pants button left/.code = \pingu@color{pants@button@left}{#1}, + pants button right/.code = \pingu@color{pants@button@right}{#1}, + pants buttons/.style = {/pingu/pants button left={#1}, /pingu/pants button right={#1}}, + pants button left shade/.code = \pingu@color{pants@button@left@shade}{#1}, + pants button right shade/.code = \pingu@color{pants@button@right@shade}{#1}, + pants buttons shade/.style = {/pingu/pants button left shade={#1}, /pingu/pants button right shade={#1}}, + pants without buttons/.forward to=/pingu/pants no buttons, + pants no buttons/.style = {/pingu/pants buttons=\@pingu@none, /pingu/pants buttons shade=\@pingu@none}, + pants extra height/.code = \def\pingu@x@pants@extra@height{#1}, +}{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} + +\def\pingu@draw@eb@pants{% +\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; +\if@pingu@x@pants@bands +\pingu@layer{middle}[] +% draw stripes +\scope +\clip \pingu@path@lowerpingu; +\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; +\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; +\endscope +\fi +\pingu@block{\pingu@color@pants@button@right}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm]; +\pingu@block{\pingu@color@pants@button@left}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm]; +\pingu@block[even odd rule]{\pingu@color@pants@button@right@shade}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm]; +\pingu@block[even odd rule]{\pingu@color@pants@button@left@shade}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm]; +\@for\i:={0,90,180,270}\do{ + \pingu@block{\pingu@color@pants@button@right@shade} (@tmp)++(.25mm,-.25mm)++(\i:. + 35mm) circle[radius=.1mm]; + \pingu@block{\pingu@color@pants@button@left@shade} (@tmpb)++(-.25mm,-.25mm)++(\i:.35mm) circle[radius=.1mm]; +}% +\if@pingu@x@pants@bands \endpingu@layer \fi +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-fun.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-fun.lib.tex new file mode 100644 index 00000000000..5dcef06f75e --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-fun.lib.tex @@ -0,0 +1,121 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{cakehat}{% + cake-hat/.code = \pingu@set@extra{cakehat}{true}\pingu@color{cakehat}{#1}, + cake-hat/.default = pingu@white!92!\pingu@color@cakehat@top, + cake-hat top/.code = \pingu@color{cakehat@top}{#1}, + cake-hat shade/.code = \pingu@color{cakehat@shade}{#1}, + cake-hat candle/.code = \pingu@color{cakehat@candle}{#1}, + cake-hat candle fire/.code = \pingu@color{cakehat@candle@fire}{#1}, + cake-hat candle fire 2/.code = \pingu@color{cakehat@candle@fire@b}{#1}, + cake-hat candle fire 3/.code = \pingu@color{cakehat@candle@fire@c}{#1}, + cake-hat candle wick/.code = \pingu@color{cakehat@candle@wick}{#1}, + cake-hat candle shade/.code = \pingu@color{cakehat@candle@shade}{#1}, + cake-hat candle back/.code = \pingu@color{cakehat@candle@back}{#1}, + cake-hat outline/.code = \pingu@color{cakehat@outline}{#1}, + cake-hat outline width/.code = \def\pingu@x@cakehat@outline@w{#1}, + 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}} +}{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} + +\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} +\def\pingu@draw@ea@cakehat{% +\scope[rotate around={\pingu@x@cakehat@angle:(\pingu@name-head-top)},% +shift={(\pingu@name-head-top)}, +shift={(\pingu@x@cakehat@xshift,\pingu@x@cakehat@yshift)}, +scale=\pingu@x@cakehat@scale] + \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] + ++(1.375cm,0) to[bend left=2] coordinate[pos=.03] (\pingu@name-cake-tr) ++(0,-3.125mm) to[bend left=20] (-6mm,-.26cm) -- cycle; + \pingu@block[fill opacity=.1]{\pingu@color@cakehat@shade} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend right=20] + ++(1.375cm,0) to[bend right=2] ++(0,3.125mm) [sharp corners] to[bend left=20] (-6.25mm,-.225cm) [rounded corners=.2mm] -- cycle; + \path (\pingu@name-cake-tl) -- (\pingu@name-cake-tr) coordinate[pos=.5] (\pingu@name-cake-tc); + % cake side + \scope + \clip\pingu@p@cake@outline; + \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)}; + \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-1) ellipse [x radius=.255mm,y radius=2mm]; + \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-9) ellipse [x radius=.265mm,y radius=1.45mm]; + \foreach \i in {2,...,9} { + \pgfmathsetmacro\@tmprand{rand} + \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); + \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; + } + \foreach \i in {2,...,9} { + \ifnum\i=2\relax + \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); + \else\ifnum\i=9\relax + \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); + \else + \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); + \fi\fi + } + \endscope + \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-tc) ellipse [x radius=1.375cm/2+.01mm, y radius=1.41mm]; + % outline + \pingu@draw[line width=\pingu@x@cakehat@outline@w,rounded corners=.075mm]{\pingu@color@cakehat@outline} \pingu@p@cake@outline; +% % 3d sides +% \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; +% \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; + % candle + \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; + % wick + \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); + \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; + \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; + \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; + % front + \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; + \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; + \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; + \pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(1.35mm,-1.25mm) circle [radius=.1mm]; +\endscope +} +\pingu@create@extra{pumpkinhat}{% + pumpkin-hat/.code = \pingu@set@extra{pumpkinhat}{true}\pingu@color{pumpkinhat}{#1}, + pumpkin-hat/.default = pingu@bronze!97!white, + pumpkin-hat stalk/.code = \pingu@color{pumpkinhat@stalk}{#1}, + pumpkin-hat stalk top/.code = \pingu@color{pumpkinhat@stalk@top}{#1}, + pumpkin-hat stripe a/.code = \pingu@color{pumpkinhat@stripe@a}{#1}, + pumpkin-hat stripe b/.code = \pingu@color{pumpkinhat@stripe@b}{#1}, + pumpkin-hat stripe c/.code = \pingu@color{pumpkinhat@stripe@c}{#1}, + pumpkin-hat outline/.code = \pingu@color{pumpkinhat@outline}{#1}, + pumpkin-hat outline width/.code = \def\pingu@x@pumpkinhat@outline@w{#1}, + % TODO: jack o lantern? + 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}} +}{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=1pt} + +\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;} +\def\pingu@draw@ea@pumpkinhat{% +\scope[rotate around={\pingu@x@pumpkinhat@angle:(\pingu@name-head-top)},% +shift={(\pingu@name-head-top)}, +shift={(\pingu@x@pumpkinhat@xshift,\pingu@x@pumpkinhat@yshift)}, +scale=\pingu@x@pumpkinhat@scale] + % give it a small cut + \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; + \pingu@block{\pingu@color@pumpkinhat@stalk} (@pkl) to[bend left=3] (@pkr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle; + \pingu@block{\pingu@color@pumpkinhat@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm]; +\scope +\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; + \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@a} (@pklr) to[bend left=55] (@pkr); + \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@c} (@pkll) to[bend right=55] (@pkl); + \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@b} (@pklc) to[bend right=5] (@pkuc); +\endscope +\pingu@draw[line join=round,line width=\pingu@x@pumpkinhat@outline@w]{\pingu@color@pumpkinhat@outline} \pingu@pumpkinhat@outerpath; +\endscope +} + +\pingu@create@wing@extra{lollipop}{% + lollipop \@lr/.code = {\pingu@set@extra{lollipop\@lr}{true}\pingu@color{lollipop\@lr}{##1}}, + lollipop \@lr/.default = pingu@green, + lollipop \@lr\space handle/.code = \pingu@color{lollipop\@lr @handle}{##1},% + lollipop \@lr\space second/.code = \pingu@color{lollipop\@lr @second}{##1}% +}{lollipop \@lr\space handle=pingu@bronze,lollipop \@lr\space second={\csname pingu@color@lollipop\@lr\endcsname!86!white}} + +% #1 wing +\def\pingu@draw@wi@lollipop#1{% + \pingu@setup@wing{lollipop}{#1}% + \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); + \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]; + \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@]; + \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@]; +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-glasses.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-glasses.lib.tex new file mode 100644 index 00000000000..609adcb71dc --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-glasses.lib.tex @@ -0,0 +1,105 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{glasses}{% + glasses/.code = \pingu@set@extra{glasses}{true}\pingu@color{glasses}{#1}, + glasses/.default = pingu@black, + glasses left fill/.code = \pingu@color{glasses@fill@l}{#1}, + glasses right fill/.code = \pingu@color{glasses@fill@r}{#1}, + glasses left opacity/.code = \def\pingu@x@glasses@op@l{#1}, + glasses right opacity/.code = \def\pingu@x@glasses@op@r{#1}, + glasses fill/.style = {/pingu/glasses left fill=#1, /pingu/glasses right fill=#1}, + glasses opacity/.style = {/pingu/glasses left opacity=#1, /pingu/glasses right opacity=#1}, + glasses line width/.code = \def\pingu@x@glasses@lw{#1}, + sunglasses/.forward to = /pingu/sun glasses, + glasses bend left/.code = \def\pingu@x@glasses@bend@l{#1}, + glasses bend right/.code = \def\pingu@x@glasses@bend@r{#1}, + glasses bend/.style = {/pingu/glasses bend left=#1,/pingu/glasses bend right=#1}, + sun glasses/.style = {/pingu/glasses, /pingu/glasses fill=#1}, + sun glasses/.default = pingu@black, +}{glasses line width=1.125\p@,glasses fill=\@pingu@none,glasses opacity=.825,glasses bend left=32.5,glasses bend right=32.5} + +\def\pingu@draw@ea@glasses{% fact: 1.33; modified first shift and ht + \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; + \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; + \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; + \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; + \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); + \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); + \scope + \clip[use path=\pingu@upperpingu]; + \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} + (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) -- ++(-5mm,.5mm); + \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} + (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) -- ++(5mm,.5mm); + \endscope +} +\pingu@create@extra{glassesround}{% + glasses round/.code = \pingu@set@extra{glassesround}{true}\pingu@color{glassesround}{#1}, + glasses round/.default = pingu@black, + glasses round left fill/.code = \pingu@color{glassesround@fill@l}{#1}, + glasses round right fill/.code = \pingu@color{glassesround@fill@r}{#1}, + glasses round fill/.style = {/pingu/glasses round left fill=#1, /pingu/glasses round right fill=#1}, + glasses round left opacity/.code = \def\pingu@x@glassesround@op@l{#1}, + glasses round right opacity/.code = \def\pingu@x@glassesround@op@r{#1}, + glasses round opacity/.style = {/pingu/glasses round left opacity=#1, /pingu/glasses round right opacity=#1}, + glasses round left radius/.code = \def\pingu@x@glassesround@r@l{#1}, + glasses round right radius/.code = \def\pingu@x@glassesround@r@r{#1}, + glasses round radius/.style = {/pingu/glasses round left radius=#1, /pingu/glasses round right radius=#1}, + glasses round line width/.code = \def\pingu@x@glassesround@lw{#1}, + sunglasses round/.forward to = /pingu/sun glasses round, + sun glasses round/.style = {/pingu/glasses round, /pingu/glasses round fill=#1}, + sun glasses round/.default = pingu@black, + % todo: width/radius allow for different +}{glasses round line width=.75\p@,glasses round fill=\@pingu@none,glasses round opacity=.825,glasses round radius=3.15mm} +\def\pingu@draw@ea@glassesround{% fact: 1.33; modified first shift and ht + \pingu@block[opacity=\pingu@x@glassesround@op@l]{\pingu@color@glassesround@fill@l} (\pingu@name-eye-left) circle [radius=\pingu@x@glassesround@r@l]; + \pingu@block[opacity=\pingu@x@glassesround@op@r]{\pingu@color@glassesround@fill@r} (\pingu@name-eye-right) circle [radius=\pingu@x@glassesround@r@r]; + \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); + \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); + \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); + \scope + \clip[use path=\pingu@upperpingu]; + \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} + (\pingu@name-glassesround-right-mid) arc(30:150:\pingu@x@glassesround@r@l) -- ++(-5mm,.65mm); + \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} + (\pingu@name-glassesround-left-mid) arc(150:30:\pingu@x@glassesround@r@r) -- ++(5mm,.65mm); + \endscope +} +\pingu@create@extra{monocleleft}{% + monocle left/.code = \pingu@set@extra{monocleleft}{true}\pingu@color{monocleleft}{#1}, + monocle left/.default = pingu@black, + monocle left glass/.code = \pingu@color{monocleleft@glass}{#1}, + monocle left fill/.forward to = /pingu/monocle left glass, + monocle left opacity/.code = \def\pingu@x@monocleleft@opacity{#1}, + monocle left fill opacity/.forward to = /pingu/monocle left opacity, + monocle left string/.code = \pingu@color{monocleleft@string}{#1}, + monocle left string length/.code= \def\pingu@x@monocleleft@string@l{#1}, + monocle left blob/.code = \pingu@color{monocleleft@blob}{#1}, +}{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} + +\def\pingu@draw@eb@monocle@l{% + \pingu@block[/pingu/glow,opacity=\pingu@x@monocleleft@opacity]{\pingu@color@monocleleft@glass} (\pingu@name-eye-left) circle[radius=2mm]; + \pingu@draw[thin]{\pingu@color@monocleleft@string} (\pingu@name-eye-left)++(2mm,0) + to[out=-75,in=100] ++(0,-\pingu@x@monocleleft@string@l); + \pingu@block{\pingu@color@monocleleft@blob} (\pingu@name-eye-left)++(2mm,-\pingu@x@monocleleft@string@l) circle [radius=.65\p@]; + \pingu@draw[semithick]{\pingu@color@monocleleft} (\pingu@name-eye-left) circle[radius=2mm]; +} +\pingu@create@extra{monocleright}{% + monocle right/.code = \pingu@set@extra{monocleright}{true}\pingu@color{monocleright}{#1}, + monocle right/.default = pingu@black, + monocle right glass/.code = \pingu@color{monocleright@glass}{#1}, + monocle right fill/.forward to = /pingu/monocle right glass, + monocle right opacity/.code = \def\pingu@x@monocleright@opacity{#1}, + monocle right fill opacity/.forward to = /pingu/monocle right opacity, + monocle right string/.code = \pingu@color{monocleright@string}{#1}, + monocle right string length/.code= \def\pingu@x@monocleright@string@r{#1}, + monocle right blob/.code = \pingu@color{monocleright@blob}{#1}, +}{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} +\def\pingu@draw@eb@monocle@r{% + \pingu@block[/pingu/glow,opacity=\pingu@x@monocleright@opacity]{\pingu@color@monocleright@glass} (\pingu@name-eye-right) circle[radius=2mm]; + \pingu@draw[thin]{\pingu@color@monocleright@string} (\pingu@name-eye-right)++(-2mm,0) + to[out=-105,in=80] ++(0,-\pingu@x@monocleright@string@r); + \pingu@block{\pingu@color@monocleright@blob} (\pingu@name-eye-right)++(-2mm,-\pingu@x@monocleright@string@r) circle [radius=.65\p@]; + \pingu@draw[semithick]{\pingu@color@monocleright} (\pingu@name-eye-right) circle[radius=2mm]; +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-hats.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-hats.lib.tex new file mode 100644 index 00000000000..4e31000e8fe --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-hats.lib.tex @@ -0,0 +1,115 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{strawhat}{% + % extra strawhat (tikzducks basis) + straw hat/.forward to = /pingu/strawhat, + strawhat/.default = brown!50!white, + strawhat/.code = \pingu@set@extra{strawhat}{true}\pingu@color{strawhat}{#1}, + straw hat ribbon/.forward to = /pingu/strawhat ribbon, + strawhat ribbon/.code = \pingu@color{strawhat@ribbon}{#1}, + straw hat position/.forward to= /pingu/strawhat position, + 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}}, +}{strawhat ribbon= gray!85!black,strawhat position={-26.5:(-.185cm,.14cm){1.375}}} + +\def\pingu@draw@ea@strawhat{% +\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] +\pingu@block{\pingu@color@strawhat} (.34cm,0) ellipse[x radius=.75cm, y radius=\pingu@one]; +\pingu@block{\pingu@color@strawhat} (0,.5mm) rectangle (.68cm,5mm); +\pingu@block{\pingu@color@strawhat} (.34cm,5mm) ellipse[x radius=.34cm, y radius=.8mm]; +\pingu@block{\pingu@color@strawhat} (-.3955cm,.2mm) -- (1.0755cm,.2mm) -- (.68cm,2mm) -- (0,2mm) -- cycle; +\pingu@block{\pingu@color@strawhat@ribbon} (.34cm,2mm) ellipse[x radius=.34cm, y radius=.8mm]; +\pingu@block{\pingu@color@strawhat@ribbon} (0,2mm) rectangle (.68cm,3mm); +\pingu@block{\pingu@color@strawhat} (.34cm,3mm) ellipse[x radius=.34cm, y radius=.8mm]; +\endscope} + +\pingu@create@extra{hat}{% + hat/.default = pingu@black!90!black, + hat/.code = \pingu@set@extra{hat}{true}\pingu@color{hat}{#1}, + hat base/.code = \pingu@color{hat@base}{#1}, + hat coronal/.code = \pingu@color{hat@coronal}{#1}, + hat ribbon/.code = \pingu@color{hat@ribbon}{#1}, + 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}}, +}{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} + +\newdimen\pingu@hat@w@half \pingu@hat@w@half=.925cm +\newdimen\pingu@hat@h \pingu@hat@h=.625cm +\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} +\def\pingu@draw@ea@hat{% +\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] +\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; +\pingu@block{\pingu@color@hat} \pingupathhatupper; +\scope +\clip\pingupathhatupper; +\pingu@block{\pingu@color@hat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm]; +\pingu@block{\pingu@color@hat} (\z@,.134cm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm]; +\endscope\endscope} + +\pingu@create@extra{cap}{% + cap/.default = pingu@bronze, + cap/.code = \pingu@set@extra{cap}{true}\pingu@color{cap}{#1}, + cap padding/.code = {\def\pingu@x@cap@padding{#1}}, + cap extra height/.code = {\def\pingu@x@cap@height{#1}}, +}{cap padding=.8mm, cap extra height=0pt} + +\def\pingu@draw@ea@cap{% +\pingu@layer{foreground}[] +\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] +([yshift=\pingu@x@cap@height]\pingu@name-head) +to[bend right=3] +([xshift=\pingu@x@cap@padding]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=4] ([xshift=-.25mm]\pingu@name-wing-right-start) +to[bend left=8] +([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-right) +[rounded corners=.15mm] +to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,\pingu@w@half+\pingu@one) +to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,-\pingu@w@half-\pingu@one) +to[bend left=8] cycle; +\endpingu@layer +} + +\pingu@create@extra{constructionhelmet}{% + construction helmet/.default = pingu@yellow, + construction helmet/.code = \pingu@set@extra{constructionhelmet}{true}\pingu@color{constructionhelmet}{#1}, + construction helmet padding/.code = {\def\pingu@x@constructionhelmet@padding{#1}}, + construction helmet extra height/.code = {\def\pingu@x@constructionhelmet@height{#1}}, + 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}}, +}{construction helmet padding=.325cm, construction helmet extra height=0pt,construction helmet position={-.5:(.05mm,-1.25mm)1}} + +\newdimen\pingu@constructionhelmet@w@half \pingu@constructionhelmet@w@half=.85cm +\def\pingu@draw@ea@constructionhelmet{% +\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] +\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; +\scope +\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; +\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; +\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; +\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; +\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; +\endscope +% get the 3d wobbles +\pingu@block[rounded corners=.03mm]{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm+.675cm-.25mm) -- ++(0,.3mm) -| ++(1.5mm,-.3mm) -- cycle; +\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@a) to[bend right=14] (@aa); +\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@bb) to[bend right=14] (@b); +\endscope +} + +\pingu@create@extra{conicalhat}{% + conical hat/.default = pingu@bronze, + conical hat/.code = \pingu@set@extra{conicalhat}{true}\pingu@color{conicalhat}{#1}, + conical hat rounding/.code = {\def\pingu@x@conicalhat@rounding{#1}}, + conical hat shade/.code = {\def\pingu@x@conicalhat@shade{#1}}, + conical hat height/.code = {\def\pingu@x@conicalhat@height{#1}}, + conical hat width/.code = {\def\pingu@x@conicalhat@width{#1}}, + 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}}, +}{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} + +\def\pingu@draw@ea@conicalhat{% +\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] + +\pingu@layer{background}[] +\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@conicalhat@height-.025cm) to[bend right=5] ([xshift=-.15mm,yshift=.3mm]@) -- cycle; +\endpingu@layer + +\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; +\endscope +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-horse.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-horse.lib.tex new file mode 100644 index 00000000000..dad22a8adaf --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-horse.lib.tex @@ -0,0 +1,113 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +% TODO: get all of this customizable +\colorlet{base@a}{lightgray!95!black} +\colorlet{base@b}{lightgray!79!black} + +\colorlet{a}{lightgray!63!black} +\colorlet{b}{lightgray!81!black} +\def\basew{12} +\def\pingu@@horse@scale{.1} + +\def\pingu@@horse@@main{(1.275,.55) -- ++(.1,.2) -- ++(-.25,.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] ++(0,-.7) to[bend left=2] ++(.1,-.55) to[out=-85,in=-60,looseness=.75] ++(-.475,-.35) coordinate(@mouth) to[out=-135,in=-120] ++(-.37,.25) -- ++(0,.1) +to[out=125,in=-68] ++(-.58,.615) coordinate (@mouth-low) +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=.35] (@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=-25] ++(-3.3,.575) coordinate (@backleg) to[bend right=10] ++(-.8,-1.5) to[bend right=20] ++(.1,-2.35) -- ++(.2,-.25) to[bend right=8] ++(.15,-.26) to[bend left=10] ++(-.55,-.05) -- cycle} + +% #1 is the wing for the color and key assignments +\def\pingu@@drawer@horse#1{ +% this ensures all coordinates are set in place +% i know this i inefficient, but atm this is of no greater +% concern -- i can not use layers as they would clash with that +% of the penguin and who wants that... no one does! +% penguins deserve freedom! +\path \pingu@@horse@@main; + +% no we draw "behind" the horse: + +% Sockel +\csname if@pingu@x@horse@#1@base@\endcsname +\pingu@block[draw=\csname pingu@color@horse#1@base@shade@draw\endcsname,line width=2pt*\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); +\pingu@block[draw=\csname pingu@color@horse#1@base@draw\endcsname,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@base\endcsname} (4.35,.433) ellipse[x radius=\basew/2,y radius=1]; +\fi + +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.75pt*\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) +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] ([yshift=5mm]@frontleg) -- cycle; + +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@backleg) to[out=-115,in=130] ++(-.3,-3.65) -- ++(.2,-.3) to[bend left] ++(-.5,-.1) +-- ++(-.05,.15) -- ++(0,.15) to[bend left=60] cycle; + +\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=1.75pt*\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; + +% back ear +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.35pt*\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); + +% and here comes the wheeee (imagine-horse-sound) +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale] \pingu@@horse@@main; + +\pingu@draw[line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.2mm]@mouth-low) to[bend left=12] ++(.06,.65); +\pingu@draw[line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@mouth\endcsname} ([yshift=-.33mm]@mouth) -- ++(-.035,.225); + +\pingu@draw[line width=1.75pt*\pingu@@horse@scale,line join=round]{\csname pingu@color@horse#1@nose\endcsname} ([xshift=3.85mm,yshift=2.45mm]@mouth) to[out=140,in=10] ++(-.17,-.074) to[bend right=49] cycle; + +\pingu@draw[line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.35mm]@frontleg) to[bend left=12] ++(.01,.325); +\pingu@draw[line width=1.75pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.2mm]@backleg) to[bend right=13] ++(.25,.425); + +\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=1.75pt*\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; + +\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=1.35pt*\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; + +% ear +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.35pt*\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); +\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=1.35pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=7] ++(-.15,-.7) to[bend right=14] cycle; + + +% the eye; this is no error it has draw as fill +\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; +} + +\newif\if@pingu@x@horse@left@flip@ +\newif\if@pingu@x@horse@right@flip@ +\newif\if@pingu@x@horse@left@base@ +\newif\if@pingu@x@horse@right@base@ +\pingu@create@wing@extra{horse}{% + horse \@lr/.code = {\pingu@set@extra{horse\@lr}{true}\pingu@color{horse\@lr}{##1}}, + horse \@lr/.default = pingu@bronze!80!pingu@black, + horse \@lr\space flip/.is if = @pingu@x@horse@\@lr @flip@, + horse \@lr\space has base/.is if = @pingu@x@horse@\@lr @base@, + horse \@lr\space draw/.code = \pingu@color{horse\@lr @draw}{##1},% + horse \@lr\space mane/.code = \pingu@color{horse\@lr @mane}{##1},% + horse \@lr\space mane draw/.code = \pingu@color{horse\@lr @mane@draw}{##1},% + horse \@lr\space thatch/.code = \pingu@color{horse\@lr @thatch}{##1},% + horse \@lr\space thatch draw/.code = \pingu@color{horse\@lr @thatch@draw}{##1},% + horse \@lr\space tail/.code = \pingu@color{horse\@lr @tail}{##1},% + horse \@lr\space tail draw/.code = \pingu@color{horse\@lr @tail@draw}{##1},% + horse \@lr\space eyes/.code = \pingu@color{horse\@lr @eyes}{##1},% + horse \@lr\space eye/.forward to = /pingu/horse \@lr\space eyes,% + horse \@lr\space mouth/.code = \pingu@color{horse\@lr @mouth}{##1},% + horse \@lr\space nose/.code = \pingu@color{horse\@lr @nose}{##1},% + horse \@lr\space ears/.code = \pingu@color{horse\@lr @ears}{##1},% + horse \@lr\space base/.code = \pingu@color{horse\@lr @base}{##1},% + horse \@lr\space base draw/.code = \pingu@color{horse\@lr @base@draw}{##1},% + horse \@lr\space base shade/.code = \pingu@color{horse\@lr @base@shade}{##1},% + horse \@lr\space base shade draw/.code = \pingu@color{horse\@lr @base@shade@draw}{##1},% + horse \@lr\space xshift/.code = \@namedef{pingu@x@horse\@lr @xshift}{##1}, + horse \@lr\space yshift/.code = \@namedef{pingu@x@horse\@lr @yshift}{##1}, + horse \@lr\space on base/.style ={/pingu/horse \@lr\space yshift=4cm}, +}{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} + +\def\pingu@draw@wi@horse#1{% + \pingu@setup@wing{horse}{#1}% +\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)}] +\csname if@pingu@x@horse@#1@flip@\endcsname +\scope[xshift=-4cm-\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname] +\else +\scope[xshift=4cm+\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname,xscale=-1] +\fi + \pingu@@drawer@horse{#1} + % hoof + % \pingu@block[draw=\csname pingu@color@horse#1@base@shade@draw\endcsname,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@base@shade\endcsname} (@hooffront) 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; +\endscope\endscope +} +% todo: make statue extra +% todo: make horse hat
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-magic.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-magic.lib.tex new file mode 100644 index 00000000000..a5e3fb2ddc2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-magic.lib.tex @@ -0,0 +1,14 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@wing@extra{handcast}{% + handcast \@lr/.forward to = /pingu/hand cast \@lr, + hand cast \@lr/.code = {\pingu@set@extra{handcast\@lr}{true}\@namedef{pingu@handcast@\@lr}{##1}}, + hand cast \@lr/.default = {X}, + handcast \@lr\space color/.forward to = /pingu/hand cast \@lr\space color, + hand cast \@lr\space color/.code = \pingu@color{handcast@\@lr @color}{##1},% +}{hand cast \@lr\space color=pingu@purple} +\def\pingu@draw@wi@handcast#1{% + \pingu@setup@wing{handcast}{#1}% + \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}}; +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-medieval.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-medieval.lib.tex new file mode 100644 index 00000000000..4e81c4416c2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-medieval.lib.tex @@ -0,0 +1,205 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\newif\if@pingu@x@rook@draw@hatch@ +\pingu@create@extra{rook}{% + rook/.code = \pingu@set@extra{rook}{true}\pingu@color{rook}{#1}, + rook/.default = pingu@silver, + rook back/.code = \pingu@color{rook@back}{#1}, + rook hatch/.is if = @pingu@x@rook@draw@hatch@, + rook hatch/.default = true, + rook shade/.code = \pingu@color{rook@shade}{#1}, +}{rook back=\pingu@color@rook!85!black,rook shade=\pingu@color@rook!92!black,rook hatch} +\def\pingu@draw@ea@rook{% +\if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\pingu@layer{foreground}[]\fi\fi + \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; + \pingu@block{\pingu@color@rook} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(-2mm,-.1mm) -- ++(0,-2.25mm); + \pingu@block{\pingu@color@rook} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(2mm,-.1mm) -- ++(0,-2.25mm); + + \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); + \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); + + % custom shade boi (or gurl, wateva) + \scope + \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; + \if@pingu@x@rook@draw@hatch@ + \clip[/pingu/@invclip] (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half]; + \fi + \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; + \endscope + \if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\endpingu@layer\fi\fi + + \pingu@layer{background}[] + \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; + \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); + \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); + + \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); + \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); + \endpingu@layer +} + +\newif\if@pingu@x@crown@ddd@ % 3d +\newif\if@pingu@x@crown@shade@ % 3d +\pingu@create@extra{crown}{% + crown/.code = \pingu@set@extra{crown}{true}\pingu@color{crown}{#1}, + crown/.default = pingu@yellow, + crown 3d/.is if = @pingu@x@crown@ddd@, crown 3d/.default = true, + crown 2d/.style = {crown=#1, crown 3d=false}, + crown 2d/.default = pingu@yellow, + crown back/.code = \pingu@color{crown@back}{#1}, + crown front bend/.code = \def\pingu@x@crown@f@bend{#1}, + crown back bend/.code = \def\pingu@x@crown@b@bend{#1}, + crown gem shade/.is if = @pingu@x@crown@shade@, crown gem shade/.default = true, + 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}}, + crown gem ring/.code = \pingu@color{crown@gem@ring}{#1}, + 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}}, +}{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} + +% color | bend1 | bend1 +\def\pingu@draw@ea@crown@s#1#2#3{ +\pingu@block{#1} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] ++(0,3.125mm) to[bend #2=\pingu@x@crown@f@bend] + coordinate[pos=0] (r2) coordinate[pos=.07] (r1) + coordinate[pos=.14-.07] (a1) coordinate[pos=.14] (a2) coordinate[pos=.14+.07] (a3) + coordinate[pos=.30-.08] (b1) coordinate[pos=.30] (b2) coordinate[pos=.30+.08] (b3) + coordinate[pos=.50- .1] (c1) coordinate[pos=.50] (x2) coordinate[pos=.50+ .1] (c3) + coordinate[pos=.69-.08] (d1) coordinate[pos=.69] (d2) coordinate[pos=.69+.08] (d3) + coordinate[pos=.85-.07] (e1) coordinate[pos=.85] (e2) coordinate[pos=.85+.07] (e3) + coordinate[pos=1] (l2) coordinate[pos=.93] (l1) + ++(1.375cm,0) to[bend left=2] ++(0,-3.125mm) to[bend #3=\pingu@x@crown@f@bend] (-6mm,-.25cm) -- cycle; +\path (x2)++(0,.9mm) coordinate (c2); +\@for\a:={a,b,c,d,e}\do{ + \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; +} +\pingu@block{#1} (l2)++(0,-.2mm) to[bend right=2] ++(0,1.95mm) -- (l1) -- cycle; +\pingu@block{#1} (r2)++(0,-.2mm) to[bend left=2] ++(0,1.95mm) -- (r1) -- cycle; +} + +% color | at | shift | scale +\def\pingu@draw@ea@crown@g#1#2#3#4{ +\scope[shift={(#22)},shift={(#3,-.33mm)}] + \pingu@block{\pingu@color@crown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4]; + \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; + \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else + \if@pingu@x@crown@shade@ + \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; + \else + \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]; + \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]; + \fi\fi +\endscope +} +\def\pingu@draw@ea@crown{% +\scope[rotate around={\pingu@x@crown@angle:(\pingu@name-head-top)},% + shift={(\pingu@name-head-top)}, + shift={(\pingu@x@crown@xshift,\pingu@x@crown@yshift)}, + scale=\pingu@x@crown@scale] +% draw front +\if@pingu@x@crown@ddd@ + \pingu@draw@ea@crown@s{\pingu@color@crown}{right}{left} + \def\@tmpa{.05mm}\def\@tmpb{.025mm} +\else + \pingu@draw@ea@crown@s{\pingu@color@crown}{left}{right} + \def\@tmpa{-.015mm}\def\@tmpb{-.035mm} +\fi +% draw the emeralds +\pingu@draw@ea@crown@g{\pingu@color@crown@gem@b}{a}{-\@tmpa}1 +\pingu@draw@ea@crown@g{\pingu@color@crown@gem@c}{b}{-\@tmpb}1 +\pingu@draw@ea@crown@g{\pingu@color@crown@gem@d}{x}{\z@}{1.35} +\pingu@draw@ea@crown@g{\pingu@color@crown@gem@e}{d}{\@tmpb}1 +\pingu@draw@ea@crown@g{\pingu@color@crown@gem@f}{e}{\@tmpa}1 +\pingu@layer{background}[] +\pingu@block{\pingu@color@crown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; +\pingu@block{\pingu@color@crown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; +\pingu@block{\pingu@color@crown@gem@g} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; +\pingu@block{\pingu@color@crown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; +% draw back if 3d +\if@pingu@x@crown@ddd@ + \pingu@draw@ea@crown@s{\pingu@color@crown@back}{left}{right} +\fi +\endpingu@layer +\endscope +} + +\newif\if@pingu@x@princesscrown@ddd@ +\newif\if@pingu@x@princesscrown@shade@ +\newif\if@pingu@x@princesscrown@bobbles@ +\pingu@create@extra{princesscrown}{% + princess crown/.code = \pingu@set@extra{princesscrown}{true}\pingu@color{princesscrown}{#1}, + princess crown/.default = pingu@yellow, + princess crown 3d/.is if= @pingu@x@princesscrown@ddd@, princess crown 3d/.default = true, + princess crown 2d/.style = {princess crown=#1, princess crown 3d=false}, + princess crown 2d/.default = pingu@yellow, + princess crown back/.code = \pingu@color{princesscrown@back}{#1}, + princess crown front bend/.code = \def\pingu@x@princesscrown@f@bend{#1}, + princess crown back bend/.code = \def\pingu@x@princesscrown@b@bend{#1}, + princess crown gem shade/.is if = @pingu@x@princesscrown@shade@, + princess crown bobbles/.is if = @pingu@x@princesscrown@bobbles@, + princess crown gem shade/.default = true, + 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}}, + princess crown gem ring/.code = \pingu@color{princesscrown@gem@ring}{#1}, + 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}}, +}{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} + +% color | bend1 | bend2 +\def\pingu@draw@ea@princesscrown@s#1#2#3{ +\pingu@block{#1} [rounded corners=.2mm](-3.25mm,-.15cm) to[bend left=2] ++(0,2.32mm) to[bend #2=\pingu@x@princesscrown@f@bend] + coordinate[pos=0] (r2) coordinate[pos=.065] (r1) + coordinate[pos=.11] (a1) coordinate[pos=.2] (a2) coordinate[pos=.29] (a3) + coordinate[pos=.35] (b1) coordinate[pos=.50] (x2) coordinate[pos=.65] (b3) + coordinate[pos=.71] (c1) coordinate[pos=.8] (c2) coordinate[pos=.89] (c3) + coordinate[pos=1] (l2) coordinate[pos=.93] (l1) + ++(8mm,0) to[bend left=2] ++(0,-2.32mm) to[bend #3=\pingu@x@princesscrown@f@bend] (-3mm,-.15cm) -- cycle; +\path (x2)++(0,.9mm) coordinate (b2); +\@for\a:={a,b,c}\do{ + \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; + \if@pingu@x@princesscrown@bobbles@\pingu@block{#1} ([yshift=2.15mm]\a2) circle [radius=.45\p@];\fi +} +\pingu@block{#1} (l2)++(0,-.2mm) to[bend left=2] ++(0,2.25mm) -- (l1) -- cycle; +\pingu@block{#1} (r2)++(0,-.2mm) to[bend right=2] ++(0,2.25mm) -- (r1) -- cycle; +\if@pingu@x@princesscrown@bobbles@\pingu@block{#1} (l2)++(0,2.05mm) circle [radius=.45\p@]; +\pingu@block{#1} (r2)++(0,2.05mm) circle [radius=.45\p@];\fi +} + +% draw single gem; color | at | shift | scale +\def\pingu@draw@ea@princesscrown@g#1#2#3#4{ +\scope[shift={(#22)},shift={(#3,-.33mm)}] + \pingu@block{\pingu@color@princesscrown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4]; + \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; + \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else + \if@pingu@x@princesscrown@shade@ + \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4]; + \else + \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]; + \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]; + \fi\fi +\endscope} +\def\pingu@draw@ea@princesscrown{% +\scope[rotate around={\pingu@x@princesscrown@angle:(\pingu@name-head-top)},% + shift={(\pingu@name-head-top)}, + shift={(\pingu@x@princesscrown@xshift,\pingu@x@princesscrown@yshift)}, + scale=\pingu@x@princesscrown@scale] +% draw front +\if@pingu@x@princesscrown@ddd@ + \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{right}{left} + \def\@tmpa{.05mm} +\else + \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{left}{right} + \def\@tmpa{-.015mm} +\fi +% draw the emaralds +\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@b}{a}{-\@tmpa}{.95} +\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@c}{x}{\z@}{1.3} +\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@d}{c}{\@tmpa}{.95} +\pingu@layer{background}[] +\pingu@block{\pingu@color@princesscrown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; +\pingu@block{\pingu@color@princesscrown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; +\pingu@block{\pingu@color@princesscrown@gem@e} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm]; +\pingu@block{\pingu@color@princesscrown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm]; +% draw back if 3d +\if@pingu@x@princesscrown@ddd@ + \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown@back}{left}{right} +\fi +\endpingu@layer +\endscope +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-movement.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-movement.lib.tex new file mode 100644 index 00000000000..0916cda3476 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-movement.lib.tex @@ -0,0 +1,75 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@bodytype@add{tilt-right}{% +\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) +% left side +to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{}-1mm and \pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right) +arc (270:332:\pingu@foot@inner@w{}+1mm and 2.5*\pingu@foot@inner@h) +coordinate (\pingu@name-bottom-center) +arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left) +arc (270:360:\pingu@foot@outer@w{} and 1.125*\pingu@foot@outer@h)% +% right side +to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); +\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@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); + +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +} + + +\pingu@bodytype@add{tilt-left}{% +\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) +% left side +to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{}-1mm and 1.25*\pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right) +arc (270:332:\pingu@foot@inner@w{}+1mm and 1.125*\pingu@foot@inner@h) +coordinate (\pingu@name-bottom-center) +arc (208:270:\pingu@foot@inner@w{} and 2.5*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left) +arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% +% right side +to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); +\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@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); + +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-safe.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-safe.lib.tex new file mode 100644 index 00000000000..d25913d3cd6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-safe.lib.tex @@ -0,0 +1,30 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{mask}{% + mask/.code = {\pingu@set@extra{mask}{true}\pingu@color{mask}{#1}}, + mask/.default = pingu@white!61!gray,% + mask band/.code = \pingu@color{mask@band}{#1},% + mask line width/.code = \def\pingu@x@mask@line@width{#1},% + mask band inner/.code = \pingu@color{mask@band@inner}{#1},% + mask band outer/.code = \pingu@color{mask@band@outer}{#1}% +}{mask band=\pingu@color@body@main, mask band inner=\pingu@color@mask@band!60!\pingu@color@mask, mask band outer=\pingu@color@mask@band!82!\pingu@color@mask,mask line width=.565pt} + +\def\pingu@draw@ea@mask{% +\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle; +\scope +\clip[use path=\pingu@upperpingu]; +\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=.2mm]@ul) to[bend left=3] ([yshift=-1.1mm]\pingu@name-wings-side-right); +\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=-.2mm]@ur) to[bend right=3] ([yshift=-1.1mm]\pingu@name-wings-side-left); +\endscope\scope +\clip[use path=\pingu@lowerpingu]; +\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=.2mm]@ll) to[bend left=3] ([yshift=2mm]\pingu@name-wing-right-start); +\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=-.2mm]@lr) to[bend right=3] ([yshift=2mm]\pingu@name-wing-left-start); +\endscope +% TODO: fix this sloppy overwrite +\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle; +\pingu@draw[very thin]{\pingu@color@mask@band@inner} ([xshift=-5mm,yshift=.75mm-4.25mm/2]\pingu@name-bill) to[bend right=1] ++(10mm,0); +\foreach \i/\b/\c in {1.6mm/very thin/\pingu@color@mask@band@inner,.8mm/very thin/\pingu@color@mask@band@inner,0mm//\pingu@color@mask@band@outer} { +\pingu@draw[\b]{\c} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm-\i]\pingu@name-bill) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) -- ++(0,-4.25mm+2*\i)[rounded corners=.8mm] -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) -- cycle; +} +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-science-fiction.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-science-fiction.lib.tex new file mode 100644 index 00000000000..ab7c4f8a220 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-science-fiction.lib.tex @@ -0,0 +1,190 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\newif\if@pingu@x@lightsaber@glow@left +\newif\if@pingu@x@lightsaber@glow@right +\newif\if@pingu@x@lightsaber@double@left +\newif\if@pingu@x@lightsaber@double@right +\def\pingu@x@saberglow@w@half{.9mm} +\def\pingulightsaberfactor{.028} +\pingu@create@wing@extra{lightsaber}{% + lightsaber \@lr/.code = {\pingu@set@extra{lightsaber\@lr}{true}\pingu@color{lightsaber\@lr}{##1}}, + lightsaber \@lr/.default = pingu@blue, + lightsaber \@lr\space handle/.code = \pingu@color{lightsaber\@lr @handle}{##1},% + lightsaber \@lr\space deco/.code = \pingu@color{lightsaber\@lr @deco}{##1},% + lightsaber \@lr\space ribbs/.code = \pingu@color{lightsaber\@lr @ribbs}{##1},% + lightsaber \@lr\space button/.code = \pingu@color{lightsaber\@lr @button}{##1},% + lightsaber \@lr\space button b/.code = \pingu@color{lightsaber\@lr @button@b}{##1},% + lightsaber \@lr\space color b/.code = \pingu@color{lightsaber\@lr @color@b}{##1},% + lightsaber \@lr\space length/.code = {\@namedef{pingu@x@lightsaber@length@\@lr}{##1}},% + lightsaber \@lr\space length b/.code = {\@namedef{pingu@x@lightsaber@length@b@\@lr}{##1}},% + lightsaber \@lr\space yshift/.code = {\@namedef{pingu@x@lightsaber@yshift@\@lr}{##1}},% + lightsaber \@lr\space glow/.is if = @pingu@x@lightsaber@glow@\@lr,% + lightsaber \@lr\space double/.is if = @pingu@x@lightsaber@double@\@lr,% + lightsaber \@lr\space glow core/.code = \pingu@color{lightsaber\@lr @glow@core}{##1},% + lightsaber \@lr\space solid/.style = {/pingu/lightsaber \@lr\space glow=false}, + lightsaber \@lr\space disabled/.style = {/pingu/lightsaber \@lr\space solid,/pingu/lightsaber \@lr=\@pingu@none}, + lightsaber \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightsaber@ogf@\@lr}{##1}}% +}{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} + +% #region lightsaber base +\def\pingu@draw@wi@lightsaber@base#1{% +% deco-elements + % base + \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; + \if@pingu@wing@item@side@left@ + % ribbs; single path saves memory :D + \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(-.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0) + arc(90:270:.075mm) -- ++(.8mm,0) |- cycle; + % button + \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]; + \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]; + % cover + \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; + \else + % ribbs; single path saves memory :D (the second) + \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0) + arc(90:-90:.075mm) -- ++(-.8mm,0) |- cycle; + % buttons + \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]; + \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]; + % cover + \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; + \fi +} +% #endregion +% #1 wing, #2 yshift, #3 angle, #4 length, #5 color +\def\pingu@draw@wi@lightsaber@pre#1#2#3#4#5{ + \scope[rotate around={#3:(\pingu@name-wing-#1)}] + \csname if@pingu@x@lightsaber@glow@#1\endcsname + \@for\i:={0,2,4,6,7,8,9,10,11,12,13,14,15,16,17}\do{ + \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@w@half-.05mm-\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); + } + \else % draw solid + \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); + \fi + \endscope +} + +% #1 wing, #2 yshift, #3 angle, #4 length, #5 color +\def\pingu@draw@wi@lightsaber@post#1#2#3#4#5{ + \scope[rotate around={#3:(\pingu@name-wing-#1)}] + \csname if@pingu@x@lightsaber@glow@#1\endcsname + \ifdim\csname pingu@x@lightsaber@ogf@#1\endcsname pt>\z@ + \pingu@layer{foreground}[] + \pgfinterruptboundingbox + \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); + \@for\i:={1,1.1,1.2,1.3,1.5}\do{ + \pingu@block[/pingu/@glow,fill opacity=\csname pingu@x@lightsaber@ogf@#1\endcsname/\i]{#5} (\pingu@name-wing-#1) ++(.05mm,#2+#4/2) circle[radius=\i*#4]; + } + \endpgfinterruptboundingbox + \endpingu@layer + \fi + % fadings hat a rotation angle bug + \@for\i:={1,2}\do{ + \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@w@half-.05mm-\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); + } + \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); + \fi + \endscope +} + +% #1 wing +\def\pingu@draw@wi@lightsaber#1{% + \pingu@setup@wing{lightsaber}{#1}% + \scope[rotate around={\@angle:([yshift=+\csname pingu@x@lightsaber@yshift@#1\endcsname]\pingu@name-wing-#1)},xscale=1.2] + \pingu@draw@wi@lightsaber@pre{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col} + \csname if@pingu@x@lightsaber@double@#1\endcsname + \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} + \fi + \pingu@draw@wi@lightsaber@base{#1} + % afterglow (whuile watching everglow :D) + \pingu@draw@wi@lightsaber@post{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col} + \csname if@pingu@x@lightsaber@double@#1\endcsname + \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} + \fi + \endscope +} + + +\newif\if@pingu@x@lightstaff@glow@left +\newif\if@pingu@x@lightstaff@glow@right +\pingu@create@wing@extra{lightstaff}{% + light-staff \@lr/.code = {\pingu@set@extra{lightstaff\@lr}{true}\pingu@color{lightstaff\@lr}{##1}}, + light-staff \@lr/.default = pingu@green, + light-staff \@lr\space length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @length\endcsname{##1}, + light-staff \@lr\space glow length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @glow@length\endcsname{##1}, + light-staff \@lr\space head/.code = \pingu@color{lightstaff\@lr}{##1},% + light-staff \@lr\space staff/.code = \pingu@color{lightstaff@\@lr @staff}{##1},% + light-staff \@lr\space core/.code = \pingu@color{lightstaff@\@lr @head@core}{##1},% + light-staff \@lr\space core width/.code = \expandafter\def\csname pingu@lightstaff@\@lr @core@width\endcsname{##1},% + light-staff \@lr\space glow/.is if = @pingu@x@lightstaff@glow@\@lr,% + light-staff \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightstaff@ogf@\@lr}{##1}},% +}{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=.082,light-staff \@lr\space glow length=13mm,light-staff \@lr\space core width=.44mm} +\def\pingu@draw@wi@lightstaff#1{% + \pingu@setup@wing{lightstaff}{#1}% +\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] + \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; + \pingu@draw@wi@lightstaff@pre{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col} + \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; + \pingu@draw@wi@lightstaff@post{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col} +\endscope +} + +% #1 wing, #2 start, #3 color +\def\pingu@draw@wi@lightstaff@pre#1#2#3{ +\csname if@pingu@x@lightstaff@glow@#1\endcsname +\@for\i:={0,1,2,4,6,7,8,9,10,14}\do{ + \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; + % -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\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); +} +\else % draw solid + \pingu@block{#3} (#2) -- ++(-.55mm,1mm) -- ++(0,2mm) -- ++(.55mm,1mm) -- ++(.55mm,-1mm) -- ++(0,-2mm) -- cycle; +\fi +} + +\def\pingu@draw@wi@lightstaff@post#1#2#3{ +\csname if@pingu@x@lightstaff@glow@#1\endcsname +\ifdim\csname pingu@x@lightstaff@ogf@#1\endcsname pt>\z@ +\pingu@layer{foreground}[] +\pgfinterruptboundingbox +\@for\i:={1,1.05,1.1,1.2,1.3,1.315,1.4,1.5}\do{ + \pingu@block[/pingu/@glow,fill opacity=\csname pingu@x@lightstaff@ogf@#1\endcsname/\i]{#3} (#2)++(0,2mm) circle[radius=\i*\csname pingu@lightstaff@#1@glow@length\endcsname]; +} +\endpgfinterruptboundingbox +\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; +\endpingu@layer +\fi +% fadings hat a rotation angle bug +\@for\i:={1,2}\do{ + \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; +} +\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; +\fi +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-shirts.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-shirts.lib.tex new file mode 100644 index 00000000000..ce337dd4b1b --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-shirts.lib.tex @@ -0,0 +1,63 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\newif\if@pingu@shirt@above +\pingu@create@extra{shirt}{% + shirt/.code = \pingu@set@extra{shirt}{true}\pingu@color{shirt}{#1}, + shirt/.default = pingu@bronze, + shirt above/.is if = @pingu@shirt@above, + shirt raise/.code = \def\pingu@shirt@raise{#1}, + shirt padding/.code = \def\pingu@shirt@padding{#1}, + shirt button top/.code = \pingu@color{shirt@button@top}{#1}, + shirt button middle/.code = \pingu@color{shirt@button@middle}{#1}, + shirt button bottom/.code = \pingu@color{shirt@button@bottom}{#1}, + shirt buttons/.style = {/pingu/shirt button top={#1}, /pingu/shirt button middle={#1}, /pingu/shirt button bottom={#1}}, + shirt button top shade/.code = \pingu@color{shirt@button@top@shade}{#1}, + shirt button middle shade/.code = \pingu@color{shirt@button@middle@shade}{#1}, + shirt button bottom shade/.code = \pingu@color{shirt@button@bottom@shade}{#1}, + shirt buttons shade/.style = {/pingu/shirt button top shade={#1}, /pingu/shirt button middle shade={#1}, /pingu/shirt button bottom shade={#1}}, + shirt without buttons/.forward to=/pingu/shirt no buttons, + shirt no buttons/.style = {/pingu/shirt buttons=\@pingu@none, /pingu/shirt buttons shade=\@pingu@none}, +}{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} +\def\pingu@draw@cloth@shirt@behind{} + +\def\pingu@draw@cloth@shirt@middle{\if@pingu@shirt@above\else\pingu@draw@cloth@shirt@main\fi} + +\def\pingu@draw@cloth@shirt@main{% +\coordinate (\pingu@name-shirt-low) at ([yshift=\pingu@shirt@raise]\pingu@name-belly-center); +\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; + +\coordinate (\pingu@name-shirt-bt) at ([yshift=-\pingu@one]\pingu@name-shirt-low); +\pingu@block{\pingu@color@shirt@button@top}(\pingu@name-shirt-bt) circle[radius=.4mm]; +\pingu@block{\pingu@color@shirt@button@middle}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm]; +\pingu@block{\pingu@color@shirt@button@bottom}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm]; +\pingu@block[even odd rule]{\pingu@color@shirt@button@top@shade}(\pingu@name-shirt-bt) circle[radius=.4mm] circle[radius=.465mm]; +\pingu@block[even odd rule]{\pingu@color@shirt@button@middle@shade}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm] circle[radius=.465mm]; +\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]; +\@for\i:={0,90,180,270}\do{ + \pingu@block{\pingu@color@shirt@button@top@shade} (\pingu@name-shirt-bt)++(\i:. + 25mm) circle[radius=.065mm]; + \pingu@block{\pingu@color@shirt@button@middle@shade} (\pingu@name-shirt-bt)++(0,-1.35mm)++(\i:.25mm) circle[radius=.065mm]; + \pingu@block{\pingu@color@shirt@button@bottom@shade} (\pingu@name-shirt-bt)++(0,2*-1.35mm)++(\i:.25mm) circle[radius=.065mm]; +}} + +% TODO: if flags to draw parts +\def\pingu@draw@cloth@shirt{\if@pingu@shirt@above\pingu@draw@cloth@shirt@main\fi} + +\pingu@create@extra{secondshirt}{% + second shirt/.code = \pingu@set@extra{secondshirt}{true}\pingu@color{secondshirt}{#1}, + second shirt raise/.code = \def\pingu@secondshirt@raise{#1}, + second shirt neck/.code = \pingu@color{secondshirt@neck}{#1}, + second shirt/.default = purple, +}{second shirt raise=3.35mm,second shirt neck=\pingu@color@secondshirt!32!pingu@white} +\def\pingu@draw@cloth@secondshirt@behind{} + +\def\pingu@draw@cloth@secondshirt@middle{% +\coordinate (\pingu@name-secondshirt-low) at ([yshift=\pingu@secondshirt@raise]\pingu@name-belly-center); +\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; +\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); +} + +% TODO: if flags to draw parts +\def\pingu@draw@cloth@secondshirt{% +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-signs.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-signs.lib.tex new file mode 100644 index 00000000000..f1a42a05561 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-signs.lib.tex @@ -0,0 +1,53 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@wing@extra{signpost}{% + signpost \@lr/.forward to = /pingu/sign post \@lr, + sign post \@lr/.code = {\pingu@set@extra{signpost\@lr}{true}\@namedef{pingu@signpost@\@lr}{##1}}, + sign post \@lr/.default = {}, + signpost \@lr\space color/.forward to = /pingu/sign post \@lr\space color, + sign post \@lr\space color/.code = \pingu@color{signpost\@lr}{##1}, + signpost \@lr\space fontcolor/.forward to = /pingu/sign post \@lr\space font color, + sign post \@lr\space font color/.code = \pingu@color{signpost\@lr @font}{##1}, +}{sign post \@lr\space color=brown!70!black, sign post \@lr\space font color=white!90!brown} +\def\pingu@draw@wi@signpost#1{% + \pingu@setup@wing{signpost}{#1}% + \def\@rot{\if@pingu@wing@item@side@left@-5\else+5\fi}% +\scope[rotate around={\@angle+\@rot:(\pingu@name-wing-#1)}] + \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; + \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}; +\endscope +} + +\pingu@create@extra{banner}{% + banner/.code = \pingu@set@extra{banner}{true}\@namedef{pingu@banner}{#1}, + banner/.default = Bannertext, + banner band/.code = \pingu@color{banner@band}{#1}, + banner text color/.code = \pingu@color{banner@text@color}{#1}, + banner sticks color/.style={/pingu/banner stick left color=#1,/pingu/banner stick right color=#1}, + banner stick left color/.code = \pingu@color{banner@stick@left}{#1}, + banner stick right color/.code = \pingu@color{banner@stick@right}{#1}, + banner sticks length/.style={/pingu/banner stick left length=#1,/pingu/banner stick right length=#1}, + banner stick left length/.code = \@namedef{pingu@banner@stick@left@l}{#1}, + banner stick right length/.code = \@namedef{pingu@banner@stick@right@l}{#1}, + banner raise/.code = \@namedef{pingu@banner@raise}{#1}, + banner height/.code = \@namedef{pingu@banner@height}{#1}, + banner font/.code = \@namedef{pingu@banner@font}{#1}, + banner bent/.code = \@namedef{pingu@banner@bent}{#1} +}{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} + +\usetikzlibrary{decorations.text} +\def\pingu@draw@ea@banner{% +\pingu@setup@wing{staff}{left}% we do not need the staff color, but we will use it +\scope[rotate around={\@angle:(\pingu@name-wing-left)}] + \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; + \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); +\endscope +\pingu@setup@wing{staff}{right}% we do not need the staff color, but we will use it +\scope[rotate around={\@angle:(\pingu@name-wing-right)}] + \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; + \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); +\endscope +\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; +\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); +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-sport.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-sport.lib.tex new file mode 100644 index 00000000000..257f8685daa --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-sport.lib.tex @@ -0,0 +1,79 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{medal}{% + medal/.code = {\pingu@set@extra{medal}{true}\pingu@color{medal}{#1}}, + medal/.default = pingu@yellow,% + gold medal/.style = {medal, medal text=#1}, gold medal/.default={1}, + silver medal/.style = {medal=pingu@silver, medal text=#1}, silver medal/.default={2}, + bronze medal/.style = {medal=pingu@bronze, medal text=#1}, bronze medal/.default={3}, + medal band/.code = \pingu@color{medal@band}{#1},% + medal shade/.code = \pingu@color{medal@shade}{#1},% + medal shade width/.code = \def\pingu@medal@shade@w{#1},% + medal text/.code = \def\pingu@x@medal@text{#1},% + medal text style/.style = {\pingu@color@medal!65!pingu@white}, +}{medal band=pingu@red,medal text={},medal shade={\pingu@color@medal!65!pingu@white},medal shade width=.75\p@} + +\def\pingu@draw@eb@medal{% +\coordinate (\pingu@name-medal-center) at ([yshift=1.25mm]\pingu@name-belly-center); +\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; +\pingu@block{\pingu@color@medal} (\pingu@name-medal-center) circle [radius=2.35mm]; +\pingu@draw[line width=\pingu@medal@shade@w]{\pingu@color@medal@shade} (\pingu@name-medal-center) circle [radius=2.35mm]; +\node[/pingu/@text,/pingu/medal text style] at (\pingu@name-medal-center) {\pingu@x@medal@text}; +} +\newif\if@pingu@x@headband@knot@ +\newif\if@pingu@x@headband@bands@ +\pingu@create@extra{headband}{% + headband/.forward to = /pingu/head band, + head-band/.forward to = /pingu/head band, + head band/.code = \pingu@set@extra{headband}{true}\pingu@color{headband}{#1}, + head band/.default = pingu@red, + headband bend/.forward to = /pingu/head band bend, + head-band bend/.forward to = /pingu/head band bend, + head band bend/.code = \def\pingu@x@headband@bend{#1}, + headband angle/.forward to = /pingu/head band angle, + head-band angle/.forward to = /pingu/head band angle, + head band angle/.code = \def\pingu@x@headband@angle{#1}, + headband upper angle/.forward to = /pingu/head band upper angle, + head-band upper angle/.forward to = /pingu/head band upper angle, + head band upper angle/.code = \def\pingu@x@headband@upangle{#1}, + % knot + headband knot/.forward to = /pingu/head band knot, + head-band knot/.forward to = /pingu/head band knot, + head band knot/.is if = @pingu@x@headband@knot@, + headband knot color/.forward to = /pingu/head band knot color, + head-band knot color/.forward to = /pingu/head band knot color, + head band knot color/.code = \pingu@color{headband@knot}{#1}, + headband knot a color/.forward to = /pingu/head band knot a color, + head-band knot a color/.forward to = /pingu/head band knot a color, + head band knot a color/.code = \pingu@color{headband@knot@a}{#1}, + headband knot b color/.forward to = /pingu/head band knot b color, + head-band knot b color/.forward to = /pingu/head band knot b color, + head band knot b color/.code = \pingu@color{headband@knot@b}{#1}, + headband bands/.forward to = /pingu/head band bands, + head-band bands/.forward to = /pingu/head band bands, + head band bands/.is if = @pingu@x@headband@bands@, + headband bands a color/.forward to = /pingu/head band bands a color, + head-band bands a color/.forward to = /pingu/head band bands a color, + head band bands a color/.code = \pingu@color{headband@bands@a}{#1}, + headband bands b color/.forward to = /pingu/head band bands b color, + head-band bands b color/.forward to = /pingu/head band bands b color, + head band bands b color/.code = \pingu@color{headband@bands@b}{#1}, +}{head band bend=9, head band angle=16,head band upper angle=49, 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} + +\def\pingu@draw@ea@headband@wh{1.25mm} +\def\pingu@draw@ea@headband{% + \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); + \path (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-upper); + \if@pingu@x@headband@bands@ + \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; + \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; + \fi + \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; + \path (\pingu@name-headband-center-a) -- (\pingu@name-headband-center-b) coordinate[pos=.5] (\pingu@name-headband-center); + \if@pingu@x@headband@knot@ + \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; + \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; + \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; + \fi +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-technology.lib.tex b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-technology.lib.tex new file mode 100644 index 00000000000..fbb2f484198 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus-technology.lib.tex @@ -0,0 +1,126 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\pingu@create@extra{vrheadset}{% + vr-headset/.code = \pingu@set@extra{vrheadset}{true}\pingu@color{vrheadset}{#1}, + vr-headset/.default = pingu@black!92!gray, + vr-headset band/.code = \pingu@color{vrheadset@band}{#1}, + vr-headset band top/.code = \pingu@color{vrheadset@band@top}{#1}, + vr-headset text/.code = \def\pingu@x@vrheadset@text{#1}, + vr-headset text color/.code = \pingu@color{vrheadset@text@color}{#1}, + vr-headset hair/.style = {/pingu/hair 2=!hide,/pingu/hair 3=!hide,/pingu/hair 4=!hide} +}{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} + +\def\pingu@draw@ea@vrheadset{% +\pingu@layer{middle}[] + \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; + \path (\pingu@name-vrh-ol)++(-2.25mm,2mm) node[text=\pingu@color@vrheadset@text@color,scale=.25] {\pingu@x@vrheadset@text}; +\endpingu@layer +\if@pingu@do@back@\else + % top band + \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]@); +\fi + % we draw a band for the background +\pingu@layer{background}[] +\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); +\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; +\endpingu@layer +} +\pingu@create@extra{headphone}{% + headphones/.forward to = /pingu/headphone, + headphone/.code = \pingu@set@extra{headphone}{true}\pingu@color{headphone}{#1}, + headphone/.default = pingu@blue!80!pingu@black, + headphone left/.code = \pingu@color{headphone@left}{#1}, + headphone right/.code = \pingu@color{headphone@right}{#1}, + headphones outer/.forward to = /pingu/headphone outer, + headphone outer/.style = {/pingu/headphone left outer=#1,/pingu/headphone right outer=#1}, headphone outer/.default = pingu@black, + headphone left outer/.code = \pingu@color{headphone@left@p}{#1}, headphone left outer/.default =pingu@black, + headphone right outer/.code = \pingu@color{headphone@right@p}{#1}, headphone right outer/.default=pingu@black, + headphones inner/.forward to = /pingu/headphone inner, + headphone inner/.style = {/pingu/headphone left inner=#1,/pingu/headphone right inner=#1}, headphone inner/.default = pingu@black, + headphone left inner/.code = \pingu@color{headphone@left@i}{#1}, headphone left inner/.default = pingu@black, + headphone right inner/.code = \pingu@color{headphone@right@i}{#1}, headphone right inner/.default=pingu@black, +}{headphone left=\pingu@color@headphone!65!pingu@black,headphone right=\pingu@color@headphone@left,headphone left outer=\@pingu@none, +,headphone right outer=\@pingu@none,,headphone left inner=\@pingu@none, +,headphone right inner=\@pingu@none} + +\def\pingu@draw@ea@headphone{% +\if@pingu@do@back@ \pingu@layer{background}[] \fi + \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); + \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@i} ([xshift=\pingu@one-.366mm,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; + \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; + \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; + \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); + \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left} ([xshift=\pingu@one-.2mm,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; + \pingu@block{\pingu@color@headphone} ([xshift=-\pingu@one,yshift=\pingu@one]\pingu@name-wings-side-right|-\pingu@name-eye-right) + arc(180:0:{\pingu@one+\pingu@w@half} and {\pingu@head@h@half-.5\pingu@one}) arc(0:-180:.65mm and .33mm) + arc(0:180:{\pingu@one+\pingu@w@half-2*.65mm} and {\pingu@head@h@half+.33\pingu@one-2*.6mm-1.1\pingu@one}) + arc(0:-180:.65mm and .33mm) -- cycle; +\if@pingu@do@back@ \endpingu@layer \fi +} + +\pingu@create@wing@extra{vrcontroller}{% +vr-controller \@lr/.code = {\pingu@set@extra{vrcontroller\@lr}{true}\pingu@color{vrcontroller\@lr}{##1}}, +vr-controller \@lr/.default = pingu@green, +vr-controller \@lr\space handle/.code = \pingu@color{vrcontroller\@lr @handle}{##1},% +vr-controller \@lr\space second/.code = \pingu@color{vrcontroller\@lr @second}{##1},% +vr-controller \@lr\space second shade/.code = \pingu@color{vrcontroller\@lr @second@shade}{##1}% +}{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}} + +% #1 wing +\def\pingu@draw@wi@vrcontroller#1{% + \pingu@setup@wing{vrcontroller}{#1}% + \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] (@); + \def\@y{2.06mm} \def\@@y{.78mm} + \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); + % \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); + \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} + \pingu@block[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second\endcsname} \@toruslow; + \scope[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}] + \clip \@toruslow; + \pingu@block[opacity=.1]{black} (@l) to[bend left=14] (@c) -- ++(0,-2mm) -| cycle; + \endscope +} + + +\pingu@create@wing@extra{laptop}{% + laptop \@lr/.code = {\pingu@set@extra{laptop\@lr}{true}\pingu@color{laptop\@lr}{##1}}, + laptop \@lr/.default = gray!80!pingu@white, + laptop \@lr\space bracket/.code = \pingu@color{laptop\@lr @bracket}{##1}, + laptop \@lr\space lower/.code = \pingu@color{laptop\@lr @lower}{##1}, + laptop \@lr\space key/.code = \pingu@color{laptop\@lr @key}{##1}, + laptop \@lr\space display/.code = \pingu@color{laptop\@lr @display}{##1}, + laptop \@lr\space content/.code = \@namedef{pingu@x@laptop\@lr @content}{##1}, % tikz content + laptop \@lr\space mid/.code = \@namedef{pingu@x@laptop\@lr @mid}{##1}, % tikz content +}{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={}} + +% #1 wing +\def\pingu@draw@wi@laptop#1{% + \pingu@setup@wing{laptop}{#1}% + \scope[rotate around={\@angle+5:(\pingu@name-wing-#1)},shift={(\pingu@name-wing-#1)}] + \pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@lower\endcsname}(-6.9mm,0) -- ++(-.1mm,-4.75mm) -- ++(14mm,0) -- ++(-.1mm,4.75mm) -- cycle; + \pingu@block[rounded corners=1pt]{\@col}(-6.9mm,0) -- ++(0,7mm) -- ++(13.8mm,0) -- ++(0,-7mm) -- cycle; + \pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@bracket\endcsname}(-6.4mm,.125mm) -- ++(0,-.25mm) -- ++(12.8mm,0) -- ++(0,.25mm) -- cycle; + % keys + \foreach[count=\y from 0,evaluate=\y as \extpadding using 0.005*\y,evaluate=\y as \rextpadding using 0.05*\y] \row in { + % manually account for padding + {0,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {.63,1.5,1,1,1,1,1,1,1,1,1,1,1}, + {0,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {0,1,1,1,1,1,4.62,1,1,1,1}, + } { + \def\lengthincr{-\rextpadding mm} + \foreach[count=\i from 0,evaluate=\len as \l using 0.85*\len] \len in \row { + \ifnum\i=0 \else % first one is silent: + \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}; + \fi + \xdef\lengthincr{\the\dimexpr\lengthincr+\l mm+.13mm+\extpadding mm} + } + } + % display, we modify the lower shift to adjust height offset + \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}; + \scope[shift={(-6.7mm,.25mm+.05mm)}] + \csname pingu@x@laptop#1@content\endcsname + \endscope + \endscope +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus.sty b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus.sty new file mode 100644 index 00000000000..49e0e436505 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikzpingus/tikzpingus.sty @@ -0,0 +1,1208 @@ +% Florian Sihler, 2022 +% Licensed under GNU General Public License version 3 +% https://opensource.org/licenses/gpl-3.0.html +\def\tikzpingus@filename{tikzpingus} +\ProvidesPackage{\tikzpingus@filename}[2022/08/24 version v1.0 Penguins in TikZ] +\newif\ifpengu@setup@glows@ +\DeclareOption{glows}{\pengu@setup@glows@true}\DeclareOption{noglows}{\pengu@setup@glows@false} +\newif\ifpengu@setup@manual@layers@ +\DeclareOption{manual-layers}{\pengu@setup@manual@layers@true}\DeclareOption{nomanual-layers}{\pengu@setup@manual@layers@false} +\newif\ifpengu@setup@bare@ +\DeclareOption{bare}{\pengu@setup@bare@true}\DeclareOption{nobare}{\pengu@setup@bare@false} +\ProcessOptions* + +\RequirePackage{etoolbox} +\RequirePackage{tikz} +\usetikzlibrary{intersections,shadings,patterns.meta,decorations.pathmorphing,shapes.symbols,shapes.geometric} + +\pgfdeclarelayer{background}\pgfdeclarelayer{foreground}\pgfdeclarelayer{middle} +\pgfdeclarelayer{very-background} +\ifpengu@setup@manual@layers@\else +\pgfsetlayers{very-background,background,main,middle,foreground} +\fi +% #region whole setup +% #region colors +\def\@pingu@color@ #1#2(#3,#4,#5){\definecolor{pingu@#1}{#2}{#3,#4,#5}} +\@pingu@color@{main}RGB(3,14,29) +\@pingu@color@{black}RGB(23,19,19) +\@pingu@color@{silver}RGB(192,192,192) +\@pingu@color@{bronze}RGB(205,127,50) +\@pingu@color@{white}RGB(248,248,248) +\@pingu@color@{yellow}RGB(252,187,21) +\@pingu@color@{lightblue}RGB(174,229,243) +\@pingu@color@{blue}RGB(48,161,247) +\@pingu@color@{green}RGB(129,204,41) +\@pingu@color@{red}RGB(217, 40, 28) +\@pingu@color@{purple}RGB(244,48,93) +\def\@pingu@none{!hide} +% #endregion + +% #region lengths and dimens +\newdimen\pingu@one@eight \pingu@one@eight=.125cm % constants to save tokens +\newdimen\pingu@one \pingu@one=1mm + +\newdimen\pingu@w@half \pingu@w@half=.9375cm +\newdimen\pingu@head@h@half \pingu@head@h@half=.9\pingu@w@half +\newdimen\pingu@side@h@half \pingu@side@h@half=1.275cm +\newdimen\pingu@bend \pingu@bend=\pingu@one@eight +\newdimen\pingu@lower@off \pingu@lower@off=.25cm +\newdimen\pingu@outer@off \pingu@outer@off=.25cm +\def\basicfeetbend{45} +\newdimen\pingu@foot@outer@w \pingu@foot@outer@w=4.5mm +\newdimen\pingu@foot@outer@h \pingu@foot@outer@h=.25cm + +\newdimen\pingu@headcon@x \pingu@headcon@x=.39375cm% .75*.525cm +\newdimen\pingu@headcon@y \pingu@headcon@y=.46735cm%.719*.65cm + +\newdimen\pingu@foot@inner@w \pingu@foot@inner@w=.55cm +\newdimen\pingu@foot@inner@h \pingu@foot@inner@h=.115cm +\newdimen\pingu@foot@offset@w \pingu@foot@offset@w=-.125cm +\newdimen\pingu@foot@single@w \pingu@foot@single@w=.105cm +\newdimen\pingu@foot@single@h \pingu@foot@single@h=2mm +\def\eyebaseang{38.5} +\newdimen\pingu@eye@shift \pingu@eye@shift=.8mm +\def\pinguanglehl{.93} +\def\pinguanglehr{.07} +% #endregion + +% #region selections +\def\pingu@csappto#1#2{\expandafter\ifx\csname #1\endcsname\@empty\@namedef{#1}{#2}\else\expandafter\g@addto@macro\csname #1\endcsname{, #2}\fi} + +\def\pingu@create@sel@err#1#2{% + \PackageError{\tikzpingus@filename}{There is no '#2' drawer for '#1'. Choose one of '\@nameuse{@pingu@#1@}'}{Or ask the package maintainer :D}% +} + +\def\pingu@@select#1#2{\expandafter\let\csname @pingu@drawer@#2@\expandafter\endcsname\csname @pingu@drawer@#2@#1@\endcsname +\expandafter\def\csname @pingu@select@#2@\expandafter\endcsname{#1}} + +% #1 name | none default +\def\pingu@create@selection#1#2{% + \expandafter\newcount\csname pc@#1@max\endcsname + \expandafter\let\csname @pingu@#1@\endcsname\@empty + \expandafter\long\expandafter\def\csname pingu@#1@add\endcsname##1##2{% + \ifcsname @pingu@drawer@#1@##1@\endcsname\else% do not re-append! + \pingu@csappto{@pingu@#1@}{"##1"} + \expandafter\global\expandafter\advance\csname pc@#1@max\endcsname1\relax\fi + \expandafter\long\expandafter\def\csname @pingu@drawer@#1@##1@\endcsname{##2}% + } + \expandafter\def\csname pingu@#1@select\endcsname##1{% + \def\@tmp{##1}\ifx\@pingu@random\@tmp% if random is selected, we choose random from pack in @pingu@#1@ + % we could do this with pgfmathdeclarerandomlist, but this requires more, + % at the moment, i do not care about efficiency, and we do a foreach + % we do not pick none for random + \edef\@arr{{\csname @pingu@#1@\endcsname}}% + % we use 1 as minimum, because 0 is ALWAYS 'none' by definition + \pgfmathrandominteger{\@ars}{1}{\csname pc@#1@max\endcsname-1}% + \pgfmathsetmacro\@sel{\@arr[\@ars]}% + \expandafter\pingu@@select\expandafter{\@sel}{#1}% consolidate the choice in case of multiple + \else\ifcsname @pingu@drawer@#1@##1@\endcsname + \pingu@@select{##1}{#1}% + \else\pingu@create@sel@err{#1}{##1}\fi\fi + }% + \csname pingu@#1@add\endcsname{none}{#2}% +} +\def\@pingu@random{!random} + +\long\def\pingu@create@extra#1#2#3{\expandafter\newif\csname if@pingu@x@#1@\endcsname\pgfqkeys{/pingu}{#2,extra defaults/.append style={#3}}} +\def\pingu@set@extra#1#2{\csname @pingu@x@#1@#2\endcsname} + +\pingu@create@selection{lefteye}{% + \path ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left);% +} +\pingu@create@selection{righteye}{% + \path ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right);% +} +\pingu@create@selection{leftwing}{% + \path ([yshift=-6.5mm]\pingu@name-wings-side-left) + coordinate (\pingu@name-wing-left-start) + coordinate (\pingu@name-wing-left-tip) + coordinate (\pingu@name-wing-left);% +} +\pingu@create@selection{rightwing}{% + \path ([yshift=-6.5mm]\pingu@name-wings-side-right) + coordinate (\pingu@name-wing-right-start) + coordinate (\pingu@name-wing-right-tip) + coordinate (\pingu@name-wing-right);% +} +\pingu@create@selection{hairstyle}{} +\pingu@create@selection{bill}{% + \coordinate (\pingu@name-bill-bottom) at (\pingu@name-bill);% +} +\pingu@create@selection{leftfoot}{} +\pingu@create@selection{rightfoot}{} +\pingu@create@selection{bodytype}{\pingu@x@bodytype@none} +% #endregion + +% #region key setup +\def\pingu@color#1#2{\expandafter\def\csname pingu@color@#1\endcsname{#2}} + +% HACK: store scale +\pgfqkeys{/tikz}{scale/.append code={\def\pingu@default@scale{#1}}} +\def\pingu@default@scale{1} + +\newif\if@pingu@draw@metadots +\newif\if@pingu@wi@flip@left +\newif\if@pingu@wi@flip@right +\newif\if@pingu@feet@front + +\pgfqkeys{/pingu}{ + /pingu/.search also={/tikz,/pgf}, + name/.code = \def\pingu@name{#1}, + scale/.code = \def\pingu@scale{#1}, + @post/.code = \def\pingu@post{#1}, + @body@app/.code = \def\pingu@body@app{#1}, + meta dots/.forward to = /pingu/meta-dots, + meta-dots/.is if = @pingu@draw@metadots, + meta-dots/.default = true, + @pingu@all/.style = {}, + @block/.style = {/pingu/@pingu@all=#1, fill=#1}, + @draw/.style = {/pingu/@pingu@all=#1, cap=round, draw=#1}, + @text/.style = {transform shape,text=\pingu@color@body@main}, + @clip even odd rule/.code = {\pgfseteorule}, % Credit to Andrew Stacey + @invclip/.style = {clip,insert path=[/pingu/@clip even odd rule]{[reset cm](-\maxdimen,-\maxdimen)rectangle(\maxdimen,\maxdimen)}}, + @pingu/.style = {}, @pingu@main/.style = {}, + % feet + left foot color/.code = \pingu@color{foot@left}{#1}, + left foot/.code = \pingu@leftfoot@select{#1}, + right foot color/.code = \pingu@color{foot@right}{#1}, + right foot/.code = \pingu@rightfoot@select{#1}, + feet/.style = {/pingu/left foot={#1}, /pingu/right foot={#1}}, + feet color/.style = {/pingu/left foot color={#1}, /pingu/right foot color={#1}}, + feet front/.is if = @pingu@feet@front, + % body + body type/.code = \pingu@bodytype@select{#1}, + body main/.code = \pingu@color{body@main}{#1}, + body head/.code = \pingu@color{body@head}{#1}, + body/.style = {/pingu/body main={#1}, /pingu/body head={#1}}, + body front/.code = \pingu@color{body@front}{#1}, + % belly + belly/.forward to = /pingu/belly text, + belly text/.style = {/pingu/belly raw={\node[/pingu/@text,opacity=.2] {#1};}}, + belly raw/.code = \def\pingu@belly@raw{#1}, + heart/.style = {/pingu/belly raw={\node[/pingu/@text,#1] {\Large\faHeart};}}, + % eyes + left eye/.code = \pingu@lefteye@select{#1}, + left eye color/.code = \pingu@color{eye@left}{#1}, + left eye second color/.code = \pingu@color{eye@second@left}{#1}, + right eye/.code = \pingu@righteye@select{#1}, + right eye color/.code = \pingu@color{eye@right}{#1}, + right eye second color/.code = \pingu@color{eye@second@right}{#1}, + eyes/.style = {/pingu/left eye={#1}, /pingu/right eye={#1}}, + eyes color/.style = {/pingu/left eye color={#1}, /pingu/right eye color={#1}}, + eyes second color/.style = {/pingu/left eye second color={#1}, /pingu/right eye second color={#1}}, + % wings + left wing color/.code = \pingu@color{left@wing}{#1}, + left wing/.code = \pingu@leftwing@select{#1}, + right wing color/.code = \pingu@color{right@wing}{#1}, + right wing/.code = \pingu@rightwing@select{#1}, + wings/.style = {/pingu/left wing={#1}, /pingu/right wing={#1}}, + wings color/.style = {/pingu/left wing color={#1}, + /pingu/right wing color={#1}}, + left item angle/.forward to = /pingu/left wing item angle, + left wing item angle/.code = {\def\pingu@wing@left@item@angle@user{#1}},% + left item flip/.forward to = /pingu/left wing item flip, + left wing item flip/.is if = @pingu@wi@flip@left, + right item angle/.forward to = /pingu/right wing item angle, + right item flip/.forward to = /pingu/right wing item flip, + right wing item angle/.code = {\def\pingu@wing@right@item@angle@user{#1}},% + right wing item flip/.is if = @pingu@wi@flip@right, + % bill + bill/.code = \pingu@bill@select{#1}, + bill color/.code = \pingu@color{bill}{#1}, + % hair color TODO: other colors + hair/.forward to = /pingu/hairs color, + hairs/.forward to = /pingu/hairs color, + hair 1 color/.code = \pingu@color{hair@a}{#1}, hair 1/.forward to = /pingu/hair 1 color, + hair 2 color/.code = \pingu@color{hair@b}{#1}, hair 2/.forward to = /pingu/hair 2 color, + hair 3 color/.code = \pingu@color{hair@c}{#1}, hair 3/.forward to = /pingu/hair 3 color, + hair 4 color/.code = \pingu@color{hair@d}{#1}, hair 4/.forward to = /pingu/hair 4 color, + hair 5 color/.code = \pingu@color{hair@e}{#1}, hair 5/.forward to = /pingu/hair 5 color, + hairs color/.style = {/pingu/hair 1 color={#1}, /pingu/hair 2 color={#1}, /pingu/hair 3 color={#1}, + /pingu/hair 4 color={#1}, /pingu/hair 5 color={#1}}, + hair style/.forward to = /pingu/hairstyle, + hairstyle/.code = \pingu@hairstyle@select{#1}, + % size + height/.code = \setlength{\pingu@side@h@half}{#1},% + small height/.forward to = /pingu/small size, small/.forward to = /pingu/small size, + small size/.style = {/pingu/height=11mm}, + normal height/.forward to = /pingu/normal size, normal/.forward to = /pingu/normal size, + normal size/.style = {/pingu/height=1.275cm}, + large height/.forward to = /pingu/large size, large/.forward to = /pingu/large size, + large size/.style = {/pingu/height=15mm}, + random from/.code = {\pgfmathdeclarerandomlist{@tmp}{#1}\pgfmathrandomitem{\@tmp}{@tmp}\edef\tmp{\noexpand\@pingu@set{\@tmp}}\tmp}, + defaults/.style = {% + name=pingu, feet=normal, feet color=pingu@yellow, body=pingu@main, + body type=normal,@post={},@body@app={}, + body front=pingu@white,% + eyes=normal, eyes color=pingu@black, eyes second color=pingu@white, + bill=normal, bill color=pingu@yellow, + wings=normal, wings color=\pingu@color@body@main, + hairstyle=normal, hairs color=\pingu@color@body@main, + belly raw={}, scale=\pingu@default@scale, + left wing item angle=0,right wing item angle=0,extra defaults,user defaults,% + feet front=false% + }, + user defaults/.style = {}, + % will be set individually + extra defaults/.style = {} +} +\def\@pingu@set#1{\pgfqkeys{/pingu}{#1}} +\def\pingudefaults#1{\pgfqkeys{/pingu}{user defaults/.style={#1}}} +\def\pingudefaultsappend#1{\pgfqkeys{/pingu}{user defaults/.append style={#1}}} +% #endregion + +% #region subenvs +\def\pingu@layer#1[#2]{\pgfonlayer{#1}\scope[/pingu/@pingu,#2]} +\def\endpingu@layer{\endscope\endpgfonlayer} +% #endregion + +% #region complete sets and styles +\newif\if@pingu@do@back@ +\pgfqkeys{/pingu}{ + :line/.style = {/pingu/@block/.append style={fill=none,draw=##1!80!black,shade=none,path fading=none}}, + :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}, + :fill/.default = pingu@main, + :ghost parts/.style = {/pingu/@pingu@all/.append style={opacity={#1}}}, + :ghost parts/.default = {.5}, + :ghost/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group}}, + :ghost/.default = {.5}, + :ghost glow/.style = {/pingu/@pingu/.append style={opacity=#1,transparency group},/pingu/@block/.append style={/pingu/@glow}}, + :ghost glow/.default = {.5}, + :devil/.style = {/pingu/devil horns=#1,/pingu/eyes devil=#1}, + :devil/.default = pingu@purple, + :hide/.style = {/pingu/body type=none,/pingu/hair=\@pingu@none,/pingu/feet=none,/pingu/wings=none,/pingu/bill=none,/pingu/eyes=none}, + :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? +}% TODO: draw another penguin that is then drawn above with only back +\let\pingu@back@init@call\@empty +% #endregion + +% #region glows +\ifpengu@setup@glows@ +\usetikzlibrary{fadings}% +\tikzfading[name=pingu@halo fade out,inner color=transparent!0,outer color=transparent!100] +\pgfqkeys{/pingu}{@glow/.style={path fading={pingu@halo fade out},#1}} +\else +\pgfqkeys{/pingu}{@glow/.style={},/pingu/@saber@glow/.style={}} +\fi +% #endregion +% #endregion + +% #region core +% #region path commands +\long\def\pingu@path{\@dblarg\pingu@path@} +\def\pingu@path@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,#2] #3;\fi} +\long\def\pingu@block{\@dblarg\pingu@block@} +\def\pingu@block@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,/pingu/@block=#2] #3;\fi} +\long\def\pingu@draw{\@dblarg\pingu@draw@} +\def\pingu@draw@[#1]#2#3;{\protected@edef\@tmp{#2}\ifx\@tmp\@pingu@none\else\path[#1,/pingu/@draw=#2] #3;\fi} +% #endregion + +\newcommand*\pingu[1][]{% +\ifpengu@setup@manual@layers@\pgfsetlayers{background,main,middle,foreground}\fi\begingroup +\@pingu@do@back@false +\pgfqkeys{/pingu}{defaults, #1}% +\scope[/pingu/@pingu,/pingu/@pingu@main] +\@pingu@drawer@bodytype@ +\pingu@body@app +\path (\pingu@name-head-center)++(0,-.05mm-\pingu@outer@off) coordinate (\pingu@name-bill); + +\scope[shift=(\pingu@name-belly-center)] +\clip[use path=\pingu@whitepingu]; \pingu@belly@raw +\endscope +\coordinate (\pingu@name-head) at (\pingu@w@half,.7375cm); + +\@pingu@drawer@lefteye@ \@pingu@drawer@righteye@ + +\pingu@layer{background}[]\pingu@draw@clothing@behind\endpingu@layer + +\pingu@draw@clothing@middle +\pingu@draw@extras@below + +\@pingu@drawer@hairstyle@ +\if@pingu@feet@front\else\pingu@layer{background}[]\fi +\@pingu@drawer@leftfoot@ \@pingu@drawer@rightfoot@ +\if@pingu@feet@front\else\endpingu@layer\fi + +\@pingu@drawer@leftwing@ \@pingu@drawer@rightwing@ + +\path (\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- + ([turn]\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname:2.45mm) + coordinate (\pingu@name-wing-left-low) -- ([turn]180:4.9mm) + coordinate (\pingu@name-wing-left-up); +\path (\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- + (\pingu@name-wing-left-start) -- + ([turn]-180+\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname:3.45mm) + coordinate (\pingu@name-wing-left-start-low) -- ([turn]180:6.9mm) + coordinate (\pingu@name-wing-left-start-up); +\path (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- + ([turn]-\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname:2.45mm) + coordinate (\pingu@name-wing-right-low) -- ([turn]180:4.9mm) + coordinate (\pingu@name-wing-right-up); +% double path to fix turn +\path (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- + (\pingu@name-wing-right-start) -- + ([turn]180-\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname:3.45mm) + coordinate (\pingu@name-wing-right-start-low) -- ([turn]180:6.9mm) + coordinate (\pingu@name-wing-right-start-up); +\pingu@draw@clothing@main + +\@pingu@drawer@bill@ +\pingu@draw@extras@above +\pingu@draw@wing@items +\endscope +\if@pingu@draw@metadots \@pingu@draw@dots \fi +\pingu@post +\endgroup +\pingu@back@init@call +} +\let\pengu\pingu% as an alias + +% #region lower-pingu +% Note: to be used in clippies +\def\pingu@path@lowerpingu{(0,\pingu@outer@off) +% left side +to[bend right=\pingu@bend] ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) +arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% +% right side +to[bend right=\pingu@bend] ++(0,\pingu@side@h@half+\pingu@outer@off) +arc(0:180:\pingu@w@half{} and \pingu@head@h@half) -- cycle}% arc clip to secure wings +\def\pingu@path@upperpingu{(\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@h@half]} + +% #endregion +% #endregion + +% #region main body parts +% #region body front +% #region normal +\pingu@bodytype@add{normal}{% +\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) +% left side +to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) coordinate (\pingu@name-foot-right) +arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) +coordinate (\pingu@name-bottom-center) +arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) coordinate (\pingu@name-foot-left) +arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% +% right side +to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); +\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@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); + +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm]; +} +% #endregion +% #region none +\def\pingu@x@bodytype@none{% +\path[save path=\pingu@lowerpingu] (0,\pingu@outer@off) +% left side +to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h) coordinate (\pingu@name-foot-right) +arc (270:332:\pingu@foot@inner@w{} and \pingu@foot@inner@h) +coordinate (\pingu@name-bottom-center) +arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) coordinate (\pingu@name-foot-left) +arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)% +% right side +to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\path[save path=\pingu@upperpingu] (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half); +\path[save path=\pingu@whitepingu] (\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@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); +} +% #endregion +% #region chubby +\pingu@bodytype@add{chubby}{% +\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) +% left side +to[bend right=1.65*\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off) +% feety stuff +arc (180:270:\pingu@foot@outer@w{} and \pingu@foot@outer@h-.35mm) coordinate (\pingu@name-foot-right) +arc (270:332:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) +coordinate (\pingu@name-bottom-center) +arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate (\pingu@name-foot-left) +arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h-.35mm)% +% right side +to[bend right=1.65*\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-.97cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.65\pingu@side@h@half); +\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@w@half-2.5\pingu@one,yshift=-4.25mm]\pingu@name-head-center) ; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); + +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; +} +% #endregion +% #region legacy +\pingu@bodytype@add{legacy}{% +\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off) +% left side +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 +% feety stuff +to[out=270,in=270] + coordinate[pos=.3,yshift=-.25mm] (\pingu@name-foot-right) + coordinate[pos=.5,yshift=.875\pingu@one] (\pingu@name-bottom-center) + coordinate[pos=.7,yshift=-.25mm] (\pingu@name-foot-left) +++(2*\pingu@w@half,0) +% right side +to[bend right=1.25*\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,.95\pingu@side@h@half+\pingu@outer@off-.65\pingu@one) +% coordinate +coordinate (\pingu@name-wings-side-left) +-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle; + +\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center) +++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top) +arc(90:450:\pingu@w@half{} and \pingu@head@h@half) +coordinate[pos=\pinguanglehr] (\pingu@name-head-right) +coordinate[pos=\pinguanglehl] (\pingu@name-head-left); + +\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-.97cm); +\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.75\pingu@side@h@half+.325\pingu@one); +\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@w@half-2.5\pingu@one,0) to[bend right=14] ([xshift=\pingu@w@half-2.5\pingu@one,yshift=-4.25mm]\pingu@name-head-center) ; + +\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); +\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center); + +\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right); +\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left); + +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; +\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.5mm) ellipse [x radius=.525cm,y radius=.6cm]; +} +% #endregion +% #endregion +% #region eyes +% name core | left | right +\long\def\@pingu@eyes@s#1#2#3{\@ifnextchar[{\@pingu@eyes@s@{#1}{#2}{#3}}{\@pingu@eyes@s@{#1}{#2}{#3}[pingu@black]}} +\long\def\@pingu@eyes@s@#1#2#3[#4]{% + \pgfqkeys{/pingu}{% + left eye #1/.style = {/pingu/left eye={#1}, /pingu/left eye color={##1}},% + left eye #1/.default = {#4},% + right eye #1/.style = {/pingu/right eye={#1}, /pingu/right eye color={##1}},% + right eye #1/.default = {#4},% + eyes #1/.style = {/pingu/eyes={#1}, /pingu/eyes color={##1}},% + eyes #1/.default = {#4}% + }% + \pingu@lefteye@add{#1}{#2}\pingu@righteye@add{#1}{#3}% +} +\pgfqkeys{/pingu}{eyes none/.style={eyes=none},left eye none/.style={left eye=none},right eye none/.style={right eye=none}} % adding the alias + +\@pingu@eyes@s{normal}{% + \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=.1225cm, y radius=.1365cm]; +}{% + \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=.1225cm, y radius=.1365cm]; +} + +\@pingu@eyes@s{vertical}{% + \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]; +}{% + \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]; +} + +\@pingu@eyes@s{shiny}{% + \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=.22cm, y radius=.26cm]; + \pingu@block{\pingu@color@eye@second@left} (\pingu@name-eye-left)++(\eyebaseang:.85mm and \pingu@one) ellipse [x radius=.8mm, y radius=\pingu@one]; + \pingu@block{\pingu@color@eye@second@left} (\pingu@name-eye-left)++(\eyebaseang+180:.12cm and .14cm) ellipse [x radius=.25mm, y radius=.35mm]; +}{% + \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=.22cm, y radius=.26cm]; + \pingu@block{\pingu@color@eye@second@right} (\pingu@name-eye-right)++(\eyebaseang:.85mm and \pingu@one) ellipse [x radius=.8mm, y radius=\pingu@one]; + \pingu@block{\pingu@color@eye@second@right} (\pingu@name-eye-right)++(\eyebaseang+180:.12cm and .14cm) ellipse [x radius=.25mm, y radius=.35mm]; +} + +\@pingu@eyes@s{wink}{% + \coordinate (\pingu@name-eye-left) at ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left); + \pingu@block[rounded corners=.002cm,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; +}{% + \coordinate (\pingu@name-eye-right) at ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right); + \pingu@block[rounded corners=.002cm,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; +} + +\@pingu@eyes@s{shock}{% + \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]; + \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]; +}{% + \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]; + \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]; +} + +% \let\@pingu@eyes@s\relax +% #endregion + +% #region wings +% every wing has to define 1) a base element angle and 2) a marker if before or after the wing +\let\pingu@wi@above\iftrue +\let\pingu@wi@below\iffalse +% name core | left | right | above: \iftrue | angle for items | wing down [left] +\long\def\@pingu@wings@s#1#2#3#4#5#6{% + \pgfqkeys{/pingu}{% + left wing #1/.style = {/pingu/left wing={#1}, /pingu/left wing color={##1}},% + left wing #1/.default = \pingu@color@body@main,% + right wing #1/.style = {/pingu/right wing={#1}, /pingu/right wing color={##1}},% + right wing #1/.default = \pingu@color@body@main,% + wings #1/.style = {/pingu/wings={#1}, /pingu/wings color={##1}},% + wings #1/.default = \pingu@color@body@main% + }% + \expandafter\def\csname @pingu@wing@str@#1@\endcsname{#1}% + \pingu@leftwing@add{#1}{#2}\pingu@rightwing@add{#1}{#3}% + \expandafter\let\csname @pingu@wingitem@#1@\endcsname#4\relax + \expandafter\def\csname @pingu@wingangle@items@#1@\endcsname{#5}% + \expandafter\def\csname @pingu@wingdown@#1@\endcsname{#6}% +} +\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 +\let\@pingu@wingitem@none@\pingu@wi@above +\def\@pingu@wingangle@items@none@{90} +\def\@pingu@wingdown@none@{90} + +% #region wings-normal +\@pingu@wings@s{normal}{% + \coordinate (\pingu@name-wing-left-start) at ([yshift=-6.5mm]\pingu@name-wings-side-left); +\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers + \pgfinterruptboundingbox + \path[/pingu/@invclip] \pingu@path@lowerpingu; + \endpgfinterruptboundingbox + \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); +\endscope}{% +\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.5mm]\pingu@name-wings-side-right); +\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers + \pgfinterruptboundingbox + \path[/pingu/@invclip] \pingu@path@lowerpingu; + \endpgfinterruptboundingbox + \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); +\endscope}{\pingu@wi@above}{-5}{-70} +% #endregion +% #region wings-wave +\@pingu@wings@s{wave}{% + \coordinate (\pingu@name-wing-left-start) at ([yshift=-5.85mm]\pingu@name-wings-side-left); + \scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers + \pgfinterruptboundingbox + \path[/pingu/@invclip] \pingu@path@lowerpingu; + \endpgfinterruptboundingbox + \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); + \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; + \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; + \endscope}{% + \coordinate (\pingu@name-wing-right-start) at ([yshift=-5.85mm]\pingu@name-wings-side-right); +\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers + \pgfinterruptboundingbox + \path[/pingu/@invclip] \pingu@path@lowerpingu; + \endpgfinterruptboundingbox + \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); + \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; + \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; +\endscope}{\pingu@wi@above}{-10}{-110} +% #endregion +% #region wings-raise +\@pingu@wings@s{raise}{% +\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.25mm]\pingu@name-wings-side-left); +\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers +\pgfinterruptboundingbox +\path[/pingu/@invclip] \pingu@path@lowerpingu; +\endpgfinterruptboundingbox + \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); +\endscope}{% +\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers + \pgfinterruptboundingbox + \path[/pingu/@invclip] \pingu@path@lowerpingu; + \endpgfinterruptboundingbox + \coordinate (\pingu@name-wing-right-start) at ([yshift=-6.25mm]\pingu@name-wings-side-right); + \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); +\endscope}% +{\pingu@wi@above}{0}{-126} +% #endregion +% #region wings-grab +\@pingu@wings@s{grab}{% +\pingu@layer{foreground}[] + \clip[use path=\pingu@lowerpingu]; + \coordinate (\pingu@name-wing-left-start) at ([yshift=-4.5mm]\pingu@name-wings-side-left); + \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); +\endpingu@layer}{% +\pingu@layer{foreground}[] + \clip[use path=\pingu@lowerpingu]; + \coordinate (\pingu@name-wing-right-start) at ([yshift=-4.5mm]\pingu@name-wings-side-right); + \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); +\endpingu@layer}% +{\pingu@wi@below}{12}{60} +% #endregion +% #region wings-shock +\@pingu@wings@s{shock}{% +\pingu@layer{foreground}[] + \clip[use path=\pingu@lowerpingu]; + \coordinate (\pingu@name-wing-left-start) at ([yshift=-6.5mm]\pingu@name-wings-side-left); + \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); +\endpingu@layer}{% +\pingu@layer{foreground}[] + \clip[use path=\pingu@lowerpingu]; + \coordinate (\pingu@name-wing-right-start) at ([yshift=-6.5mm]\pingu@name-wings-side-right); + \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); +\endpingu@layer}% +{\pingu@wi@below}{-180}{116} +% #endregion +% #region wings-hug +\@pingu@wings@s{hug}{% +\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.25mm]\pingu@name-wings-side-left); +\scope[xshift=-\p@] % shift to avoid rounding errors in pdf viewers +\pgfinterruptboundingbox +\path[/pingu/@invclip] \pingu@path@lowerpingu; +\endpgfinterruptboundingbox +\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); +\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; +\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; +\endscope}{% +\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.25mm]\pingu@name-wings-side-right); +\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers +\pgfinterruptboundingbox +\path[/pingu/@invclip] \pingu@path@lowerpingu; +\endpgfinterruptboundingbox +\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); +\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; +\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; +\endscope}{\pingu@wi@above}{-30}{-62} +\let\@pingu@wings@s\relax +% #endregion +% #endregion + +% #region hairstyle +\pgfqkeys{/pingu}{hairstyle none/.style={/pingu/hairstyle=none}} +\pingu@hairstyle@add{normal}{% +\scope\pgfinterruptboundingbox +\clip[/pingu/@invclip] (\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@h@half-.0165mm]; +\endpgfinterruptboundingbox +\scope[rounded corners=.08mm] +\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); +\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); +\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); +\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); +\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); +\endscope\endscope} +% #endregion + +% #region feet +\long\def\@pingu@feet@s#1#2#3{\@ifnextchar[{\@pingu@feet@s@{#1}{#2}{#3}}{\@pingu@feet@s@{#1}{#2}{#3}[pingu@yellow]}} +\long\def\@pingu@feet@s@#1#2#3[#4]{% + \pgfqkeys{/pingu}{% + left foot #1/.style = {/pingu/left foot={#1}, /pingu/left foot color={##1}},% + left foot #1/.default = {#4},% + right foot #1/.style = {/pingu/right foot={#1}, /pingu/right foot color={##1}},% + right foot #1/.default = {#4},% + feet #1/.style = {/pingu/feet={#1}, /pingu/feet color={##1}},% + feet #1/.default = {#4}% + }% + \pingu@leftfoot@add{#1}{#2}\pingu@rightfoot@add{#1}{#3}% +} +\pgfqkeys{/pingu}{feet none/.style={/pingu/feet=none}, /left foot none/.style={/pingu/left foot=none}, right foot none/.style={/pingu/right foot=none}} + +\@pingu@feet@s{normal}{% + \coordinate (@tmp) at ([xshift=-.5\pingu@foot@single@h]\pingu@name-foot-left); + \pingu@block[rotate around={-25+\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} (@tmp) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; + \pingu@block[rotate around={\basicfeetbend:(\pingu@name-foot-left)}]{\pingu@color@foot@left} (\pingu@name-foot-left) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; + \coordinate (@tmp) at ([xshift= .5\pingu@foot@single@h]\pingu@name-foot-left); + \pingu@block[rotate around={25+\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} (@tmp) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; +}{% + \coordinate (@tmp) at ([xshift=-.5\pingu@foot@single@h]\pingu@name-foot-right); + \pingu@block[rotate around={-25-\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} (@tmp) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; + \pingu@block[rotate around={-\basicfeetbend:(\pingu@name-foot-right)}]{\pingu@color@foot@right} (\pingu@name-foot-right) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; + \coordinate (@tmp) at ([xshift= .5\pingu@foot@single@h]\pingu@name-foot-right); + \pingu@block[rotate around={25-\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} (@tmp) ellipse [x radius=\pingu@foot@single@w,y radius=\pingu@foot@single@h]; +} + + +\@pingu@feet@s{sit}{% +\pingu@layer{foreground}[] + \coordinate (@tmp) at ([xshift=-.35\pingu@foot@single@h,yshift=-.4mm]\pingu@name-foot-left); + \pingu@block[rotate around={\basicfeetbend:(@tmp)}]{\pingu@color@foot@left} (@tmp) + 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; +\endpingu@layer +}{% +\pingu@layer{foreground}[xscale=-1] + \coordinate (@tmp) at ([xshift=-.35\pingu@foot@single@h,yshift=-.5mm]\pingu@name-foot-right); + \pingu@block[rotate around={\basicfeetbend:(@tmp)}]{\pingu@color@foot@right} (@tmp) + 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; +\endpingu@layer +} + +\@pingu@feet@s{simple}{% + \pingu@block[rotate around={-\basicfeetbend:(\pingu@name-foot-left)}]{\pingu@color@foot@left} (\pingu@name-foot-left) ellipse [x radius=2.66\pingu@foot@single@w,y radius=\pingu@foot@single@h]; +}{% + \pingu@block[rotate around={\basicfeetbend:(\pingu@name-foot-right)}]{\pingu@color@foot@right} (\pingu@name-foot-right) ellipse [x radius=2.66\pingu@foot@single@w,y radius=\pingu@foot@single@h]; +} + +\@pingu@feet@s{back}{% + \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]; +}{% + \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]; +} + +\@pingu@feet@s{chubby}{% +\pingu@layer{foreground}[rotate around={-\basicfeetbend+45:(\pingu@name-foot-left)}] + \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; + \ifx\pingu@color@foot@left\@pingu@none\else + \colorlet{@}{\pingu@color@foot@left!80!\pingu@color@body@main} + \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; + \pingu@draw{@} (@) to[bend right=4] ++(.125mm,.75mm); + \pingu@draw{@} (@b) to[bend right=9] ++(.15mm,1.15mm); + \fi +\endpingu@layer +}{% +\pingu@layer{foreground}[rotate around={-\basicfeetbend+45:(\pingu@name-foot-right)}] + \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; + \ifx\pingu@color@foot@right\@pingu@none\else + \colorlet{@}{\pingu@color@foot@right!80!\pingu@color@body@main} + \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; + \pingu@draw{@} (@) to[bend left=4] ++(-.125mm,.75mm); + \pingu@draw{@} (@b) to[bend left=9] ++(-.15mm,1.15mm); + \fi +\endpingu@layer +} +% #endregion + +% #region bill +% name core | main +\long\def\@pingu@bill@s#1#2{% + \pgfqkeys{/pingu}{% + bill #1/.style = {/pingu/bill={#1}, /pingu/bill color={##1}},% + bill #1/.default = pingu@yellow% TODO: defaults + }% + \pingu@bill@add{#1}{#2}% +} +\pgfqkeys{/pingu}{bill none/.style={/pingu/bill=none}} + +\@pingu@bill@s{normal}{% +\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) + arc (180:360:.19cm and .225cm) + coordinate[pos=.5] (\pingu@name-bill-bottom) + to[bend right=.25cm] cycle; +} + +\@pingu@bill@s{foreground}{% +\pingu@layer{foreground}[] +\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) + arc (180:360:.19cm and .225cm) + coordinate[pos=.5] (\pingu@name-bill-bottom) + to[bend right=.25cm] cycle; +\endpingu@layer +} + +\@pingu@bill@s{flat}{% +\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0) + arc (180:360:.19cm and .225cm) + coordinate[pos=.5] (\pingu@name-bill-bottom) + -- cycle; +} + +% #endregion +% #endregion + +% #region dots +\def\@pingu@draw@dots{% +\pingu@layer{foreground}[] + % mark wing outer + \path[draw,pink,thick] (\pingu@name-wing-left-start-low) --(\pingu@name-wing-left-start) -- (\pingu@name-wing-left) -- (\pingu@name-wing-left-low); + \path[draw,pink,thick] (\pingu@name-wing-right-start-low) -- (\pingu@name-wing-right-start) -- (\pingu@name-wing-right) -- (\pingu@name-wing-right-low); + \@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{ + \path[fill=green] (\pingu@name-\@pingu@elem) circle[radius=1.125\p@]; + } + \@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{ + \path[fill=yellow] (\pingu@name-\@pingu@elem) circle[radius=1.125\p@]; + } + % mark wing items + \csname @pingu@wingitem@\@pingu@select@leftwing@ @\endcsname \colorlet{@wmark}{magenta} \else \colorlet{@wmark}{teal} \fi + \pingu@block[/pingu/@draw=@wmark,thick,rotate around={\csname @pingu@wingangle@items@\@pingu@select@leftwing@ @\endcsname:(\pingu@name-wing-left)}]{@wmark} + (\pingu@name-wing-left)++(0,3mm) circle [radius=\pingu@one] -- ++(0,-6mm); + \csname @pingu@wingitem@\@pingu@select@rightwing@ @\endcsname \colorlet{@wmark}{magenta} \else \colorlet{@wmark}{teal} \fi + \pingu@block[/pingu/@draw=@wmark,thick,rotate around={-\csname @pingu@wingangle@items@\@pingu@select@rightwing@ @\endcsname:(\pingu@name-wing-right)}]{@wmark} + (\pingu@name-wing-right)++(0,3mm) circle [radius=\pingu@one] -- ++(0,-6mm); +\endpingu@layer} +% endregion +% #region extras +% #region extras below +\def\pingu@@xif@eb#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@eb@#2\endcsname\fi} +\def\pingu@xif@eb#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@eb{#1}{#2}}\fi} +\def\pingu@draw@extras@below{% + \pingu@xif@eb{devilwings}{devilwings}% + \pingu@xif@eb{glow}{glow}% + \pingu@xif@eb{tie}{tie}% + \pingu@xif@eb{pants}{pants}% + \pingu@xif@eb{medal}{medal}% + \pingu@xif@eb{bowtie}{bowtie}% + \pingu@xif@eb{cup}{cup}% + \pingu@xif@eb{blush}{blush}% + \pingu@xif@eb{eyepatchleft}{eyepatch@l}% + \pingu@xif@eb{eyepatchright}{eyepatch@r}% + \pingu@xif@eb{monocleleft}{monocle@l}% + \pingu@xif@eb{monocleright}{monocle@r}% +} +% #region cup +\pingu@create@extra{cup}{% + % extra cup % TODO: as selection + cup/.code = {\pingu@set@extra{cup}{true}\pingu@color{cup}{#1}}, + cup/.default = pingu@green, + cup straw/.code = \pingu@color{cup@straw}{#1}% +}{cup straw=\pingu@color@cup} + +\def\pingu@draw@eb@cup{% + \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); + \path (\pingu@name-belly-center)++(0,.275cm) -- (\pingu@name-bill) coordinate[pos=.5,xshift=-2mm] (\pingu@name-cup-straw-outer-angle); + \path (\pingu@name-belly-center)++(-.115cm,.275cm) coordinate (\pingu@name-straw-outer-start); + \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; + \pingu@block{\pingu@color@cup} (\pingu@name-belly-center)++(0,.275cm) ellipse [x radius=.325cm,y radius=.5mm]; +} +% #endregion + +% #region eye patch +% #region eye patch left +\pingu@create@extra{eyepatchleft}{% + eyepatch left/.forward to = /pingu/eye patch left, + eye-patch left/.forward to = /pingu/eye patch left, + eye patch left/.code = \pingu@set@extra{eyepatchleft}{true}\pingu@color{eyepatchleft}{#1}, + eye patch left/.default = \pingu@color@body@main, +}{} + +\newlength\pingu@patchw \pingu@patchw=6.5pt +\def\pingu@draw@eb@eyepatch@l{% + \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); + \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]; + \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); +} +% #endregion +% #region eye patch right +\pingu@create@extra{eyepatchright}{% + eyepatch right/.forward to = /pingu/eye patch right, + eye-patch right/.forward to = /pingu/eye patch right, + eye patch right/.code = \pingu@set@extra{eyepatchright}{true}\pingu@color{eyepatchright}{#1}, + eye patch right/.default = \pingu@color@body@main, +}{} + +\def\pingu@draw@eb@eyepatch@r{% + \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); + \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]; + \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); +} +% #endregion +% #endregion + +% #region glow +\pingu@create@extra{glow}{% + glow/.code = \pingu@set@extra{glow}{true}\pingu@color{glow}{#1}, + glow/.default = pingu@white, + glow thick/.style = {/pingu/glow={#1}, /pingu/glow width function={3.5mm-1.25*\i mm}}, + glow steps/.code = \def\pingu@x@extra@glow@steps{#1}, + glow function/.code = \def\pingu@x@extra@glow@func{#1}, + glow width function/.code = \def\pingu@x@extra@glow@width@func{#1}, + glow solid/.style = {/pingu/glow={#1},/pingu/glow function={1},/pingu/glow steps={1.2,1.3}} +}{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}} + +\def\pingu@draw@eb@glow{% + \pingu@layer{background}[] + \@for\i:={\pingu@x@extra@glow@steps}\do{ + \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] + \pingu@draw{\pingu@color@glow} \pingu@path@lowerpingu; + % todo: disable re set of coordinates + % only draw, if not ofset + \csname @pingu@wingitem@\@pingu@select@leftwing@ @\endcsname\@pingu@drawer@leftwing@\fi + \csname @pingu@wingitem@\@pingu@select@rightwing@ @\endcsname\@pingu@drawer@rightwing@\fi + \endscope + } + \endpingu@layer +} +% #endregion +% #endregion + +% #region extras above +% NOTE: No auto append to allow easy order change +\def\pingu@@xif@ea#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@ea@#2\endcsname\fi} +\def\pingu@xif@ea#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@ea{#1}{#2}}\fi} +\def\pingu@draw@extras@above{% + \pingu@xif@ea{cap}{cap}% + \pingu@xif@ea{eyeframe}{eyeframe}% + \pingu@xif@ea{mask}{mask}% + \pingu@xif@ea{glasses}{glasses}% + \pingu@xif@ea{glassesround}{glassesround}% + \pingu@xif@ea{devilhorns}{devilhorns}% + \pingu@xif@ea{headband}{headband}% + \pingu@xif@ea{strawhat}{strawhat}% + \pingu@xif@ea{hat}{hat}% + \pingu@xif@ea{constructionhelmet}{constructionhelmet}% + \pingu@xif@ea{conicalhat}{conicalhat}% + \pingu@xif@ea{crown}{crown}% + \pingu@xif@ea{cakehat}{cakehat}% + \pingu@xif@ea{pumpkinhat}{pumpkinhat}% + \pingu@xif@ea{princesscrown}{princesscrown}% + \pingu@xif@ea{rook}{rook}% + \pingu@xif@ea{halo}{halo}% + \pingu@xif@ea{vrheadset}{vrheadset}% + \pingu@xif@ea{headphone}{headphone}% + \pingu@xif@ea{sheriffstar}{sheriffstar}% + \pingu@xif@ea{santahat}{santahat}% + \pingu@xif@ea{santabeard}{santabeard}% + \pingu@xif@ea{banner}{banner}% +} +% #region halo +\newif\if@pingu@x@halo@glow +\newif\if@pingu@x@halo@above +\pingu@create@extra{halo}{% + halo/.code = \pingu@set@extra{halo}{true}\pingu@color{halo}{#1}, + halo/.default = pingu@lightblue, + halo raise/.code = \def\pingu@x@halo@raise{#1}, + halo above/.is if = @pingu@x@halo@above, + halo glow/.is if = @pingu@x@halo@glow% only active if glows loaded +}{halo glow=\ifpengu@setup@glows@ true\else false\fi,halo raise=0mm,halo above=false} + +\def\pingu@draw@ea@halo{% +\if@pingu@x@halo@above\pingu@layer{foreground}[]\fi +\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@w@half-1.95mm,y radius=1.55mm]; +\if@pingu@x@halo@glow +\pingu@block[even odd rule,/pingu/@glow]{\pingu@color@halo} ([yshift=\pingu@x@halo@raise]\pingu@name-head-top) ellipse [x radius=(\pingu@w@half-1.95mm)*1.7,y radius=1.55mm*2.35] ellipse [x radius=\pingu@w@half-1.95mm,y radius=1.55mm]; +\fi +\if@pingu@x@halo@above\endpingu@layer{foreground}\fi +} +% #endregion + +% #region eye frame +\pingu@create@extra{eyeframe}{% + % extra halo + eyeframe/.forward to = /pingu/eye frame, + eye-frame/.forward to = /pingu/eye frame, + eye frame/.code = \pingu@set@extra{eyeframe}{true}\pingu@color{eyeframe}{#1}, + eye frame/.default = pingu@black, +}{} + +\def\pingu@draw@ea@eyeframe{% + \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; + \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; +} +% #endregion + +% #region sheriff star +\pingu@create@extra{sheriffstar}{% + sheriff star/.code = \pingu@set@extra{sheriffstar}{true}\pingu@color{sheriffstar}{#1}, + sheriff star/.default = pingu@yellow, + sheriff star content/.code = \def\pingu@x@sheriff@star@content{#1}, + sheriff star lines/.code = \pingu@color{sheriffstar@lines}{#1}, +}{sheriff star content={\resizebox{2.25mm}!{\textsf{\bfseries Sheriff}}},sheriff star lines=pingu@black!92!\pingu@color@sheriffstar} + +\def\pingu@draw@ea@sheriffstar{% +\pingu@layer{middle}[] +\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] (@) {}; +\foreach \i in {1,...,7} { + \pingu@block{\pingu@color@sheriffstar!98!pingu@black} (@.outer point \i) circle [radius=.2mm]; +} + +\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}; +\pingu@draw[line width=.002mm]{\pingu@color@sheriffstar@lines} (@s.north east) -- (@s.north west); +\pingu@draw[line width=.002mm]{\pingu@color@sheriffstar@lines} (@s.south east) -- (@s.south west); +\endpingu@layer} +% #endregion + +% #endregion +% #endregion + +% #region wingitems +% #region wingitems-setup +\def\pingu@may@draw@wing#1#2{\csname if@pingu@x@#1#2@\endcsname \csname pingu@draw@wi@#1\endcsname{#2}\fi} +\edef\pingu@str@wing@left{left} +\let\@pingu@wingitems@\@empty +\newif\if@pingu@wing@item@side@left@ +\def\pingu@setup@wing#1#2{% + \edef\@tmpa{#2}% minus on left + \ifx\pingu@str@wing@left\@tmpa + \expandafter\def\expandafter\@angle{\csname @pingu@wingangle@items@\csname @pingu@select@#2wing@\endcsname @\endcsname+\pingu@wing@left@item@angle@user}% + \def\@sidesign{1}% + \if@pingu@wi@flip@left \@pingu@wing@item@side@left@false \else \@pingu@wing@item@side@left@true\fi + \else + \expandafter\def\expandafter\@angle{-(\csname @pingu@wingangle@items@\csname @pingu@select@#2wing@\endcsname @\endcsname+\pingu@wing@right@item@angle@user)}% + \def\@sidesign{-1}% + \if@pingu@wi@flip@right \@pingu@wing@item@side@left@true \else \@pingu@wing@item@side@left@false\fi + \fi + \expandafter\def\expandafter\@col{\csname pingu@color@#1#2\endcsname}% +} + +\def\pingu@draw@wing@items{% +\pingu@layer{middle}[]\@pingu@draw@wing@items@left\endpingu@layer +\pingu@layer{middle}[]\@pingu@draw@wing@items@right\endpingu@layer +} + +\let\@pingu@draw@wing@items@left\@empty +\let\@pingu@draw@wing@items@right\@empty + +\def\pingu@create@wing@extra#1#2#3{% +\pingu@csappto{@pingu@wingitems@}{#1}% +\expandafter\def\expandafter\@pingu@draw@wing@items@left\expandafter{\@pingu@draw@wing@items@left\pingu@may@draw@wing{#1}{left}}% +\expandafter\def\expandafter\@pingu@draw@wing@items@right\expandafter{\@pingu@draw@wing@items@right\pingu@may@draw@wing{#1}{right}}% +\def\@lr{left}% +\protected@edef\@tmp{\expandafter\expandafter\expandafter\expandafter\expandafter\unexpanded{{#1left}{#2}{#3}}}% +\expandafter\pingu@create@extra\@tmp +\def\@lr{right}% +\protected@edef\@tmp{\expandafter\expandafter\expandafter\expandafter\expandafter\unexpanded{{#1right}{#2}{#3}}}% +\expandafter\pingu@create@extra\@tmp} +% #endregion + +% #region cane +\pingu@create@wing@extra{cane}{% + cane \@lr/.code = {\pingu@set@extra{cane\@lr}{true}\pingu@color{cane\@lr}{##1}}, + cane \@lr/.default = pingu@bronze, + cane \@lr\space raise/.code = {\@namedef{pinug@x@cane@raise@\@lr}{##1}}, + cane \@lr\space length/.code = {\@namedef{pinug@x@cane@length@\@lr}{##1}}, +}{cane \@lr\space raise=0mm,cane \@lr\space length=15mm} + +% #1 wing +\def\pingu@draw@wi@cane#1{% + \pingu@setup@wing{cane}{#1}% + \if@pingu@wing@item@side@left@ + \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; + \else + \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; + \fi +} +% #endregion + +% #region staff +\pingu@create@wing@extra{staff}{% + staff \@lr/.code = {\pingu@set@extra{staff\@lr}{true}\pingu@color{staff\@lr}{##1}}, + staff \@lr/.default = pingu@bronze, + staff \@lr\space length/.code =\expandafter\def\csname pingu@staff@\@lr @length\endcsname{##1}, +}{staff \@lr\space length=28mm} +\def\pingu@draw@wi@staff#1{% + \pingu@setup@wing{staff}{#1}% +\scope[rotate around={\@angle:(\pingu@name-wing-#1)}] + \pingu@block{\csname pingu@color@staff#1\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-11mm) -- ++(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; +\endscope +} +% #endregion +% #endregion + +% #region clothes +\def\pingu@@xif@cloth#1#2{\csname if@pingu@x@#1@\endcsname\csname pingu@draw@cloth@#2\endcsname\fi} +\def\pingu@xif@cloth#1#2{\ifcsname if@pingu@x@#1@\endcsname{\pingu@@xif@cloth{#1}{#2}}\fi} +\def\pingu@draw@clothing@behind{% + \pingu@xif@cloth{secondshirt}{secondshirt@behind}% + \pingu@xif@cloth{shirt}{shirt@behind}% + \pingu@xif@cloth{cloak}{cloak@behind}% +} + +\def\pingu@draw@clothing@middle{% + \pingu@xif@cloth{secondshirt}{secondshirt@middle}% + \pingu@xif@cloth{shirt}{shirt@middle}% + \pingu@xif@cloth{cloak}{cloak@middle}% +} + +\def\pingu@draw@clothing@main{% + \pingu@xif@cloth{secondshirt}{secondshirt}% + \pingu@xif@cloth{shirt}{shirt}% + \pingu@xif@cloth{cloak}{cloak}% +} +% #endregion + +\def\pingu@@dummy@lib#1#2{% + \pgfqkeys{/pingu}{#1/.code={\PackageError{\tikzpingus@filename}{To use '#1' you need to load the '#2' library via '\string\pinguloadlibrary{#2}'}}}% + \expandafter\def\csname pingu@@lib@#1@\endcsname{#2}% +} +\def\pingu@@dummy@selector#1#2#3{% + \expandafter\csname pingu@#3@add\endcsname{#1}{\PackageError{\tikzpingus@filename}{To use '#1' with '#3' you need to load the '#2' library via '\string\pinguloadlibrary{#2}'}}% + \expandafter\def\csname pingu@@lib@#1@#3@\endcsname{#2}% +} +\def\pingu@dummy@lib#1#2{\edef\tmp@list{#2}\@for\@current:=\tmp@list\do{\expandafter\pingu@@dummy@lib\expandafter{\@current}{#1}}\xappto\pingu@defaultlibs{,{#1}/{#2}}\xappto\pingu@@defaultlibs{,#1}}% +% library | selector | keys +\def\pingu@dummy@selector#1#2#3{\edef\tmp@list{#3}\@for\@current:=\tmp@list\do{\expandafter\pingu@@dummy@selector\expandafter{\@current}{#1}{#2}}} +\def\pingu@defaultlibs{}\def\pingu@@defaultlibs{} +\def\pingu@load@library#1{% +% store common catcodes +\expandafter\edef\csname pingu@lib@#1@atcode\endcsname{\the\catcode`\@}% +\expandafter\edef\csname pingu@lib@#1@barcode\endcsname{\the\catcode`\|}% +\expandafter\edef\csname pingu@lib@#1@dollarcode\endcsname{\the\catcode`\$}% +\catcode`\@=11 \catcode`\|=12 \catcode`\$=3\relax +\def\pingu@tmp{tikzpingus-#1.lib.tex}\relax +\InputIfFileExists{\pingu@tmp}{}{\PackageError{\tikzpingus@filename}{There is no '#1' library (searched: '\pingu@tmp')}} +% restore catcodes +\catcode`\@=\csname pingu@lib@#1@atcode\endcsname +\catcode`\|=\csname pingu@lib@#1@barcode\endcsname +\catcode`\$=\csname pingu@lib@#1@dollarcode\endcsname +} +\def\pingu@loadlibrary#1{% +\ifcsname pingu@lib@#1@loaded\endcsname\else% do not load again + \expandafter\let\csname pingu@lib@#1@loaded\endcsname=\@empty + \pingu@load@library{#1}\relax +\fi +} +\def\pinguloadlibrary#1{\edef\tmp@list{#1}\@for\tmp@elem:=\tmp@list\do{\ifx\tmp@elem\@empty\else\pingu@loadlibrary{\tmp@elem}\fi}} +\let\pinguloadlibraries\pinguloadlibrary + +\pingu@dummy@lib{shirts}{shirt,second shirt} +\pingu@dummy@lib{glasses}{glasses,glasses round,monocle left,monocle right} +\pingu@dummy@lib{medieval}{rook,crown,princess crown} +\pingu@dummy@lib{cloak}{cloak,cape} +\pingu@dummy@lib{christmas}{santa hat,santa beard} +\pingu@dummy@lib{science-fiction}{lightsaber left,lightsaber right} +\pingu@dummy@lib{fun}{cake-hat,pumpkin-hat,lollipop left,lollipop right} +\pingu@dummy@lib{technology}{vr-headset,headphone,vr-controller left,vr-controller right,laptop left,laptop right} +\pingu@dummy@lib{flags}{flag left,flag right} +\pingu@dummy@lib{hats}{strawhat,hat,cap,construction helmet,conical hat} +\pingu@dummy@lib{sport}{head band,medal} +\pingu@dummy@lib{formal}{tie,bow tie,pants} +\pingu@dummy@lib{signs}{sign post left,sign post right} +\pingu@dummy@lib{devil}{devil horns,devil wings,devil fork left,devil fork right,eyes devil,left eye devil,right eye devil} +\pingu@dummy@selector{devil}{lefteye}{devil} +\pingu@dummy@selector{devil}{righteye}{devil} +\pingu@dummy@lib{safe}{mask} +\pingu@dummy@lib{magic}{handcast left,handcast right} +\pingu@dummy@lib{movement}{}% register the lib +\pingu@dummy@selector{movement}{bodytype}{tilt-right,tilt-left} +\pingu@dummy@lib{emotions}{eyes sad,left eye sad,right eye sad,eyes angry,left eye angry,right eye angry,eyes hearts,left eye heart,right eye hearts,bill angry,blush} +\pingu@dummy@selector{emotions}{lefteye}{sad,angry,hearts} +\pingu@dummy@selector{emotions}{righteye}{sad,angry,hearts} + +\pingu@dummy@lib{horse}{horse left,horse right} + +\ifpengu@setup@bare@\else +\pinguloadlibraries{\pingu@@defaultlibs} +\fi +\endinput
\ No newline at end of file |