From 33ae88e5a364265d921e4db20d33f86d401a095f Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 17 Mar 2021 21:39:31 +0000
Subject: tikzlings (17mar21)

git-svn-id: svn://tug.org/texlive/trunk@58469 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/tikzlings/tikzlings-pandas.sty       | 33 ++++++++++++++++------
 1 file changed, 25 insertions(+), 8 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-pandas.sty')

diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-pandas.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-pandas.sty
index d410a514605..dd3862376e3 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-pandas.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-pandas.sty
@@ -12,7 +12,7 @@
 % See http://www.latex-project.org/lppl.txt
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-pandas}[2020/12/04 version v0.4 Drawing pandas in TikZ]
+\ProvidesPackage{tikzlings-pandas}[2021/03/17 version v0.5 Drawing pandas in TikZ]
 
 \RequirePackage{tikz}
 \RequirePackage{tikzlings-addons}
@@ -31,6 +31,7 @@
 
 \newif\ifpanda@threeD
 \newif\ifpanda@back
+\newif\ifpanda@contour
 
 \tikzset{
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -47,6 +48,10 @@
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   body/.code         = \def\panda@body{#1},
   body               = white!90!black,
+  eye/.code          = \def\panda@eye{#1},
+  eye                = white, 
+  pupil/.code        = \def\panda@pupil{#1},
+  pupil              = black,    
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %
   % options
@@ -54,6 +59,10 @@
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   3D/.code           = \panda@threeDtrue, 
   back/.code         = \panda@backtrue,  
+  contour/.code      = \panda@contourtrue
+                       \def\panda@contour{#1},
+  contour/.default   = black,  
+  outline/.forward to = /panda/contour,   
 }
 
 \def\panda@draw{%
@@ -77,14 +86,18 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % 
-% switch between 2D and 3D, from
+% switch between 2D, 3D and contours, from
 % https://chat.stackexchange.com/transcript/message/45991801#45991801
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \ifpanda@threeD
   \def\panda@part@draw[##1]{\shade[ball color=##1]}
 \else
-  \def\panda@part@draw[##1]{\fill[##1]}
+  \ifpanda@contour
+    \def\panda@part@draw[##1]{\draw[##1,\panda@contour,fill=white,line width=\scalingfactor*0.4pt]}
+  \else
+    \def\panda@part@draw[##1]{\fill[##1]}
+  \fi
 \fi
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -137,13 +150,17 @@
 % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \panda@part@draw[black] (0.3732, 1.6905) .. controls (0.3498, 1.767) and (0.2032, 1.8059) .. (0.0944, 1.7715) .. controls (-0.0145, 1.7371) and (0.173, 1.5479) .. (0.2508, 1.5443) .. controls (0.3286, 1.5407) and (0.3965, 1.614) .. (0.3732, 1.6905) -- cycle;
 \panda@part@draw[black] (-0.3732, 1.6905) .. controls (-0.3498, 1.767) and (-0.2032, 1.8059) .. (-0.0944, 1.7715) .. controls (0.0145, 1.7371) and (-0.173, 1.5479) .. (-0.2508, 1.5443) .. controls (-0.3286, 1.5407) and (-0.3965, 1.614) .. (-0.3732, 1.6905) -- cycle;
-\panda@part@draw[white] (-0.18, 1.7) circle[radius=0.05];
-\panda@part@draw[white] (0.18, 1.7) circle[radius=0.05];
-\panda@part@draw[black] (0.17, 1.695) circle[radius=0.02];
-\panda@part@draw[black] (-0.17, 1.695) circle[radius=0.02];
+\panda@part@draw[\panda@eye] (-0.18, 1.7) circle[radius=0.05];
+\panda@part@draw[\panda@eye] (0.18, 1.7) circle[radius=0.05];
+\panda@part@draw[\panda@pupil] (0.17, 1.695) circle[radius=0.02];
+\panda@part@draw[\panda@pupil] (-0.17, 1.695) circle[radius=0.02];
 %
 % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\draw[black,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506)  .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+\ifpanda@contour
+  \draw[\panda@contour,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506)  .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+\else
+  \draw[black,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506)  .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+\fi
 %
 % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \panda@part@draw[black] (0,1.55) ellipse[x radius=0.07, y radius=0.04];
-- 
cgit v1.2.3

