diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzducks/README.md | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf | bin | 388808 -> 463769 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex | 404 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty | 379 |
4 files changed, 597 insertions, 190 deletions
diff --git a/Master/texmf-dist/doc/latex/tikzducks/README.md b/Master/texmf-dist/doc/latex/tikzducks/README.md index 3d6371a71fd..b0ce44c18d0 100644 --- a/Master/texmf-dist/doc/latex/tikzducks/README.md +++ b/Master/texmf-dist/doc/latex/tikzducks/README.md @@ -6,6 +6,8 @@ This project is licensed under the LaTeX Project Public License v1.3c or later, The project repository, including a bug tracker, can be found at https://github.com/samcarter8/tikzducks/issues +![This repository has an official duck seal of approval](https://i.stack.imgur.com/mSAtL.png) + ### A few examples: -![tikz ducks](https://user-images.githubusercontent.com/8226363/29253620-1c4ea2de-8082-11e7-800b-64df42ce6a66.png) +![tikz ducks](https://user-images.githubusercontent.com/8226363/33049537-e71e9dd0-ce60-11e7-8b4c-7e1de0177f14.png) diff --git a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf Binary files differindex 734ace2c07c..c8fd4e3efae 100644 --- a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf +++ b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.pdf diff --git a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex index d7b43a48885..7d5148ff045 100644 --- a/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex +++ b/Master/texmf-dist/doc/latex/tikzducks/tikzducks-doc.tex @@ -10,26 +10,29 @@ % Released under the LaTeX Project Public License v1.3c or later % See http://www.latex-project.org/lppl.txt % -% Version 0.4 -% Sep 04, 2017 +% Version 0.5 +% Nov 21, 2017 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[parskip=half]{scrartcl} % packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage[T1]{fontenc} +\usepackage[LSBC5,T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[bitstream-charter]{mathdesign} +\usepackage{chessfss} \usepackage{tikzducks} \usepackage[most]{tcolorbox} \usepackage[paper=a4paper,margin=3cm]{geometry} +\usepackage{url} \usepackage[colorlinks=true,breaklinks=true,urlcolor=duckblue,linkcolor=duckblue,citecolor=duckblue,filecolor=duckblue]{hyperref} \usepackage{xspace} \usepackage{scrlayer-scrpage} \usepackage{marvosym} \usepackage{fontawesome} \usepackage[hang,flushmargin,bottom]{footmisc} +\usepackage{imakeidx} % macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\CTAN}{\textsc{CTAN}\xspace} @@ -53,13 +56,14 @@ commentstyle={\color{green!50!black}\slshape}, columns=fullflexible, emphstyle=\color{orange!70!black}, - emph=[1]{water,body,head,eye,pupil,bill,grumpy,tshirt,jacket,tie,cape,shorthair,longhair,crazyhair,recedinghair,eyebrow,glasses,sunglasses,alien,hat,cap,santa,chef,graduate,tassel,beret,crown,unicorn,icecream,flavoura,flavourb,flavourc,book,bookcolour,signpost,signcolour,signback,magichat,magicstars,magicwand,witch,cricket,rollingpin,lightsaber,cake,pizza,hockey,baguette,wing,football}, + emph=[1]{water,body,head,eye,pupil,bill,grumpy,tshirt,jacket,tie,cape,shorthair,longhair,crazyhair,recedinghair,eyebrow,beard,glasses,sunglasses,alien,hat,cap,santa,chef,graduate,tassel,beret,crown,unicorn,icecream,flavoura,flavourb,flavourc,book,bookcolour,signpost,signcolour,signback,magichat,magicstars,magicwand,witch,cricket,rollingpin,lightsaber,torch,cake,pizza,hockey,baguette,wing,football,mask,bunny,inear,necklace,milkshake,wine,peakedcap,prison,tophat,speech,bubblecolour,think}, texcsstyle=*\color{duckblue}\bfseries, keywordstyle=\color{red!60!black}\bfseries, morekeywords={tikzpicture,scope,patterns,pgfinterruptboundingbox}, - moretexcs={duck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathcape,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,duckpathcrown,scalebox,foreach,node,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet,insignia,stripes,color,includegraphics,mcap}, + moretexcs={duck,path,definecolor,duckpathjacket,duckpathbody,duckpathgrumpybill,duckpathbill,duckpathtshirt,duckpathcape,duckpathshorthair,duckpathlonghair,duckpathcrazyhair,duckpathrecedinghair,duckpathcrown,scalebox,foreach,node,draw,PassOptionsToPackage,usetikzlibrary,selectcolormodel,colorlet,insignia,stripes,color,includegraphics,mcap,setboardfontcolors,setboardfontencoding,WhiteQueenOnWhite,WhiteKingOnWhite,superstripes,shuffleducks,randuck,randomhead,randomaccessories}, delim ={[s][\ttfamily\color{green!50!black}]{$}{$}}, - escapechar=@, + moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|}, + index=[1][emph] } \tcbset{% @@ -70,7 +74,8 @@ listing options={style=duckstyle}, center lower, righthand width=6.5cm, - bottom=0cm, top=0cm, + bottom=0pt, + top=0pt, before lower={% \setlength{\parskip}{0.5cm}% \spaceskip=5\fontdimen2\font% @@ -78,39 +83,27 @@ } \lstset{style=duckstyle} +\pgfkeys{/duck/|stripes|/.style={stripes={#1}}} -\setlength{\footheight}{27.21881pt} +\pgfmathsetseed{11} +\setlength{\footheight}{45pt} \newlength{\duckoffset} + \cfoot{% - \begin{tikzpicture}[scale=0.3,baseline=-5pt] - \duck - \end{tikzpicture}% - \ifnum\thepage>1% - \foreach \x in{2,...,\thepage}{% - \ifodd\x - \setlength{\duckoffset}{-12pt} - \else% - \setlength{\duckoffset}{-5pt} - \fi% - \begin{tikzpicture}[scale=0.15,baseline=\duckoffset] - \ifnum\x=5 - \duck[body=gray!50!white,head=gray!50!white] - \else - \ifnum\x=10 - \duck[body=gray!50!white,head=gray!50!white] - \else - \ifnum\x=15 - \duck[body=gray!50!white,head=gray!50!white] - \else - \duck - \fi - \fi - \fi - \end{tikzpicture} - }% - \fi% + \shuffleducks + \begin{tikzpicture}[scale=0.5] + \duck[signpost=\scalebox{0.6}{\thepage},\randomhead] + \end{tikzpicture} } \pagestyle{scrheadings} +\indexsetup{firstpagestyle=scrheadings} + +%\ifnum\pdfshellescape=1 +% \usetikzlibrary{external} +% \tikzexternalize[prefix=tikzducks-doc-figures/] +%\fi + +\makeindex % meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \title{The \texorpdfstring{\tikzducks}{tikzducks} package} @@ -125,7 +118,7 @@ \url{https://github.com/samcarter8/tikzducks}\\ \url{https://www.ctan.org/pkg/tikzducks} }{samcarter}} -\date{Version 0.4 -- \today} +\date{Version 0.5 -- \today} \begin{document} \maketitle @@ -138,25 +131,24 @@ Rubber ducks can be made of latex, but can they also be made with \LaTeX? Yes! T This project is a continuation of an answer at TeX.Stackexchange: \href{tex.stackexchange.com/a/347458/36296}{How can we draw a duck?}. This package is work in progress (and will probably never be really finished as there is an infinite amount of things which could be added), therefore I would be happy to hear your feedback and ideas how to improve the package. -The head version of the source code can be found on \url{github.com/samcarter8/tikzducks}, including a bug tracker -- please make constructive use of it! A more stable package version can be found on \CTAN (\url{www.ctan.org/pkg/tikzducks}) and is included in both \miktex and \texlive as \tikzducks. If you seek any other assistance (not bug reports/feature requests), I suggest using the \href{https://tex.stackexchange.com/questions/tagged/tikzducks}{\texttt{\{tikzducks\}}-tag} on TeX.Stackexchange. +The head version of the source code can be found on \url{github.com/samcarter8/tikzducks}, including a bug tracker -- please make constructive use of it! A more stable package version can be found on \CTAN (\url{www.ctan.org/pkg/tikzducks}) and is included in both \miktex and \texlive as \tikzducks. If you seek any other assistance (not bug reports/feature requests), I suggest using the \href{https://tex.stackexchange.com/questions/tagged/tikzducks}{\texttt{\{tikzducks\}}-tag} on TeX.Stackexchange. \subsection{Acknowledgements} Without the friendly and helpful community of \href{https://tex.stackexchange.com/}{TeX.Stackexchange} this package would not exist. I would like to thank a few fellow users in particular: -First of all \href{https://tex.stackexchange.com/users/101651/carlatex}{Carla Maggi} for pointing out the overwhelming need of having a \tikzducks package and valuable contribution to the package code, in particular the \hyperref[sec:footballducks]{football ducks} and \href{https://tex.stackexchange.com/users/3094/paulo-cereda}{Paulo Cereda} for his contagious enthusiasm for ducks (\emph{Quack!}). Many other users contributed to this package (in random order): \href{https://tex.stackexchange.com/users/4427/egreg}{Enrico Gregorio} helped to implement the \lstinline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs, \href{https://tex.stackexchange.com/users/51022/symbol-1}{Symbol 1} solved a few problems with default key values, \href{https://tex.stackexchange.com/users/2388/ulrike-fischer}{Ulrike Fischer} gave valuable \TikZ advices and last but not least my thanks go to \href{https://tex.stackexchange.com/users/5763/martin-schr%c3%b6der}{Martin Schr\"oder} for his feedback to the code review. +First of all \href{https://tex.stackexchange.com/users/101651/carlatex}{Carla Maggi} for pointing out the overwhelming need of having a \tikzducks package and valuable contribution to the package code, in particular the \hyperref[sec:footballducks]{football ducks} and \href{https://tex.stackexchange.com/users/3094/paulo-cereda}{Paulo Cereda} for his contagious enthusiasm for ducks (\emph{Quack!}). Many other users contributed to this package (in random order): \href{https://tex.stackexchange.com/users/4427/egreg}{Enrico Gregorio} helped to implement the \lstinline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs, \href{https://tex.stackexchange.com/users/51022/symbol-1}{Symbol 1} solved a few problems with default key values, \href{https://tex.stackexchange.com/users/2388/ulrike-fischer}{Ulrike Fischer} gave valuable \TikZ advices and came to rescue for the keyword highlighting in the documentation, \href{https://tex.stackexchange.com/users/148434/mihikma}{Mihikma} created the duck's beard and last but not least my thanks go to \href{https://tex.stackexchange.com/users/5763/martin-schr%c3%b6der}{Martin Schr\"oder} for his feedback to the code review. -The ducks mostly consist of basic geometric shapes drawn in \TikZ. Some of the more complex shapes (e.g.\ the different hair styles) are first drawn in \texttt{inkscape} (\url{inkscape.org}) and then exported to \TikZ paths using the \texttt{SVG to TikZ/PGF} extension (\url{github.com/kjellmf/svg2tikz}). +The ducks mostly consist of basic geometric shapes drawn in \TikZ. Some of the more complex shapes (e.g.\ the different hair styles) are first drawn in \texttt{inkscape} (\url{https://inkscape.org}) and then exported to \TikZ paths using the \texttt{SVG to TikZ/PGF} extension (\url{https://github.com/kjellmf/svg2tikz}). \subsection{Dependencies} The \tikzducks package loads the packages \lstinline|xcolor| and \TikZ, both without any options. If you require one of these packages to be loaded with some option, please consider loading it yourself before the \tikzducks package or use, e.g. -\vskip0.5em -\begin{lstlisting}[morekeywords={xcolor,svgnames}] +\begin{lstlisting}[aboveskip=1.2em,morekeywords={xcolor,svgnames}] \PassOptionsToPackage{svgnames}{xcolor} \end{lstlisting} -It also uses the \lstinline|\usetikzlibrary{patterns}|. +It also uses the \lstinline|\usetikzlibrary{patterns}| and \lstinline|\usetikzlibrary{calc}|. \subsection{License} @@ -250,7 +242,7 @@ And of course the colour of each hair style can be adjusted: \end{tikzpicture} \end{tcblisting} -Eyebrows are also part of the package. The colour choice is more tricky for them -- if a colour is explicitly specified \lstinline|eyebrow=<colour name>| this colour is of course used, but if no colour is given, it first falls back to the hair colour and only if the duck does not have any hairs, the default colour is applied. +Eyebrows and a beard are also part of the package. The colour choice is more tricky for them -- if a colour is explicitly specified (\lstinline|eyebrow=<colour name>| or \lstinline|beard=<colour name>|) this colour is of course used, but if no colour is given, it first falls back to the hair colour and only if the duck does not have any hairs, the default colour is applied. \begin{tcblisting}{title={Eye brow duck}} \begin{tikzpicture} @@ -267,7 +259,17 @@ Eyebrows are also part of the package. The colour choice is more tricky for them \end{tikzpicture} \end{tcblisting} -\clearpage +\addtocounter{footnote}{1} +\begin{tcblisting}{title={Beard duck$^\thefootnote$}} +\begin{tikzpicture} + \duck[beard=white!80!brown] +\end{tikzpicture} +\begin{tikzpicture} + \duck[recedinghair=white,beard] +\end{tikzpicture} +\end{tcblisting} +\footnotetext[\thefootnote]{The beard is based on an answer by Mihikma, see \url{https://tex.stackexchange.com/a/401777/36296}} + \subsection{Clothing} A respectable duck needs a suitable wardrobe. It can choose from a \lstinline|tshirt|, a \lstinline|jacket| and a \lstinline|tie|. In it's infinite wardrobe these items are available in all colours definable in the current colour model. @@ -297,10 +299,11 @@ A respectable duck needs a suitable wardrobe. It can choose from a \lstinline|ts For more ways to customise the clothing also have a look at the \hyperref[sec:footballducks]{football ducks in Section \ref{sec:footballducks}}. +\clearpage \subsection{Accessories} \label{sec:accessories} -There is a multitude of things a duck might need. The following examples all also work without specifying a colour, but giving an examples with and one without explicit colour just makes this overview unnecessary long, so only one is given. +There is a multitude of things a duck might need. The following examples all also work without specifying a colour, but giving both an example with and one without explicit colour just makes this overview unnecessary long, so only one is given. \begin{tcblisting}{title={Swimming duck}} \begin{tikzpicture} @@ -320,31 +323,44 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} +\begin{tcblisting}{title={Tophat duck}} +\begin{tikzpicture} + \duck[tophat=blue!20!black] +\end{tikzpicture} +\end{tcblisting} + \begin{tcblisting}{title={Basecap duck}} \begin{tikzpicture} \duck[cap=red!80!black] \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Santa Clause}} +\begin{tcblisting}{title={Santa Duck}} \begin{tikzpicture} - \duck[santa=red!80!black] + \duck[santa=red!80!black, + beard=white!80!brown] \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Graduate Duck}} +\begin{tcblisting}{title={Graduate duck}} \begin{tikzpicture} \duck[graduate=gray!20!black,tassel=red!70!black] \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Beret Duck}} +\begin{tcblisting}{title={Beret duck}} \begin{tikzpicture} \duck[beret=red!70!black] \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Crown Duck}} +\begin{tcblisting}{title={Peaked cap duck}} +\begin{tikzpicture} + \duck[peakedcap=blue!50!black] +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Crown duck}} \begin{tikzpicture} \duck[body=black!75!white, crown=yellow!70!brown] @@ -359,6 +375,37 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} +\addtocounter{footnote}{1} +\begin{tcblisting}{title={Bunny duck$^\thefootnote$}} +\begin{tikzpicture} +\duck[body=white!65!brown, bill=white!50!brown, bunny] +\end{tikzpicture} +\begin{tikzpicture} +\duck[bunny=red,inear=blue] +\end{tikzpicture} +\end{tcblisting} +\footnotetext[\thefootnote]{Unless an explicit colour is specified, the bunny ears will take the body colour as default colour, the inner parts will be drawn in a lighter shade.} + +\begin{tcblisting}{title={Witch duck}} +\begin{tikzpicture} + \duck[witch=black!50!gray, + longhair=red!80!black, + jacket=black!50!gray, + magicwand] +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Magic duck}} +\begin{tikzpicture} + \duck[magichat,magicwand] +\end{tikzpicture} +\begin{tikzpicture} + \duck[magichat=teal, + magicstars=blue!30!cyan, + magicwand] +\end{tikzpicture} +\end{tcblisting} + \begin{tcblisting}{title={Glasses duck}} \begin{tikzpicture} \duck[glasses=red!50!black] @@ -371,12 +418,9 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Book duck}} +\begin{tcblisting}{title={Superhero duck}} \begin{tikzpicture} - \duck[book=\scalebox{0.5}{\TeX}] -\end{tikzpicture} -\begin{tikzpicture} -\duck[book=\scalebox{0.6}{$\pi$}, bookcolour=blue!50!black] + \duck[mask=teal,cape=teal] \end{tikzpicture} \end{tcblisting} @@ -393,24 +437,26 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Magic duck}} +\addtocounter{footnote}{1} +\begin{tcblisting}{title={Speaking duck$^\thefootnote$}} \begin{tikzpicture} - \duck[magichat, - magicwand] + \duck[speech={Bla},bubblecolour=cyan!20!white] \end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Thinking duck$^\thefootnote$}} \begin{tikzpicture} - \duck[magichat=teal, - magicstars=blue!30!cyan, - magicwand] + \duck[think={Blub},bubblecolour=white!95!yellow] \end{tikzpicture} \end{tcblisting} +\footnotetext[\thefootnote]{Both the speech and thought bubble are inspired by the wonderful \href{https://www.ctan.org/pkg/ducksay}{ducksay package}} -\begin{tcblisting}{title={Witch duck}} +\begin{tcblisting}{title={Book duck}} \begin{tikzpicture} - \duck[witch=black!50!gray, - longhair=red!80!black, - jacket=black!50!gray, - magicwand] + \duck[book=\scalebox{0.5}{\TeX}] +\end{tikzpicture} +\begin{tikzpicture} +\duck[book=\scalebox{0.6}{$\pi$}, bookcolour=blue!50!black] \end{tikzpicture} \end{tcblisting} @@ -426,6 +472,38 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} +\addtocounter{footnote}{1} +\begin{tcblisting}{title={Football duck$^\thefootnote$}} +\begin{tikzpicture} + \duck[football=white!85!yellow] +\end{tikzpicture} +\end{tcblisting} +\footnotetext[\thefootnote]{The football duck is simplified version from an answer by Carla Maggi, \url{https://tex.stackexchange.com/a/387126/36296}} + +\begin{tcblisting}{title={Lightsaber duck}} +\begin{tikzpicture} + \duck[lightsaber=red] +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Torch duck}} +\begin{tikzpicture} + \duck[torch=black!30!gray] +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Prison duck}} +\begin{tikzpicture} + \duck[prison=gray] +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Necklace duck}} +\begin{tikzpicture} + \duck[necklace=gray!20!white] +\end{tikzpicture} +\end{tcblisting} + \begin{tcblisting}{title={Icecream duck}} \begin{tikzpicture} \duck[icecream] @@ -441,7 +519,7 @@ There is a multitude of things a duck might need. The following examples all als \addtocounter{footnote}{1} \begin{tcblisting}{title={Chef duck$^\thefootnote$}} \begin{tikzpicture} -\duck[chef=white!95!yellow, + \duck[chef=white!95!yellow, rollingpin=brown!80!black] \end{tikzpicture} \end{tcblisting} @@ -465,19 +543,38 @@ There is a multitude of things a duck might need. The following examples all als \end{tikzpicture} \end{tcblisting} -\begin{tcblisting}{title={Lightsaber duck}} +\begin{tcblisting}{title={Milkshake duck}} \begin{tikzpicture} -\duck[lightsaber=red] -\end{tikzpicture} + \duck[milkshake=red!20!white] +\end{tikzpicture} \end{tcblisting} \addtocounter{footnote}{1} -\begin{tcblisting}{title={Football duck$^\thefootnote$}} +\begin{tcblisting}{title={Wine duck$^\thefootnote$}} \begin{tikzpicture} - \duck[football=white!85!yellow] + \duck[wine=red!70!black] +\end{tikzpicture} +\end{tcblisting} +\footnotetext[\thefootnote]{According to the resident Italian wine expert of the \href{https://chat.stackexchange.com/transcript/message/40103109}{ TeX.SE chatroom}, the duck is drinking a fine Brunello di Montalcino} + +\clearpage +\section{Random ducks} +With all these available accessories it might be hard to decide which one to choose, but don't worry the \tikzducks provide a solution for this dilemma, the random duck, or short \lstinline|\randuck|, which automatically creates a duck with a randomly chosen accessories and something on top of the head (hair, a hat, ears, alien antenna ...) + +\begin{tcblisting}{title={Random duck}} +\begin{tikzpicture} + \randuck +\end{tikzpicture} +\end{tcblisting} + +In case the duck should not be completely random, but only some of the random elements are desired, these can be accessed independently by using \lstinline|\randomhead| and \lstinline|\randomaccessories| for a random headpiece and a random accessories, respectively. Small caveat: Before using \lstinline|\randomhead| or \lstinline|\randomaccessories|, \lstinline|\shuffleducks| has to be used to provide the random items (for \lstinline|\randuck| this is done automatically). + +\begin{tcblisting}{title={Random head gear and accessories}} +\begin{tikzpicture} + \shuffleducks + \duck[\randomhead, \randomaccessories] \end{tikzpicture} \end{tcblisting} -\footnotetext[\thefootnote]{The football duck is simplified version from an answer by Carla Maggi, \url{https://tex.stackexchange.com/a/387126/36296}} %\clearpage \section{Further customisation} @@ -510,8 +607,7 @@ For convenience the more complex paths of this package are stored in macros, whi In detail, the following paths are available: -\vskip0.5em -\begin{lstlisting}[breakindent=0pt] +\begin{lstlisting}[aboveskip=1.2em,breakindent=0pt] \duckpathbody, \duckpathgrumpybill, \duckpathbill, \duckpathtshirt, \duckpathjacket,\duckpathcape, \duckpathshorthair, \duckpathlonghair, \duckpathcrazyhair, \duckpathrecedinghair, \duckpathcrown \end{lstlisting} @@ -533,7 +629,20 @@ To ease the placement of further accessories, some particular spots of the duck \end{tikzpicture} \end{tcblisting} } -An example making use this option are the \hyperref[starducks]{``Live long and prosper'' ducks}.. +An example making use this option are the \hyperref[starducks]{``Live long and prosper'' ducks}. + +To distinguish coordinates from multiple ducks in the same \lstinline|tikzpicture|, one can name the ducks using the option \lstinline[emph={name}]|name|. If this option is used, the coordinates are prefixed with the respective name and a dash: \lstinline|<name>-<coordinate>|. + +\begin{tcblisting}{title={Named coordinates},listing options={style={duckstyle}, emph={name,wing}}} +\begin{tikzpicture} + \duck[name=foo] + \begin{scope}[xshift=90pt, + scale=.3, yshift=150pt] + \duck[name=bar] + \end{scope} + \draw (foo-wing) -- (bar-wing); +\end{tikzpicture} +\end{tcblisting} \clearpage \section{Football ducks -- contributed by Carla Maggi} @@ -555,7 +664,7 @@ This may be impractical as the stripes are drawn on top of any accessories or ha \begin{tcblisting}{title={Using \texttt{stripes} for \texttt{tikzducks}}} \begin{tikzpicture} - \duck[longhair,stripes={\stripes}] + \duck[longhair,|stripes|={\stripes}] \end{tikzpicture} \end{tcblisting} @@ -585,42 +694,42 @@ Please note that the colour of the stripes only affects the stripes themselves, \duck[stripes] \end{tikzpicture} \begin{tikzpicture} - \duck[stripes={ + \duck[|stripes|={ \stripes[color=blue]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[distance=0.6]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[width=0.03]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={\stripes[emblem={\includegraphics[width=0.3cm]{example-image-a}}]}] +\duck[|stripes|={\stripes[emblem={\includegraphics[width=0.3cm]{example-image-a}}]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[height=1.0]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[initialx=1]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[initialy=0.8]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[rotate=45]}] \end{tikzpicture} \begin{tikzpicture} -\duck[stripes={ +\duck[|stripes|={ \stripes[rotate=-45]}] \end{tikzpicture} \end{tcblisting} @@ -628,7 +737,7 @@ Please note that the colour of the stripes only affects the stripes themselves, For more complex or multicoloured designs the stripes can easily be stacked on top of each other: \begin{tcblisting}{title={multicoloured \texttt{stripes}}} \begin{tikzpicture} -\duck[tshirt=red, stripes={ +\duck[tshirt=red, |stripes|={ \stripes[color=yellow, width=0.1] \stripes[color=orange, width=0.1, initialx=0.0]}] \end{tikzpicture} @@ -639,25 +748,26 @@ A few examples to see \lstinline|stripes| in action: \begin{tcblisting}{title={Inter duck}} \definecolor{blueinter}{RGB}{0,102,170}% \begin{tikzpicture} -\duck[tshirt=black,stripes={\stripes[color=blueinter]},football] +\duck[tshirt=black,|stripes|={\stripes[color=blueinter]},football] \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{title={Juve duck}} \begin{tikzpicture} -\duck[tshirt=black,stripes={\stripes[color=white]},football] +\duck[tshirt=black,|stripes|={\stripes[color=white]},football] \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{title={Milan duck}} \begin{tikzpicture} -\duck[tshirt=black,stripes={\stripes[color=red]},football] +\duck[tshirt=black,|stripes|={\stripes[color=red]},football] \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{title={M\"{o}nchengladbach duck}} +\definecolor{mggreen}{RGB}{37,166,89}% \begin{tikzpicture} -\duck[tshirt=green,stripes={\stripes},football] +\duck[tshirt=mggreen,|stripes|={\stripes},football] \end{tikzpicture} \end{tcblisting} @@ -672,14 +782,14 @@ A few examples to see \lstinline|stripes| in action: \definecolor{rossocagliari}{RGB}{149,20,38}% \definecolor{blucagliari}{RGB}{23,52,84}% \begin{tikzpicture} -\duck[tshirt=white, jacket=blucagliari,stripes={ +\duck[tshirt=white, jacket=blucagliari,|stripes|={ \stripes[color=rossocagliari, width=0.46, distance=3]},football] \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{title={Sampdoria duck}} \begin{tikzpicture} -\duck[tshirt=blue, jacket=blue,stripes={ +\duck[tshirt=blue, jacket=blue,|stripes|={ \stripes[color=white,rotate=-90,width=0.6,distance=1] \stripes[color=red,rotate=-90,width=0.2,distance=1.2] \stripes[color=black,rotate=-90,width=0.1,distance=1.3] @@ -689,7 +799,7 @@ A few examples to see \lstinline|stripes| in action: \begin{tcblisting}{title={Brescia duck}} \begin{tikzpicture} -\duck[tshirt=blue, jacket=blue,stripes={ +\duck[tshirt=blue, jacket=blue,|stripes|={ \stripes[color=white, rotate=-70, width=0.22,distance=1.1, initialy=0.01] \stripes[color=white, rotate=40, width=0.2, distance=1.8, initialy=1.0,initialx=0.285] },football] @@ -700,7 +810,8 @@ In case your favourite team is missing from the above examples, feel free to cre \clearpage \section{Showcase} -For more examples (or to show your own creations) please visit \href{https://tex.stackexchange.com/q/387047/36296}{The Duck Pond}. + +In the following a few examples of possible duck customisations, some of which will require additional packages (which are stated as a comment at the start of the code). For more examples (or to show your own creations) please visit \href{https://tex.stackexchange.com/q/387047/36296}{The Duck Pond}. \begin{tcblisting}{title={\texttt{samcarter} duck}} \begin{tikzpicture} @@ -788,21 +899,31 @@ For more examples (or to show your own creations) please visit \href{https://tex \end{tikzpicture} \end{tcblisting} +\begin{tcblisting}{title={Ghost duck}} +\colorlet{ghost}{white!98!gray}% +\begin{tikzpicture} +\duck[body=ghost,bill=ghost,prison=gray] +\fill[ghost,rotate=-17](-0.1,0.7) rectangle (0.15,1.3); +\fill[ghost,rotate=17] (1.6,0.7) rectangle (1.81,1.3); +\end{tikzpicture} +\end{tcblisting} + \addtocounter{footnote}{1} \begin{tcblisting}{title={67P/Churyumov-Gerasimenko duck$^\thefootnote$}} \begin{tikzpicture}[path image/.style={path picture={\foreach \j in {0,...,2}{\node at (0,\j) {\foreach \i in {1,...,5}{\includegraphics[height=1cm]{#1}}};}}}] -\path [path image=crinklepaper] +\path (0.1,0.1) rectangle (2.1,2.12); +\begin{pgfinterruptboundingbox} +\path[path image=crinklepaper] (0.90,1.50) ellipse (0.50 and 0.625); -\path [path image=crinklepaper] \duckpathbody; -\fill [gray!80!white] \duckpathbill; -\fill[white!70!gray, rotate=-20] - (0.23,1.7675) ellipse (0.0893 and 0.125); -\fill[black, rotate=-20] - (0.26,1.7575) ellipse (0.0357 and 0.0714); +\path[path image=crinklepaper] \duckpathbody; +\fill[gray!80!white] \duckpathbill; \fill[white!70!gray, rotate=-20] + (0.23,1.7675) ellipse (0.0893 and 0.125) (-0.06,1.74) ellipse (0.0786 and 0.1143); \fill[black, rotate=-20] + (0.26,1.7575) ellipse (0.0357 and 0.0714) (-0.03,1.73) ellipse (0.0286 and 0.0643); +\end{pgfinterruptboundingbox} \end{tikzpicture} \end{tcblisting} \footnotetext[\thefootnote]{If you try this at home, replace the \texttt{crinklepaper} with an image of the comet's surface, e.g. \url{https://arxiv.org/abs/1707.02945}} @@ -866,29 +987,34 @@ For more examples (or to show your own creations) please visit \href{https://tex \begin{tcblisting}{title={French duck}} \begin{tikzpicture} -\duck[body=yellow!60!red!30!white,tshirt=white!90!yellow,stripes={\stripes[color=blue!70!black,rotate=-87,width=0.07,distance=0.12]},beret=blue!30!black,baguette=brown] +\duck[body=yellow!60!red!30!white,tshirt=white!90!yellow,|stripes|={\stripes[color=blue!70!black,rotate=-87,width=0.07,distance=0.12]},beret=blue!30!black,baguette=brown] \end{tikzpicture} \end{tcblisting} \begin{tcblisting}{title={Bee duck}} \begin{tikzpicture} - \duck[stripes={\stripes[distance=0.4,width=0.2,rotate=0,initialx=0.15]},alien=black] + \duck[|stripes|={\stripes[distance=0.4,width=0.2,rotate=0,initialx=0.15]},alien=black] \end{tikzpicture} \end{tcblisting} +\begin{tcblisting}{title={Jailbird duck}} +\begin{tikzpicture} +\duck[peakedcap=gray!40!black,tshirt=white,stripes={ +\stripes[rotate=100,color=gray!40!black]},prison=gray] +\end{tikzpicture} +\end{tcblisting} + \begin{tcblisting}{title={Super duck brothers}} -\newcommand{\mcap}[2]{\fill[#1,rotate=-15] (0.35,2.05) ellipse (0.5 and 0.15); -\fill[#1,rotate=-25] (0.13,2.15) ellipse (0.5 and 0.17) (0.13,2.25) ellipse (0.55 and 0.17); -\fill[white] (0.8,2) circle (0.13); -\node[#1,rotate=-15] at (0.8,2) {\scalebox{0.6}{\textsf{#2}}}; -} +\newcommand{\superstripes}{\stripes[color=blue!80!black,width=3,height=1.0,rotate=5] \stripes[color=blue!80!black,width=0.1,rotate=0,distance=0.7,initialx=-1.1,height=2]} \begin{tikzpicture} -\duck[tshirt=red!80!black, stripes={\stripes[color=blue!80!black,width=3,height=1.0,rotate=5] \stripes[color=blue!80!black,width=0.1,rotate=0,distance=0.7,initialx=-1.1,height=2]}] -\mcap{red!80!black}{M} +\duck[tshirt=red!80!black,peakedcap=red!80!black,|stripes|={\superstripes}] +\fill[white] (0.8,2) circle (0.13); +\node[red!80!black,rotate=-25] at (0.8,2) {\scalebox{0.6}{\textsf{M}}}; \end{tikzpicture} \begin{tikzpicture} -\duck[tshirt=green!70!black, stripes={\stripes[color=blue!80!black,width=4,height=1.0,rotate=5] \stripes[color=blue!80!black,width=0.1,rotate=0,distance=0.7,initialx=-1.1,height=2]}] -\mcap{green!70!black}{L} +\duck[tshirt=green!70!black,peakedcap=green!70!black, |stripes|={\superstripes}] +\fill[white] (0.8,2) circle (0.13); +\node[green!70!black,rotate=-25] at (0.8,2) {\scalebox{0.6}{\textsf{L}}}; \end{tikzpicture} \end{tcblisting} @@ -896,7 +1022,7 @@ For more examples (or to show your own creations) please visit \href{https://tex \definecolor{pskin}{RGB}{255,200,184}% \definecolor{phair}{RGB}{249,249,139}% \begin{tikzpicture} -\duck[body=pskin!80!white,longhair=phair,tshirt=magenta!60!white,jacket=magenta!40!white] +\duck[body=pskin!80!white,longhair=phair,tshirt=magenta!60!white,jacket=magenta!40!white,necklace=white!85!yellow] \path (0.7,2) rectangle (1.4,2.55); \begin{pgfinterruptboundingbox} \fill[yellow!80!orange,rotate=-10,xshift=-11,yshift=5] \duckpathcrown; @@ -904,4 +1030,54 @@ For more examples (or to show your own creations) please visit \href{https://tex \end{tikzpicture} \end{tcblisting} +\begin{tcblisting}{title={ZZZoro duck}} +\begin{tikzpicture} +\duck[cape=black,hat=black,mask=black] +\node[rotate=-5] at (0.4,0.7) {\tiny\fontfamily{pzc}\selectfont \textbackslash ZZZ}; +\fill[black,rotate=24] (0.1,0.21) rectangle (1.1,0.23) (1.2,0.22) ellipse (0.15 and 0.03) (1.08,0.22) ellipse (0.03 and 0.15); +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Farm animals}} +\definecolor{fskin}{RGB}{161,140,126}% +\definecolor{fbill}{RGB}{238,212,191}% +\definecolor{fhair}{RGB}{89,72,72}% +\begin{tikzpicture} +\duck[body=fskin,bill=fbill,shorthair=fhair,bunny,inear=fbill] +\node[fskin,rotate=45,scale=3] at (1.7,1.55) {\textsf{s}}; +\fill[fhair,rotate=45] (2.4,0.13) ellipse (0.15 and 0.07); +\end{tikzpicture} + +\begin{tikzpicture} +\duck[body=white!80!brown, bill=white!60!brown, bunny, longhair=white!60!brown] +\fill[white!60!brown] (1.85,1.42) circle (0.2); +\end{tikzpicture} + +\begin{tikzpicture} +\duck[body=red!20!white,bill=red!30!white,shorthair=red!30!white,bunny=red!30!white,inear=red!30!white] +\node[red!20!white,rotate=25,scale=3] at (1.7,1.51) {\textsf{s}}; +\end{tikzpicture} +\end{tcblisting} + +\begin{tcblisting}{title={Duck Queen}} +%\usepackage[LSBC5,T1]{fontenc} +%\usepackage{chessfss} +\definecolor{qskin}{RGB}{225,219,206}% +\definecolor{qbill}{RGB}{170,123,154}% +\definecolor{qdress}{RGB}{184,209,206}% +\definecolor{qcrown}{RGB}{90,76,183}% +\setboardfontencoding{LSBC5} +\setboardfontcolors{whiteonwhitepiecemask=qcrown,whitepiece=gray!60!white} +\begin{tikzpicture} +\duck[body=qskin,bill=qbill,jacket=qdress,tshirt=teal!30!qdress,shorthair=gray!60!white,necklace=gray!10!white] +\node[rotate=-10] at (1.03,2.42) {\scalebox{1.9}{\WhiteKingOnWhite}}; +\fill[gray!60!white,rotate=-10] (0.6,2.18) ellipse (0.38 and 0.1); +\fill[gray!60!white,rotate=-30] (0.27,1.23) rectangle (0.37,0.65); +\node[rotate=-30] at (0.94,0.98) {\scalebox{0.4}{\WhiteQueenOnWhite}}; +\end{tikzpicture} +\end{tcblisting} + +\clearpage +\printindex + \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty b/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty index 55f51b7cef1..5877b3e2001 100644 --- a/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty +++ b/Master/texmf-dist/tex/latex/tikzducks/tikzducks.sty @@ -10,8 +10,8 @@ % Released under the LaTeX Project Public License v1.3c or later % See http://www.latex-project.org/lppl.txt % -% Version 0.4 -% Sep 04, 2017 +% Version 0.5 +% Nov 21, 2017 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -20,13 +20,21 @@ \RequirePackage{xcolor} \RequirePackage{tikz} \usetikzlibrary{patterns} % for the wizard hat -%\usetikzlibrary{intersections} % for named paths \usetikzlibrary{calc} % for the sports jerseys +%\pgfdeclarelayer{backgroundlayer} +%\pgfdeclarelayer{bodylayer} +%\pgfdeclarelayer{clothinglayer} +%\pgfdeclarelayer{hairlayer} +%\pgfdeclarelayer{hatlayer} +% +%\pgfsetlayers{backgroundlayer,bodylayer,clothinglayer,hairlayer,hatlayer,main} + \newcommand*{\duck}[1][]{\tikzset{% /duck/.cd,#1}\duck@draw% } +\newif\ifduck@name % Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifduck@water % body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -37,41 +45,55 @@ \newif\ifduck@crazyhair \newif\ifduck@recedinghair \newif\ifduck@eyebrow +\newif\ifduck@beard % clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifduck@tshirt \newif\ifduck@jacket \newif\ifduck@tie \newif\ifduck@cape \newif\ifduck@stripes -% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newif\ifduck@glasses -\newif\ifduck@sunglasses +% Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifduck@alien \newif\ifduck@hat \newif\ifduck@cap \newif\ifduck@santa \newif\ifduck@unicorn +\newif\ifduck@magichat +\newif\ifduck@chef +\newif\ifduck@witch +\newif\ifduck@graduate +\newif\ifduck@beret +\newif\ifduck@crown +\newif\ifduck@peakedcap +\newif\ifduck@bunny +\newif\ifduck@tophat +% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\ifduck@glasses +\newif\ifduck@sunglasses \newif\ifduck@icecream \newif\ifduck@book -\newif\ifduck@magichat \newif\ifduck@magicwand \newif\ifduck@cricket \newif\ifduck@rollingpin -\newif\ifduck@chef \newif\ifduck@signpost -\newif\ifduck@witch -\newif\ifduck@graduate \newif\ifduck@lightsaber \newif\ifduck@cake \newif\ifduck@pizza \newif\ifduck@hockey -\newif\ifduck@beret \newif\ifduck@baguette -\newif\ifduck@crown \newif\ifduck@football +\newif\ifduck@mask +\newif\ifduck@necklace +\newif\ifduck@milkshake +\newif\ifduck@wine +\newif\ifduck@prison +\newif\ifduck@speech +\newif\ifduck@think +\newif\ifduck@torch \tikzset{ /duck/.cd, + name/.code = \duck@nametrue \def\duck@name{#1}, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Environment @@ -122,19 +144,19 @@ crazyhair/.code = \duck@crazyhairtrue \def\duck@hair{#1}, recedinghair/.code = \duck@recedinghairtrue \def\duck@hair{#1}, eyebrow/.code = \duck@eyebrowtrue \def\duck@eyebrow{#1}, + beard/.code = \duck@beardtrue \def\duck@beard{#1}, % setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% shorthair/.default = brown, longhair/.default = brown, crazyhair/.default = brown, recedinghair/.default = brown, eyebrow/.default = brown, + beard/.default = brown, + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % Headgear + % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % - % Accessories - % - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - glasses/.code = \duck@glassestrue \def\duck@glasses{#1}, - sunglasses/.code = \duck@sunglassestrue \def\duck@sunglasses{#1}, alien/.code = \duck@alientrue \def\duck@alien{#1}, hat/.code = \duck@hattrue \def\duck@hat{#1}, cap/.code = \duck@captrue \def\duck@cap{#1}, @@ -144,6 +166,39 @@ tassel/.code = \def\duck@tassel{#1}, beret/.code = \duck@berettrue \def\duck@beret{#1}, unicorn/.code = \duck@unicorntrue \def\duck@unicorn{#1}, + magichat/.code = \duck@magichattrue \def\duck@magichat{#1}, + magicstars/.code = \def\duck@magicstars{#1}, + witch/.code = \duck@witchtrue \def\duck@witch{#1}, + crown/.code = \duck@crowntrue \def\duck@crown{#1}, + bunny/.code = \duck@bunnytrue \def\duck@bunny{#1}, + inear/.code = \def\duck@inear{#1}, + peakedcap/.code = \duck@peakedcaptrue \def\duck@peakedcap{#1}, + tophat/.code = \duck@tophattrue \def\duck@tophat{#1}, + % setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + alien/.default = green, + hat/.default = brown, + cap/.default = blue, + santa/.default = red!80!black, + chef/.default = gray!20!white, + graduate/.default = black, + tassel = red, + beret/.default = black, + unicorn/.default = pink, + magichat/.default = violet, + magicstars = yellow!80!brown, + witch/.default = black, + crown/.default = yellow, + bunny/.default = \duck@body, + inear = \duck@bunny!50!white, + peakedcap/.default= blue, + tophat/.default = black, + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % Accessories + % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + glasses/.code = \duck@glassestrue \def\duck@glasses{#1}, + sunglasses/.code = \duck@sunglassestrue \def\duck@sunglasses{#1}, icecream/.code = \duck@icecreamtrue \def\duck@cone{#1}, flavoura/.code = \def\duck@flavoura{#1}, flavourb/.code = \def\duck@flavourb{#1}, @@ -153,10 +208,7 @@ signpost/.code = \duck@signposttrue \def\duck@signpost{#1}, signcolour/.code = \def\duck@signcolour{#1}, signback/.code = \def\duck@signback{#1}, - magichat/.code = \duck@magichattrue \def\duck@magichat{#1}, - magicstars/.code = \def\duck@magicstars{#1}, magicwand/.code = \duck@magicwandtrue, - witch/.code = \duck@witchtrue \def\duck@witch{#1}, cricket/.code = \duck@crickettrue \def\duck@cricket{#1}, rollingpin/.code = \duck@rollingpintrue \def\duck@rollingpin{#1}, lightsaber/.code = \duck@lightsabertrue \def\duck@lightsaber{#1}, @@ -164,20 +216,19 @@ pizza/.code = \duck@pizzatrue, hockey/.code = \duck@hockeytrue \def\duck@hockey{#1}, baguette/.code = \duck@baguettetrue \def\duck@baguette{#1}, - crown/.code = \duck@crowntrue \def\duck@crown{#1}, football/.code = \duck@footballtrue \def\duck@football{#1}, + mask/.code = \duck@masktrue \def\duck@mask{#1}, + necklace/.code = \duck@necklacetrue \def\duck@necklace{#1}, + milkshake/.code = \duck@milkshaketrue \def\duck@milkshake{#1}, + wine/.code = \duck@winetrue \def\duck@wine{#1}, + prison/.code = \duck@prisontrue \def\duck@prison{#1}, + speech/.code = \duck@speechtrue \def\duck@speech{#1}, + think/.code = \duck@thinktrue \def\duck@think{#1}, + bubblecolour/.code = \def\duck@bubblecolour{#1}, + torch/.code = \duck@torchtrue \def\duck@torch{#1}, % setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% glasses/.default = black, sunglasses/.default = black, - alien/.default = green, - hat/.default = brown, - cap/.default = blue, - santa/.default = red!80!black, - chef/.default = gray!20!white, - graduate/.default = black, - tassel = red, - beret/.default = black, - unicorn/.default = pink, icecream/.default = brown!60!gray, flavoura = brown!50!black, flavourb = white!70!brown, @@ -185,17 +236,20 @@ bookcolour = brown, signcolour = brown!50!black, signback = green!40!black, - magichat/.default = violet, - magicstars = yellow!80!brown, - witch/.default = black, cricket/.default = brown, rollingpin/.default = brown, lightsaber/.default = green, cake/.default = violet, hockey/.default = brown, baguette/.default = brown, - crown/.default = yellow, football/.default = white, + mask/.default = black, + necklace/.default = white!80!gray, + milkshake/.default = red!20!white, + wine/.default = red!70!black, + prison/.default = gray, + bubblecolour = gray!30!white, + torch/.default = gray, } \def\duck@draw{ @@ -211,6 +265,11 @@ % defining some coordinates % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@name + \coordinate (\duck@name-wing) at (0.8,0.7); + \coordinate (\duck@name-head) at (0.9,2); + \coordinate (\duck@name-bill) at (0.5,1.3); +\fi \coordinate (wing) at (0.8,0.7); \coordinate (head) at (0.9,2); \coordinate (bill) at (0.5,1.3); @@ -220,6 +279,7 @@ % Environment % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\begin{pgfonlayer}{backgroundlayer} % % water %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@water @@ -229,11 +289,13 @@ \fill[\duck@water, even odd rule] (1.00,0.40) ellipse (1.42 and 0.77) (1.00,0.40) ellipse (1.38 and 0.73); \fi % +%\end{pgfonlayer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % body parts % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\begin{pgfonlayer}{bodylayer} % % body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{pgfinterruptboundingbox} @@ -252,6 +314,15 @@ \fill[\duck@bill] \duckpathbill; \fi % +% Superhero mask %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% has to be behind the eyes +\ifduck@mask + \begin{scope} + \clip (0.90,1.50) ellipse (0.50 and 0.625); + \fill[\duck@mask,rotate=-15] (-0.1,1.59) rectangle (1.3,1.88); + \end{scope} +\fi% +% % right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fill[\duck@eye, rotate=-20] (0.23,1.7675) ellipse (0.0893 and 0.125); @@ -264,11 +335,13 @@ \fill[\duck@pupil, rotate=-20] (-0.03,1.73) ellipse (0.0286 and 0.0643); % +%\end{pgfonlayer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % clothing % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\begin{pgfonlayer}{clothinglayer} % % tshirt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@tshirt @@ -301,11 +374,18 @@ \end{pgfinterruptboundingbox} \fi % +% necklace (not really clothing, but needs to be below the hair) %%%%% +\ifduck@necklace + \fill[\duck@necklace] (0.5000,1.112) circle (0.032) (0.5100,1.050) circle (0.032) (0.5200,0.990) circle (0.032) (0.5400,0.931) circle (0.032) (0.5825,0.885) circle (0.032) (0.6450,0.885) circle (0.032) (0.7000,0.910) circle (0.032) (0.7500,0.945) circle (0.032) (0.8000,0.980) circle (0.032) (0.8500,1.020) circle (0.032) (0.9000,1.050) circle (0.032) (0.9500,1.080) circle (0.032) (1.0000,1.110) circle (0.032) (1.0550,1.130) circle (0.032) (1.1100,1.150) circle (0.032) (1.1650,1.165) circle (0.032) (1.2200,1.180) circle (0.032) (1.2750,1.195) circle (0.032) (1.3300,1.210) circle (0.032); +\fi +% +%\end{pgfonlayer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % hair styles % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\begin{pgfonlayer}{hairlayer} % % short hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@shorthair @@ -349,28 +429,24 @@ \fill[\duck@eyebrow, rounded corners=1, rotate=100] (1.67,-0.77) rectangle (1.73,-0.95); \fi % +% beard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfkeys{/duck/beard/.@def/.get=\duck@test} +\ifx\duck@beard\duck@test + \ifdefined\duck@hair\let\duck@beard=\duck@hair\fi +\fi% +\ifduck@beard + \fill[\duck@beard] (1.3,1.3) circle (0.12) (1.2,1.15) circle (0.12) (0.5,1.05) circle (0.1) (0.525,0.90) circle (0.12) (0.525,0.75) circle (0.12) (0.65,0.65) circle (0.14) (0.75,0.75) circle (0.12) (0.85,0.85) circle (0.12) (0.95,0.95) circle (0.12) (1.05,1.05) circle (0.12) (1.15,1.25) circle (0.12) (1,1.20) circle (0.12) (0.85,1.20) circle (0.12) (0.75,1.15) circle (0.12) (0.65,1.10) circle (0.12) (0.58,1.07) circle (0.12) (0.44,1.46) circle (0.06) (0.52,1.45) circle (0.06) (0.6, 1.41) circle (0.06) (0.68,1.36) circle (0.06) (0.76,1.34) circle (0.06) (0.86,1.26) circle (0.12) (0.38,1.44) circle (0.03) (1,1.28) circle (0.12); + \fill[\duck@beard] (1.3,1.3) -- (0.5,1.05) -- (0.65,0.65) -- cycle; +\fi% +% +%\end{pgfonlayer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% Accessories +% Headgear % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\begin{pgfonlayer}{hatlayer} % -% sunglasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ifduck@sunglasses - \fill[\duck@sunglasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84); - \fill[\duck@sunglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84); - \fill[\duck@sunglasses,rotate=-20] (0.23,1.7675) circle (0.14); - \fill[\duck@sunglasses,rotate=-20] (-0.06,1.74) circle (0.13); -\fi -% -% glasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ifduck@glasses - \fill[\duck@glasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84); - \fill[\duck@glasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84); - \fill[\duck@glasses,rotate=-20,even odd rule] (0.23,1.7675) circle (0.14) (0.23,1.7675) circle (0.11); - \fill[\duck@glasses,rotate=-20,even odd rule] (-0.06,1.74) circle (0.13) (-0.06,1.74) circle (0.095); -\fi -% % alien %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@alien \fill[\duck@alien,rotate=-25] (0.09,2.1) rectangle (0.16,2.6); @@ -440,6 +516,80 @@ \fill[\duck@body!100,rotate=25] (1.50,1.43)--(1.60,1.8375)--(1.70,1.43); \fi % +% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@magichat + \path[preaction={fill, \duck@magichat!100},rotate=-5, + pattern=fivepointed stars, pattern color=\duck@magicstars!100] + (0.36,1.95)--(0.86,2.95)--(1.20,1.85); +\fi +% +% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@witch + \fill[\duck@witch,rotate=-15] (0.44,2.13) ellipse (0.75 and 0.17); + \fill[\duck@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2); +\fi +% +% crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@crown + \path (0.7,1.95) rectangle (1.4,2.45); + \begin{pgfinterruptboundingbox} + \fill[\duck@crown,rotate=-10,xshift=-10,yshift=3] \duckpathcrown; + \end{pgfinterruptboundingbox} +\fi +% +% Bunny ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@bunny + \path (0.55,1.9) rectangle (1.2,2.55); + \begin{pgfinterruptboundingbox} + \begin{scope} + \clip[rotate=-5] (0.68,2.38) ellipse (0.3 and 0.4); + \fill[\duck@bunny,rotate=-5] (1.06,2.2) ellipse (0.3 and 0.4) (0.28,2.26) ellipse (0.3 and 0.4); + \end{scope} + + \begin{scope} + \clip[rotate=-5] (0.68,2.38) ellipse (0.25 and 0.35); + \fill[\duck@inear,rotate=-5] (1.06,2.2) ellipse (0.25 and 0.35) (0.28,2.26) ellipse (0.25 and 0.35); + \end{scope} + \end{pgfinterruptboundingbox} +\fi +% +% peaked cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@peakedcap + \fill[\duck@peakedcap,rotate=-15] (0.35,2.05) ellipse (0.5 and 0.15); + \fill[\duck@peakedcap,rotate=-25] (0.13,2.15) ellipse (0.5 and 0.17); + \fill[\duck@peakedcap,rotate=-35] (-0.25,2.2) ellipse (0.55 and 0.17); +\fi +% +% tophat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@tophat + \fill[\duck@tophat,rotate=-15] (0.44,2.1) ellipse (0.48 and 0.1); + \fill[\duck@tophat,rotate=-15] (0.12,2.1) -- (0.75,2.1) -- (0.81,2.55) -- (0.07,2.55) -- cycle; + \fill[\duck@tophat,rotate=-15] (0.44,2.55) ellipse (0.37 and 0.08); +\fi +% +%\end{pgfonlayer} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Accessories +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% sunglasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@sunglasses + \fill[\duck@sunglasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84); + \fill[\duck@sunglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84); + \fill[\duck@sunglasses,rotate=-20] (0.23,1.7675) circle (0.14); + \fill[\duck@sunglasses,rotate=-20] (-0.06,1.74) circle (0.13); +\fi +% +% glasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@glasses + \fill[\duck@glasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84); + \fill[\duck@glasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84); + \fill[\duck@glasses,rotate=-20,even odd rule] (0.23,1.7675) circle (0.14) (0.23,1.7675) circle (0.11); + \fill[\duck@glasses,rotate=-20,even odd rule] (-0.06,1.74) circle (0.13) (-0.06,1.74) circle (0.095); +\fi +% % icecream %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@icecream \fill[\duck@cone,rotate=-20] (0.35,1.20)--(0.50,0.60)--(0.75,1.20); @@ -455,7 +605,7 @@ \node[rotate=-20, color=white] at (0.88,0.70) {\duck@book};% \fi % -% signpost %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% signpost %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@signpost \fill[\duck@signcolour, rounded corners=1, rotate=-20] (0.8,0.75) rectangle (0.9,1.75); \fill[\duck@signcolour, rounded corners=1, rotate=-20] (0.4,1.7) rectangle (1.3,2.4); @@ -463,11 +613,18 @@ \node[rotate=-20, color=white] at (1.5,1.65) {\duck@signpost}; \fi % -% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ifduck@magichat - \path[preaction={fill, \duck@magichat!100},rotate=-5, - pattern=fivepointed stars, pattern color=\duck@magicstars!100] - (0.36,1.95)--(0.86,2.95)--(1.20,1.85); +% speech bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@speech + \fill[\duck@bubblecolour] (-0.5,1.8) ellipse (0.7 and 0.3); + \fill[\duck@bubblecolour] (-0.2,1.54) -- (0.2,1.35) -- (0.0,1.6) -- cycle; + \node at (-0.5,1.8) {\duck@speech}; +\fi +% +% think bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@think + \fill[\duck@bubblecolour] (2,2.4) ellipse (0.7 and 0.35); + \fill[\duck@bubblecolour] (1.55,2.35) circle (0.25) (2.0,2.15) circle (0.25) (2.4,2.25) circle (0.25) (1.6,2.55) circle (0.25) (2.0,2.6) circle (0.25) (2.35,2.5) circle (0.25) (1.65,1.95) circle (0.1) (1.55,1.80) circle (0.06) (1.47,1.70) circle (0.03); + \node at (2,2.4) {\duck@think}; \fi % % magic wand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -476,12 +633,6 @@ \fill[white,rotate=-30] (0.27,1.13) rectangle (0.37,1.03); \fi % -% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ifduck@witch - \fill[\duck@witch,rotate=-15] (0.44,2.13) ellipse (0.75 and 0.17); - \fill[\duck@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2); -\fi -% % cricket bat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@cricket \fill[\duck@cricket, rounded corners=2, rotate=-30] (0.4,1.2) rectangle (0.7,2.2); @@ -539,14 +690,6 @@ \fill[\duck@baguette!80!black, rotate=5] (1.44,1.1) ellipse (0.1 and 0.03) (1.30,0.9) ellipse (0.1 and 0.03) (1.16,0.7) ellipse (0.1 and 0.03) (1.02,0.5) ellipse (0.1 and 0.03); \fi % -% crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ifduck@crown - \path (0.7,1.95) rectangle (1.4,2.45); - \begin{pgfinterruptboundingbox} - \fill[\duck@crown,rotate=-10,xshift=-10,yshift=3] \duckpathcrown; - \end{pgfinterruptboundingbox} -\fi -% % football %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifduck@football \fill[\duck@football] (1.2,0.33) circle (0.32); @@ -556,12 +699,90 @@ \end{scope} \fi % +% milkshake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@milkshake + \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05); + \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse (0.12 and 0.03); + \begin{scope} + \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03); + \fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse (0.18 and 0.4); + \fill[\duck@milkshake, rotate=-10] (0.8,0.94) ellipse (0.15 and 0.36); + \end{scope} + \fill[white!85!yellow] (0.83,0.92) circle (0.05) (0.88,0.9) circle (0.05) (0.93,0.92) circle (0.05) (0.99,0.91) circle (0.05) (1.06,0.86) circle (0.05) (1.13,0.87) circle (0.05) (0.85,0.99) circle (0.05) (0.9,0.98) circle (0.07) (1.0,0.98) circle (0.07) (1.1,0.95) circle (0.07); + \fill[red!90!black] (1.0,1.1) circle (0.05); + \fill[white!85!yellow] (0.94,1.05) circle (0.05) (1.03,1.03) circle (0.05); + \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05); + \fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85); +\fi +% +% wine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@wine + \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse (0.17 and 0.05); + \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse (0.12 and 0.03); + \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse (0.03 and 0.2); + \begin{scope} + \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03); + \fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse (0.18 and 0.4); + \end{scope} + \begin{scope} + \clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87); + \fill[\duck@wine, rotate=-10] (0.8,1.1) ellipse (0.15 and 0.36); + \end{scope} +\fi +% +% prison duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@prison + \fill[\duck@prison] (1.5,0.25) circle (0.3); + \fill[\duck@prison, even odd rule] (1.2,0.1) ellipse (0.10 and 0.07) (1.2,0.1) ellipse (0.06 and 0.04) (1.05,-0.05) ellipse (0.10 and 0.07) (1.05,-0.05) ellipse (0.06 and 0.04) (0.87,-0.2) ellipse (0.10 and 0.07) (0.87,-0.2) ellipse (0.06 and 0.04); + \fill[\duck@prison, even odd rule] (0.72,-0.2) ellipse (0.10 and 0.07) (0.72,-0.2) ellipse (0.06 and 0.04); + \fill[\duck@prison,even odd rule,rotate=70](0.4,-1.05) ellipse (0.1 and 0.07) (0.4,-1.05) ellipse (0.06 and 0.04) (0.2,-0.95) ellipse (0.1 and 0.07) (0.2,-0.95) ellipse (0.06 and 0.04) (0.22,-0.58) ellipse (0.1 and 0.07) (0.22,-0.58) ellipse (0.06 and 0.04); + \fill[\duck@prison,even odd rule,rotate=110](-0.33,-0.55) ellipse (0.1 and 0.07) (-0.33,-0.55) ellipse (0.06 and 0.04); + \begin{scope} + \clip[rotate=-12] (0.45,0.15) rectangle (0.63,0.25); + \fill[\duck@prison,even odd rule,rotate=110](-0.07,-0.6) ellipse (0.1 and 0.07) (-0.07,-0.6) ellipse (0.06 and 0.04); + \end{scope} +\fi +% +% torch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ifduck@torch + \fill[red!50!yellow, xscale=0.015, yscale=-0.015,xshift=130,yshift=-5600] \duckpathtorch; + \fill[red!25!yellow, xscale=0.01, yscale=-0.01,xshift=1300,yshift=-6600] \duckpathtorch; + \fill[white!50!yellow, xscale=0.006, yscale=-0.006,xshift=3700,yshift=-8600] \duckpathtorch; + \fill[\duck@torch,rounded corners=1] + (1.1,0.96) -- (0.77,0.25) -- (0.83,0.25) -- (1.3,0.86) -- cycle; + \fill[\duck@torch,rotate=-28] + (0.62,1.32) ellipse (0.2 and 0.08); +\fi% +% +% %\draw (current bounding box.north west) rectangle (current bounding box.south east);% For debugging bounding boxes % }% from `\def\duck@draw{` at the very beginning %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% Random ducks +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pgfmathsetseed{\number\pdfrandomseed} + +\pgfmathdeclarerandomlist{head}{{shorthair}{longhair}{crazyhair}{alien}{hat}{cap}{santa}{chef}{graduate}{beret}{magichat}{witch}{crown}{bunny}{peakedcap}{tophat}} +\pgfmathdeclarerandomlist{accessories}{{glasses}{sunglasses}{icecream}{book}{signpost}{magicwand}{cricket}{rollingpin}{lightsaber}{cake}{pizza}{hockey}{baguette}{football}{mask}{necklace}{milkshake}{wine}{prison}} + +\newcommand{\shuffleducks}{% + \pgfmathrandomitem{\head}{head}% + \edef\randomhead{\head}% + \pgfmathrandomitem{\accessories}{accessories}% + \edef\randomaccessories{\accessories}% +} + +\newcommand{\randuck}{% + \shuffleducks% + \duck[\randomhead, \randomaccessories]% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % Defining some of the more complicate paths for easy reuse % % naming scheme is \duckpath<name> @@ -624,11 +845,11 @@ (1.8123,1.2244) .. controls (1.7022,1.2488) and (1.5688,1.2663) .. (1.5063,1.3739) .. controls (1.4619,1.5143) and (1.4696,1.6649) .. (1.4340,1.8076) .. controls (1.2524,2.5117) and (0.2335,2.2794) .. - (0.4148,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) .. + (0.4060,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) .. (0.9011,1.9578) .. controls (1.2427,1.7382) and (1.3350,1.4214) .. - (1.0905,1.0610) .. controls (1.0897,1.0109) and (1.1103,0.9166) .. + (1.0905,1.0610) .. controls (1.0597,1.0109) and (1.1103,0.9166) .. (1.1805,0.8670) .. controls (1.2507,0.8174) and (1.3503,0.7853) .. - (1.4508,0.7565) -- cycle + (1.4508,0.7565) -- cycle; } \newcommand{\duckpathcrazyhair}{% @@ -669,6 +890,14 @@ (0.71,2.06) -- cycle } +\newcommand{\duckpathtorch}{% + (90.5,127.8) .. controls (90.3,137.0) and (84.7,136.2) .. + (77.9,146.3) .. controls (71.1,136.3) and (66.4,136.9) .. + (65.9,127.9) .. controls (65.2,118.1) and (79.2,118.5) .. + (78.2,103.8) .. controls (82.2,108.8) and (90.8,111.5) .. + (90.5,127.8) -- cycle; +} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 32237378723223 % 23737232212232237822 |