summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-17 21:39:31 +0000
committerKarl Berry <karl@freefriends.org>2021-03-17 21:39:31 +0000
commit33ae88e5a364265d921e4db20d33f86d401a095f (patch)
treed2d34a5e1e9bec0d7dcf76600fac0c77585d16b7 /Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty
parentea174d11ebe4836a256865f9b5c7f3b1e9b72d72 (diff)
tikzlings (17mar21)
git-svn-id: svn://tug.org/texlive/trunk@58469 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty24
1 files changed, 19 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty
index feebc6f2c6c..8955aff4192 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-owls.sty
@@ -12,7 +12,7 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-owls}[2020/12/04 version v0.4 Draw owls in TikZ]
+\ProvidesPackage{tikzlings-owls}[2021/03/17 version v0.5 Draw owls in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,6 +31,7 @@
\newif\ifowl@threeD
\newif\ifowl@back
+\newif\ifowl@contour
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -62,6 +63,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \owl@threeDtrue,
back/.code = \owl@backtrue,
+ contour/.code = \owl@contourtrue
+ \def\owl@contour{#1},
+ contour/.default = black,
+ outline/.forward to = /owl/contour,
}
\def\owl@draw{%
@@ -85,14 +90,18 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% switch between 2D and 3D, from
+% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifowl@threeD
\def\owl@part@draw[##1]{\shade[ball color=##1]}
\else
- \def\owl@part@draw[##1]{\fill[##1]}
+ \ifowl@contour
+ \def\owl@part@draw[##1]{\draw[##1,\owl@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else
+ \def\owl@part@draw[##1]{\fill[##1]}
+ \fi
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -139,9 +148,14 @@
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifowl@back\else
- \fill[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \ifowl@contour
+ \owl@part@draw[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \owl@part@draw[\owl@eye] (0.28, 1.6) circle[radius=0.22];
+ \else
+ \fill[\owl@eye] (-0.28, 1.6) circle[radius=0.22];
+ \fill[\owl@eye] (0.28, 1.6) circle[radius=0.22];
+ \fi
\owl@part@draw[\owl@pupil] (-0.28, 1.6) circle[radius=0.15];
- \fill[\owl@eye] (0.28, 1.6) circle[radius=0.22];
\owl@part@draw[\owl@pupil] (0.28, 1.6) circle[radius=0.15];
\owl@part@draw[white] (0.25, 1.64) circle[radius=0.03];
\owl@part@draw[white] (-0.31, 1.64) circle[radius=0.03];