From ecbacf9e5b13d0940f27ca7c07d3f728256dc5dc Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Thu, 6 Apr 2023 03:04:06 +0000
Subject: CTAN sync 202304060304

---
 .../pgf/contrib/tikzducks/tikzducks-generic.tex    | 62 ++++++++++++++++++++--
 1 file changed, 58 insertions(+), 4 deletions(-)

(limited to 'graphics/pgf/contrib/tikzducks/tikzducks-generic.tex')

diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex b/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex
index 8c5a996f57..019e65e2b7 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex
@@ -41,6 +41,7 @@
 \newif\ifduck@bowtie
 \newif\ifduck@lapel
 \newif\ifduck@aodai
+\newif\ifduck@scarf
 % Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newif\ifduck@alien
 \newif\ifduck@hat
@@ -66,6 +67,7 @@
 \newif\ifduck@devil 
 \newif\ifduck@conicalhat
 \newif\ifduck@sailor
+\newif\ifduck@bobblehat
 % Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newif\ifduck@glasses
 \newif\ifduck@sunglasses
@@ -106,6 +108,8 @@
 \newif\ifduck@cheese
 \newif\ifduck@shovel
 \newif\ifduck@pickaxe
+\newif\ifduck@strawbroom
+\newif\ifduck@broom
 \newif\ifduck@umbrella
 \newif\ifduck@umbrellaclosed
 \newif\ifduck@handbag
@@ -183,6 +187,9 @@
                               \def\duck@aodai{#1},
   ao dai/.forward to        = /duck/aodai,                         
   aodai/.default            = blue!50!black,
+  scarf/.code               = \duck@scarftrue
+                              \def\duck@scarf{#1},
+  scarf/.default            = red!70!black,
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %
   % hair styles
@@ -318,6 +325,10 @@
   sailor/.code              = \duck@sailortrue
                               \def\duck@sailor{#1},
   sailor/.default           = white!80!gray,
+  bobblehat/.code           = \duck@bobblehattrue
+                              \def\duck@bobblehat{#1},
+  bobble hat/.forward to    = /duck/bobblehat,
+  bobblehat/.default        = red!70!black,  
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %
   % Accessories
@@ -485,7 +496,19 @@
   shovel/.default           = gray,    
   pickaxe/.code             = \duck@pickaxetrue
                               \def\duck@pickaxe{#1},
-  pickaxe/.default          = gray,  
+  pickaxe/.default          = gray, 
+  strawbroom/.code          = \duck@strawbroomtrue
+                              \def\duck@strawbroom{#1},
+  strawbroom/.default       = brown!50!white,
+  strawbroomstick/.code     = \def\duck@strawbroomstick{#1},
+  strawbroomstick           = brown,
+  strawbroomribbon/.code    = \def\duck@strawbroomribbon{#1},
+  strawbroomribbon          = red!50!black,
+  broom/.code               = \duck@broomtrue
+                              \def\duck@broom{#1},
+  broom/.default            = brown,
+  broomstick/.code          = \def\duck@broomstick{#1},
+  broomstick                = gray!50!black,  
   umbrella/.code            = \duck@umbrellatrue
                               \def\duck@umbrella{#1},
   umbrella/.default         = cyan,      
@@ -704,6 +727,11 @@
   \fill[\duck@woggle, rounded corners=\scalingfactor*1, rotate=-10] (0.33,1.05) rectangle (0.55,0.98);
 \fi
 %
+% Scarf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@scarf
+  \fill[\duck@scarf] (1.3780,1.2876) .. controls (1.1405,1.0484) and (0.7278,0.8710) .. (0.4865,1.1319) .. controls (0.4312,1.1245) and (0.3749,1.1088) .. (0.3443,1.0553) .. controls (0.4097,0.9269) and (0.4360,0.9534) .. (0.5231,0.8623) -- (0.4780,0.5230) -- (0.5666,0.5486) -- (0.6442,0.5011) -- (0.6584,0.6852) -- (0.6881,0.3913) -- (0.7782,0.4358) -- (0.8543,0.4133) -- (0.7988,0.8309) .. controls (1.0539,0.8635) and (1.1298,0.8415) .. (1.4849,1.1302) .. controls (1.4898,1.1985) and (1.4313,1.2543) .. (1.3780,1.2876) -- cycle;
+\fi
+%
 % buttons (same argument as for the necklace)
 \ifduck@buttons
   \ifduck@jacket
@@ -983,6 +1011,15 @@
   \fill[\duck@sailor]  (1.0390,2.2743) .. controls (0.9475,2.2748) and (0.8569,2.2355) .. (0.7943,2.1690) .. controls (0.7147,2.1872) and (0.6335,2.2098) .. (0.5512,2.2029) .. controls (0.5524,2.1164) and (0.5536,2.0299) .. (0.5547,1.9434) .. controls (0.6637,1.9348) and (0.7679,1.8974) .. (0.8716,1.8653) .. controls (1.0321,1.8101) and (1.1932,1.7522) .. (1.3420,1.6697) .. controls (1.3671,1.6622) and (1.3911,1.6147) .. (1.4083,1.6518) .. controls (1.4623,1.7160) and (1.5163,1.7802) .. (1.5702,1.8444) .. controls (1.5154,1.8979) and (1.4433,1.9287) .. (1.3757,1.9624) .. controls (1.3666,2.1156) and (1.2403,2.2511) .. (1.0881,2.2707) .. controls (1.0718,2.2731) and (1.0554,2.2743) .. (1.0390,2.2743) -- cycle;
 \fi
 %
+% Bobble hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@bobblehat
+  \pgfinterruptboundingbox
+    \fill[\duck@bobblehat] (0.4639,1.7996) .. controls (0.5789,1.8438) and (1.3853,1.6023) .. (1.4046,1.4672) .. controls (1.4581,1.5025) and (1.5242,1.5917) .. (1.4544,1.6879) .. controls (1.5205,2.1879) and (0.7711,2.3780) .. (0.5562,1.9848) .. controls (0.4314,1.9650) and (0.4277,1.8625) .. (0.4639,1.7996) -- cycle;
+  \fill[\duck@bobblehat] (1.1,2.2) circle [radius=0.1];
+  \endpgfinterruptboundingbox
+  \path (0.43,1.3) rectangle (1.5,2.3);  
+\fi
+%
 % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \csname duckhookhat\endcsname
 %
@@ -1297,6 +1334,23 @@
   \fill[\duck@pickaxe]  (-0.0085, 0.6858) .. controls (0.6422, 0.3523) and (0.7609, 0.3068) .. (1.4114, 0.1108) .. controls (0.6589, 0.1246) and (0.5556, 0.1887) .. (-0.0085, 0.6858) -- cycle;
 \fi
 %
+% strawbroom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@strawbroom
+  \fill[\duck@strawbroomstick] (0.9160,0.5478) -- (1.2792,1.6574) .. controls (1.3063,1.6961) and (1.3956,1.6649) .. (1.3688,1.6176) -- (0.9508,0.5179) .. controls (0.9360,0.5142) and (0.9202,0.5331) .. (0.9160,0.5478) -- cycle;
+  \fill[\duck@strawbroom] (0.5528,0.2890) .. controls (0.6449,0.3598) and (0.7460,0.5693) .. (0.8911,0.6871) .. controls (0.9481,0.7215) and (1.0395,0.6925) .. (1.0553,0.6224) .. controls (1.1219,0.4385) and (0.9965,0.2147) .. (1.0056,0.1000) .. controls (0.8926,0.0241) and (0.5950,0.2078) .. (0.5528,0.2890) -- cycle;
+  \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7916,0.5876) .. controls (0.7916,0.5876) and (0.8210,0.5404) .. (0.8451,0.5304) .. controls (0.8708,0.5197) and (0.9021,0.5419) .. (0.9284,0.5329) .. controls (0.9544,0.5240) and (0.9663,0.4903) .. (0.9919,0.4806) .. controls (1.0148,0.4720) and (1.0653,0.4781) .. (1.0653,0.4781);
+  \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7565,0.5493) .. controls (0.7565,0.5493) and (0.7897,0.4961) .. (0.8169,0.4848) .. controls (0.8458,0.4727) and (0.8812,0.4978) .. (0.9109,0.4876) .. controls (0.9401,0.4776) and (0.9535,0.4396) .. (0.9824,0.4287) .. controls (1.0083,0.4189) and (1.0652,0.4259) .. (1.0652,0.4259);
+\fi
+%
+% broom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@broom
+  \scope[rotate=-10]
+    \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.9, 1.8) -- ++(0,-1.4);
+    \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.6, 0.42) -- ++(0.6,0);
+    \fill[\duck@broom] (0.6, 0.40) -- ++(-0.05,-0.1) -- ++(0.7,0) -- ++(-0.05, 0.1) -- cycle;
+  \endscope
+\fi
+%
 % umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \ifduck@umbrella
   \path (0.2,0.4) rectangle (2.22,2.7);
@@ -1361,10 +1415,10 @@
  \edef\randomaccessories{\accessories}%
 }
 
-\def\randuck{%
+\newcommand*{\randuck}[1][]{%
   \shuffleducks%
-  \duck[\randomhead, \randomaccessories]%
-}
+  \duck[\randomhead, \randomaccessories, #1]%
+}  
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-- 
cgit v1.2.3

