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-bears.sty        | 27 +++++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)

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

diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
index a02985ca912..63d6a283e54 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
@@ -12,7 +12,7 @@
 % See http://www.latex-project.org/lppl.txt
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-bears}[2020/12/04 version v0.4 Draw teddy bears in TikZ]
+\ProvidesPackage{tikzlings-bears}[2021/03/17 version v0.5 Draw teddy bears in TikZ]
 
 \RequirePackage{tikz}
 \RequirePackage{tikzlings-addons}
@@ -30,6 +30,7 @@
 
 \newif\ifbear@threeD
 \newif\ifbear@back
+\newif\ifbear@contour
 
 \tikzset{
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -46,6 +47,8 @@
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   body/.code         = \def\bear@body{#1},
   body               = brown,
+  eye/.code          = \def\bear@eye{#1},
+  eye                = \bear@body!30!black,  
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %
   % options
@@ -53,6 +56,10 @@
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   3D/.code           = \bear@threeDtrue, 
   back/.code         = \bear@backtrue,  
+  contour/.code      = \bear@contourtrue
+                       \def\bear@contour{#1},
+  contour/.default   = black,  
+  outline/.forward to = /bear/contour,   
 }
 
 \def\bear@draw{%
@@ -76,14 +83,18 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % 
-% switch between 2D and 3D, from
+% switch between 2D, 3D and contours, from
 % https://chat.stackexchange.com/transcript/message/45991801#45991801
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \ifbear@threeD
   \def\bear@part@draw[##1]{\shade[ball color=##1]}
 \else
-  \def\bear@part@draw[##1]{\fill[##1]}
+  \ifbear@contour
+    \def\bear@part@draw[##1]{\draw[##1,\bear@contour,fill=white,line width=\scalingfactor*0.4pt]}
+  \else
+    \def\bear@part@draw[##1]{\fill[##1]}
+  \fi
 \fi
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -143,11 +154,15 @@
 \bear@part@draw[\bear@body!70!white!80!red] (0, 1.5) ellipse[x radius=0.15, y radius=0.08]; 
 %
 % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bear@part@draw[\bear@body!30!black] (-0.155, 1.7) circle[radius=0.05]; 
-\bear@part@draw[\bear@body!30!black] (0.155, 1.7) circle[radius=0.05]; 
+\bear@part@draw[\bear@eye] (-0.155, 1.7) circle[radius=0.05]; 
+\bear@part@draw[\bear@eye] (0.155, 1.7) circle[radius=0.05]; 
 %
 % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\draw[\bear@body!30!black,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+\ifbear@contour
+  \draw[\bear@contour,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+\else
+  \draw[\bear@body!30!black,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+\fi
 %
 \fi
 %
-- 
cgit v1.2.3

