summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty36
1 files changed, 28 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
index 0ec3eebb1c5..dc46283d8e9 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
@@ -12,7 +12,7 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-marmots}[2020/12/04 version v0.4 Drawing marmots in TikZ]
+\ProvidesPackage{tikzlings-marmots}[2021/03/17 version v0.5 Drawing marmots in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -59,6 +59,7 @@
\newif\ifmarmot@leftstep
\newif\ifmarmot@rightstep
\newif\ifmarmot@back
+\newif\ifmarmot@contour
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -75,6 +76,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.code = \def\marmot@body{#1},
body = brown,
+ eye/.code = \def\marmot@eye{#1},
+ eye = \marmot@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -96,6 +99,10 @@
rightstep/.code = \marmot@rightsteptrue,
right step/.forward to = /marmot/rightstep,
back/.code = \marmot@backtrue,
+ contour/.code = \marmot@contourtrue
+ \def\marmot@contour{#1},
+ contour/.default = black,
+ outline/.forward to = /marmot/contour,
}
\def\marmot@draw{%
@@ -119,14 +126,18 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% switch between 2D and 3D, from
+% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@threeD
\def\marmot@part@draw[##1]{\shade[ball color=##1]}
\else
- \def\marmot@part@draw[##1]{\fill[##1]}
+ \ifmarmot@contour
+ \def\marmot@part@draw[##1]{\draw[##1,\marmot@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else
+ \def\marmot@part@draw[##1]{\fill[##1]}
+ \fi
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -210,11 +221,15 @@
\marmot@part@draw[\marmot@body!50!black] (0,1.6) circle[radius=0.08];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\marmot@part@draw[\marmot@body!50!black] (-0.155,1.77) circle[radius=0.05];
-\marmot@part@draw[\marmot@body!50!black] (0.155,1.77) circle[radius=0.05];
+\marmot@part@draw[\marmot@eye] (-0.155,1.77) circle[radius=0.05];
+\marmot@part@draw[\marmot@eye] (0.155,1.77) circle[radius=0.05];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\marmot@body!50!black] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
+\ifmarmot@contour
+ \fill[\marmot@contour] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
+\else
+ \fill[\marmot@body!50!black] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
+\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -224,8 +239,13 @@
%
% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@blush
- \fill[red,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
- \fill[red,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
+ \ifmarmot@contour
+ \fill[\marmot@contour,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
+ \fill[\marmot@contour,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
+ \else
+ \fill[red,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
+ \fill[red,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
+ \fi
\fi
%
% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%