diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-17 21:39:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-17 21:39:31 +0000 |
commit | 33ae88e5a364265d921e4db20d33f86d401a095f (patch) | |
tree | d2d34a5e1e9bec0d7dcf76600fac0c77585d16b7 /Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty | |
parent | ea174d11ebe4836a256865f9b5c7f3b1e9b72d72 (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-penguins.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty index e69f4e87891..51c9d2bf362 100644 --- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty +++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-penguins.sty @@ -12,7 +12,7 @@ % See http://www.latex-project.org/lppl.txt % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ProvidesPackage{tikzlings-penguins}[2020/12/04 version v0.4 Draw penguins in TikZ] +\ProvidesPackage{tikzlings-penguins}[2021/03/17 version v0.5 Draw penguins in TikZ] \RequirePackage{tikz} \RequirePackage{tikzlings-addons} @@ -31,6 +31,7 @@ \newif\ifpenguin@threeD \newif\ifpenguin@back +\newif\ifpenguin@contour \tikzset{ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -63,7 +64,11 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3D/.code = \penguin@threeDtrue, - back/.code = \penguin@backtrue, + back/.code = \penguin@backtrue, + contour/.code = \penguin@contourtrue + \def\penguin@contour{#1}, + contour/.default = black, + outline/.forward to = /penguin/contour, } \def\penguin@draw{% @@ -87,14 +92,18 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% switch between 2D and 3D, from +% switch between 2D, 3D and contours, from % https://chat.stackexchange.com/transcript/message/45991801#45991801 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifpenguin@threeD \def\penguin@part@draw[##1]{\shade[ball color=##1]} \else - \def\penguin@part@draw[##1]{\fill[##1]} + \ifpenguin@contour + \def\penguin@part@draw[##1]{\draw[##1,\penguin@contour,fill=white,line width=\scalingfactor*0.4pt]} + \else + \def\penguin@part@draw[##1]{\fill[##1]} + \fi \fi % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -141,10 +150,17 @@ % % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifpenguin@back\else - \fill[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10]; - \fill[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3]; - \fill[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10]; - \fill[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3]; + \ifpenguin@contour + \penguin@part@draw[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10]; + \penguin@part@draw[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3]; + \penguin@part@draw[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10]; + \penguin@part@draw[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3]; + \else + \fill[\penguin@eye] (-0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=-10]; + \fill[\penguin@pupil] (-0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=-3]; + \fill[\penguin@eye] (0.175,1.64) ellipse[x radius=0.1, y radius=0.15, rotate=10]; + \fill[\penguin@pupil] (0.145,1.625) ellipse[x radius=0.0357, y radius=0.0714, rotate=3]; + \fi \fi % % Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |