summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty49
1 files changed, 39 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty
index 8446a6c67f8..ab04664ca1f 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bees.sty
@@ -12,7 +12,7 @@
% See http://www.latex-project.org/lppl.txt
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-bees}[2020/12/04 version v0.4 Drawing bees in TikZ]
+\ProvidesPackage{tikzlings-bees}[2021/03/17 version v0.5 Drawing bees in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,6 +31,7 @@
\newif\ifbee@threeD
\newif\ifbee@back
+\newif\ifbee@contour
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -55,8 +56,8 @@
stripes = black,
antennas/.code = \def\bee@antennas{#1},
antennas = black,
- eye/.code = \def\bee@eye{#1},
- eye = black,
+ eye/.code = \def\bee@eye{#1},
+ eye = black,
mouth/.code = \def\bee@mouth{#1},
mouth = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -66,6 +67,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \bee@threeDtrue,
back/.code = \bee@backtrue,
+ contour/.code = \bee@contourtrue
+ \def\bee@contour{#1}
+ \def\bee@antennas{#1}
+ \def\bee@mouth{#1},
+ contour/.default = black,
+ outline/.forward to = /bee/contour,
}
\def\bee@draw{%
@@ -89,14 +96,18 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% switch between 2D and 3D, from
+% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifbee@threeD
\def\bee@part@draw[##1]{\shade[ball color=##1]}
\else
- \def\bee@part@draw[##1]{\fill[##1]}
+ \ifbee@contour
+ \def\bee@part@draw[##1]{\draw[##1,\bee@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else
+ \def\bee@part@draw[##1]{\fill[##1]}
+ \fi
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -117,14 +128,25 @@
\bee@part@draw[\bee@antennas] (0.22,2.30) circle[radius=0.07];
\else
% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
- \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \ifbee@contour
+ \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
+ \else
+ \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
+ \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \fi
\fi
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}
\clip (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
- \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ \ifbee@contour
+ \draw[\bee@contour,fill=white,line width=\scalingfactor*0.8pt] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ \else
+ \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ \fi
% stripes
\bee@part@draw[\bee@stripes] (-0.475,1.3) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
(-0.475,1.0) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
@@ -140,8 +162,15 @@
\ifbee@back
%
% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
- \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \ifbee@contour
+ \bee@part@draw[\bee@wings] (0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (0.45,1.25) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.5,0.8) circle[radius=0.35];
+ \bee@part@draw[\bee@wings] (-0.45,1.25) circle[radius=0.35];
+ \else
+ \fill[\bee@wings] (0.45,1.25) circle[radius=0.35] (0.5,0.8) circle[radius=0.35];
+ \fill[\bee@wings] (-0.45,1.25) circle[radius=0.35](-0.5,0.8) circle[radius=0.35];
+ \fi
\else
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%