summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-08-07 20:19:04 +0000
committerKarl Berry <karl@freefriends.org>2021-08-07 20:19:04 +0000
commit84dbd3f0f8c0982f6944cc314d7ac0cbefec0769 (patch)
treed23ba41be4502e4d5c669e14f7bdb592ab81c56b /Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty
parente16d2cc5f6cec3ddaf136eea9d3522162057dad6 (diff)
tikzlings (7aug21)
git-svn-id: svn://tug.org/texlive/trunk@60181 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty338
1 files changed, 198 insertions, 140 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty
index 873a910b8e9..43281e9d2dd 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-koalas.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/koala.tex
+ % !TeX root = ./examples/koala.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% This package is part of the TikZlings package
-% A package to bring cute little animals and other beings into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzlings
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-koalas}[2021/04/16 version v0.6 Drawing koalas in TikZ]
+\ProvidesPackage{tikzlings-koalas}[2021/08/06 version v0.8 Drawing koalas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -56,158 +56,216 @@
body = gray!75!white,
eye/.code = \def\koala@eye{#1},
eye = black,
+ mouth/.code = \def\koala@mouth{#1},
+ mouth = \koala@body!40!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- blush/.code = \koala@blushtrue,
+ blush/.code = \koala@blushtrue
+ \def\koala@blushcolor{#1},
+ blush/.default = red,
sleeping/.code = \koala@sleepingtrue,
- 3D/.code = \koala@threeDtrue,
+ 3D/.code = \koala@threeDtrue
+ \def\koala@mouth{black},
back/.code = \koala@backtrue,
contour/.code = \koala@contourtrue
- \def\koala@contour{#1},
+ \def\koala@contour{#1}
+ \def\koala@blushcolor{#1}
+ \def\koala@mouth{#1},
contour/.default = black,
outline/.forward to = /koala/contour,
}
\def\koala@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.88,0.1) rectangle (0.88, 2.35);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@threeD
+ \def\koala@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifkoala@contour
+ \def\koala@part@draw[##1]{\draw[##1,\koala@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\koala@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
+ \koala@part@draw[\koala@body] (-0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
+ \unless\ifkoala@back
+ \koala@part@draw[\koala@body!40!white] (-0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
+ \koala@part@draw[\koala@body!40!white] (0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
+ \fi% back
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
+ \koala@part@draw[\koala@body!50!black] (-0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=-20];
+ \koala@part@draw[\koala@body] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+ \koala@part@draw[\koala@body!50!black] (0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=20];
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ %
+ % Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifkoala@back
+ \koala@part@draw[\koala@body!40!white] ( 0.425, 0.71) .. controls ( 0.425, 0.41) and ( 0.255, 0.27) .. ( 0 , 0.27) .. controls (-0.255, 0.27) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.255, 1.20) .. ( 0 , 1.20) .. controls ( 0.225, 1.20) and ( 0.425, 1.01) .. ( 0.425, 0.71) -- cycle;
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body] (0,1.67) ellipse[x radius=0.55, y radius=0.45];
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifkoala@back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \koala@part@draw[\koala@body!40!black] (-0.1501, 1.5609) .. controls (-0.1784, 1.4833) and (-0.0827, 1.4108) .. ( 0.0000, 1.4108) .. controls ( 0.0827, 1.4108) and ( 0.1784, 1.4833) .. ( 0.1501, 1.5609) .. controls ( 0.1290, 1.6191) and ( 0.1187, 1.6573) .. ( 0.0750, 1.7010) .. controls ( 0.0336, 1.7424) and (-0.0336, 1.7424) .. (-0.0750, 1.7010) .. controls (-0.1187, 1.6573) and (-0.1290, 1.6191) .. (-0.1501, 1.5609) -- cycle;
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@sleeping
+ \fill[\koala@body!50!black] (0.2534, 1.675) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={20:(0.2925, 1.6925)}] (0.29, 1.68) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-20:(0.2143, 1.6925)}] (0.2168, 1.68) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={40:(0.3255, 1.7025)}] (0.323, 1.69) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-40:(0.1813, 1.7025)}] (0.1838, 1.69) rectangle ++(0.005, 0.03);
+ \fill[\koala@body!50!black] (-0.2534, 1.675) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-20:(-0.2925, 1.6925)}] (-0.29, 1.68) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={20:(-0.2143, 1.6925)}] (-0.2168, 1.68) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={-40:(-0.3255, 1.7025)}] (-0.323, 1.69) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black, even odd rule] (0.3331, 1.741) .. controls (0.3331, 1.685) and (0.1737, 1.685) .. (0.1737, 1.741) .. controls (0.1737, 1.848) and (0.3331, 1.848) .. (0.3331, 1.741) -- cycle (0.328, 1.741) .. controls (0.323, 1.705) and (0.184, 1.705) .. (0.179, 1.741) .. controls (0.184, 1.843) and (0.323, 1.843) .. (0.328, 1.741) -- cycle;
+ \fill[\koala@body!50!black, even odd rule] (-0.3331, 1.741) .. controls (-0.3331, 1.685) and (-0.1737, 1.685) .. (-0.1737, 1.741) .. controls (-0.1737, 1.848) and (-0.3331, 1.848) .. (-0.3331, 1.741) -- cycle (-0.328, 1.741) .. controls (-0.323, 1.705) and (-0.184, 1.705) .. (-0.179, 1.741) .. controls (-0.184, 1.843) and (-0.323, 1.843) .. (-0.328, 1.741) -- cycle;
+ \else% sleeping
+ \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
+ \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
+ \fill[white] (-0.27, 1.76) circle[radius=0.015];
+ \fill[white] (0.24, 1.76) circle[radius=0.015];
+ \fi% sleeping
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\koala@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % optional
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifkoala@blush
+ \fill[\koala@blushcolor,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
+ \fill[\koala@blushcolor,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
+ \fi% blush
+ %
+ \fi% back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname koalahookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.88,0.1) rectangle (0.88, 2.35);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% switch between 2D, 3D and contours, from
-% https://chat.stackexchange.com/transcript/message/45991801#45991801
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@threeD
- \def\koala@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifkoala@contour
- \def\koala@part@draw[##1]{\draw[##1,\koala@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\koala@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Koala]{Will, the koala}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
+%\emph{The koala was generously contributed by @marmot and is named in honour of a \LaTeX{} developer from Down Under}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
-\koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+%\subsection{Package name}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
-\koala@part@draw[\koala@body] (-0.405, 2.1) ellipse[x radius=0.3, y radius=0.23];
-\unless\ifkoala@back
- \koala@part@draw[\koala@body!40!white] (-0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
- \koala@part@draw[\koala@body!40!white] (0.405, 2.1) ellipse[x radius=0.15, y radius=0.12];
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-koalas}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
-\koala@part@draw[\koala@body!50!black] (-0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=-20];
-\koala@part@draw[\koala@body] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
-\koala@part@draw[\koala@body!50!black] (0.745,0.65) ellipse[x radius=0.12, y radius=0.08, rotate=20];
+%\subsection{Basic Usage}
%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+%\begin{tcblisting}{}
+%\koala
+%\end{tcblisting}
%
-% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifkoala@back
- \koala@part@draw[\koala@body!40!white] ( 0.425, 0.71) .. controls ( 0.425, 0.41) and ( 0.255, 0.27) .. ( 0 , 0.27) .. controls (-0.255, 0.27) and (-0.425, 0.41) .. (-0.425, 0.71) .. controls (-0.425, 1.01) and (-0.255, 1.20) .. ( 0 , 1.20) .. controls ( 0.225, 1.20) and ( 0.425, 1.01) .. ( 0.425, 0.71) -- cycle;
-\fi
+%\subsection{Options}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%The basic koala can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\koala[body=blue]
+%\end{tcblisting}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body] (0,1.67) ellipse[x radius=0.55, y radius=0.45];
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\koala[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\koala[mouth=red]
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifkoala@back
+%It can also blush
+%\begin{tcblisting}{}
+%\koala[blush=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\koala@part@draw[\koala@body!40!black] (-0.1501, 1.5609) .. controls (-0.1784, 1.4833) and (-0.0827, 1.4108) .. ( 0.0000, 1.4108) .. controls ( 0.0827, 1.4108) and ( 0.1784, 1.4833) .. ( 0.1501, 1.5609) .. controls ( 0.1290, 1.6191) and ( 0.1187, 1.6573) .. ( 0.0750, 1.7010) .. controls ( 0.0336, 1.7424) and (-0.0336, 1.7424) .. (-0.0750, 1.7010) .. controls (-0.1187, 1.6573) and (-0.1290, 1.6191) .. (-0.1501, 1.5609) -- cycle;
+%and if tired, it is going to take a nap:
+%\begin{tcblisting}{}
+%\koala[sleeping]
+%\end{tcblisting}
%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@sleeping
- \fill[\koala@body!50!black] (0.2534, 1.675) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={20:(0.2925, 1.6925)}] (0.29, 1.68) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-20:(0.2143, 1.6925)}] (0.2168, 1.68) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={40:(0.3255, 1.7025)}] (0.323, 1.69) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-40:(0.1813, 1.7025)}] (0.1838, 1.69) rectangle ++(0.005, 0.03);
- \fill[\koala@body!50!black] (-0.2534, 1.675) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-20:(-0.2925, 1.6925)}] (-0.29, 1.68) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={20:(-0.2143, 1.6925)}] (-0.2168, 1.68) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={-40:(-0.3255, 1.7025)}] (-0.323, 1.69) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black, even odd rule] (0.3331, 1.741) .. controls (0.3331, 1.685) and (0.1737, 1.685) .. (0.1737, 1.741) .. controls (0.1737, 1.848) and (0.3331, 1.848) .. (0.3331, 1.741) -- cycle (0.328, 1.741) .. controls (0.323, 1.705) and (0.184, 1.705) .. (0.179, 1.741) .. controls (0.184, 1.843) and (0.323, 1.843) .. (0.328, 1.741) -- cycle;
- \fill[\koala@body!50!black, even odd rule] (-0.3331, 1.741) .. controls (-0.3331, 1.685) and (-0.1737, 1.685) .. (-0.1737, 1.741) .. controls (-0.1737, 1.848) and (-0.3331, 1.848) .. (-0.3331, 1.741) -- cycle (-0.328, 1.741) .. controls (-0.323, 1.705) and (-0.184, 1.705) .. (-0.179, 1.741) .. controls (-0.184, 1.843) and (-0.323, 1.843) .. (-0.328, 1.741) -- cycle;
-\else
- \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
- \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
- \fill[white] (-0.27, 1.76) circle[radius=0.015];
- \fill[white] (0.24, 1.76) circle[radius=0.015];
-\fi
+%To view the koala from behind:
+%\begin{tcblisting}{}
+%\koala[back]
+%\end{tcblisting}
%
-% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
-\else
- \ifkoala@contour
- \draw[\koala@contour,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
- \else
- \draw[\koala@body!40!black,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%The key \lstinline|3D| will make the koala 3-dimensional:
+%\begin{tcblisting}{}
+%\koala[3D]
+%\end{tcblisting}
%
-% optional
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifkoala@blush
- \ifkoala@contour
- \fill[\koala@contour,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
- \fill[\koala@contour,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
- \else
- \fill[red,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
- \fill[red,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
- \fi
-\fi
-%
-\fi
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname koalahookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
-
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\koala[contour=black]
+%\end{tcblisting}