summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-08 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2021-08-08 03:01:03 +0000
commited204b296810be74994f70f76b7f5b849f6e9ecb (patch)
treef39bb9d2abbf54d1fa1a585d245a0942c77e2f05 /graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
parent5991e0faa2ab9a1b9bdb72d6399cff4444b02f35 (diff)
CTAN sync 202108080301
Diffstat (limited to 'graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty')
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty332
1 files changed, 194 insertions, 138 deletions
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
index 9ef0135463..14a02e4356 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
@@ -1,18 +1,18 @@
-% !TeX root = ./examples/sheep.tex
+ % !TeX root = ./examples/sheep.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-sheep}[2021/04/16 version v0.6 Drawing sheep in TikZ]
+\ProvidesPackage{tikzlings-sheep}[2021/08/06 version v0.8 Drawing sheep in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -55,157 +55,213 @@
body = brown!50!darkgray!97!yellow,
eye/.code = \def\sheep@eye{#1},
eye = \sheep@body!50!black,
+ nose/.code = \def\sheep@nose{#1},
+ nose = \sheep@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- blush/.code = \sheep@blushtrue,
+ blush/.code = \sheep@blushtrue
+ \def\sheep@blushcolor{#1},
+ blush/.default = red,
monocle/.code = \sheep@monocletrue,
3D/.code = \sheep@threeDtrue,
back/.code = \sheep@backtrue,
contour/.code = \sheep@contourtrue
- \def\sheep@contour{#1},
+ \def\sheep@contour{#1}
+ \def\sheep@blushcolor{#1}
+ \def\sheep@nose{#1},
contour/.default = black,
outline/.forward to = /sheep/contour,
}
\def\sheep@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-0.7,0.08) rectangle (0.7,2.33);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % 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
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@threeD
+ \def\sheep@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifsheep@contour
+ \def\sheep@part@draw[##1]{\draw[##1,\sheep@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\sheep@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
+ % Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@back
+ \sheep@part@draw[\sheep@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (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;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
+ \fi% back
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ %
+ % Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@back
+ \sheep@part@draw[\sheep@body!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
+ \fi% back
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifsheep@back
+ \sheep@part@draw[\sheep@eye] (0.2, 1.66) circle[radius=0.06];
+ \sheep@part@draw[\sheep@eye] (-0.2, 1.66) circle[radius=0.06];
+ \fi% back
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw[\sheep@nose,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
+ \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
+ %
+ % Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ %
+ % Blush %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@blush
+ \fill[\sheep@blushcolor,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
+ \fill[\sheep@blushcolor,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
+ \fi% blush
+ %
+ % monocle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifsheep@monocle
+ \draw[black,line width=\scalingfactor*0.4pt] (0.2, 1.66) circle[radius=0.09];
+ \draw[black,line width=\scalingfactor*0.4pt,rounded corners=\scalingfactor*0.01pt] (0.26,1.6) .. controls (0.3,1.54) .. (0.3,1.5) .. controls (0.28,1.45) .. (0.35,1.4);
+ \fi% monocle
+ %
+ \fi% end showing details only for front
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname sheephookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\path (-0.7,0.08) rectangle (0.7,2.33);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% 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
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@threeD
- \def\sheep@part@draw[##1]{\shade[ball color=##1]}
-\else
- \ifsheep@contour
- \def\sheep@part@draw[##1]{\draw[##1,\sheep@contour,fill=white,line width=\scalingfactor*0.4pt]}
- \else
- \def\sheep@part@draw[##1]{\fill[##1]}
- \fi
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Body parts (center: x=0)
-%
+%%
+%% Documentation
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Sheep]{Mókollur, the sheep}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbackground\endcsname
-\csname tikzlinghookbackground\endcsname
-%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
-%
-% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \sheep@part@draw[\sheep@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
-\fi
-%
-% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (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;
-%
+%\emph{The sheep was kindly contributed by @Plergux. Mókollur is a bit silly and likes to goof off. This sheep's favourite food are boiled potatoes.}
%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbelly\endcsname
-\csname tikzlinghookbelly\endcsname
+%\subsection{Package name}
%
-% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
-\fi
+%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+%\vspace*{0.5cm}
+%\lstinline|\usepackage{tikzlings-sheep}|
+%\vspace*{0.5cm}
+%\end{tcolorbox}
%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+%\subsection{Basic Usage}
%
-% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
-\fi
+%\begin{tcblisting}{}
+%\sheep
+%\end{tcblisting}
%
-% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
+%\subsection{Options}
%
-% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
-\else
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
-\fi
+%The basic sheep can be modified by changing its colour:
+%\begin{tcblisting}{}
+%\sheep[body=blue]
+%\end{tcblisting}
%
-% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
-\sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
-%
-% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\unless\ifsheep@back
- \sheep@part@draw[\sheep@eye] (0.2, 1.66) circle[radius=0.06];
- \sheep@part@draw[\sheep@eye] (-0.2, 1.66) circle[radius=0.06];
-\fi
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{}
+%\sheep[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{}
+%\sheep[nose=red]
+%\end{tcblisting}
%
-% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@contour
- \draw[\sheep@contour,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
-\else
- \draw[\sheep@body!50!black,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
-\fi
+%The sheep can also blush
+%\begin{tcblisting}{}
+%\sheep[blush=red]
+%\end{tcblisting}
%
-% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
-\sheep@part@draw[\sheep@body!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
+%and put on a monocle
+%\begin{tcblisting}{}
+%\sheep[monocle]
+%\end{tcblisting}
%
-% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+%To view the sheep from behind:
+%\begin{tcblisting}{}
+%\sheep[back]
+%\end{tcblisting}
%
-% Blush %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@blush
- \ifsheep@contour
- \fill[\sheep@contour,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
- \fill[\sheep@contour,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
- \else
- \fill[red,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
- \fill[red,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
- \fi
-\fi
+%The key \lstinline|3D| will make the sheep 3-dimensional:
+%\begin{tcblisting}{}
+%\sheep[3D]
+%\end{tcblisting}
%
-% monocle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifsheep@monocle
- \draw[black,line width=\scalingfactor*0.4pt] (0.2, 1.66) circle[radius=0.09];
- \draw[black,line width=\scalingfactor*0.4pt,rounded corners=\scalingfactor*0.01pt] (0.26,1.6) .. controls (0.3,1.54) .. (0.3,1.5) .. controls (0.28,1.45) .. (0.35,1.4);
-\fi
-%
-\fi % end showing details only for front
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname sheephookbody\endcsname
-\csname tikzlinghookbody\endcsname
-%
-}
+%And finally the \lstinline|contour| key will only draw the outlines:
+%\begin{tcblisting}{}
+%\sheep[contour=black]
+%\end{tcblisting}