summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty26
1 files changed, 20 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
index 49bee258299..abbeb4a1fbe 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-marmots.sty
@@ -11,12 +11,12 @@
% Released under the LaTeX Project Public License v1.3c or later
% See http://www.latex-project.org/lppl.txt
%
-% Version 0.1
-% Nov 9, 2018
+% Version 0.2
+% April 7, 2019
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{tikzlings-marmots}
- [2018/11/09 v0.1 Drawing marmots in TikZ]
+ [2019/04/07 v0.2 Drawing marmots in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -101,6 +101,17 @@
\path (-0.625,0.1) rectangle (0.905, 2.17);
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% store the current scale factor
+% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))}%
+\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% switch between 2D and 3D, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
@@ -193,9 +204,12 @@
%
% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@whiskers
- \foreach \X in {10,20,33}{%
- \fill[\marmot@whiskers] (0,1.6) + (\X:0.08) to[out=\X,in={180-\X}] ++({\X-20}:0.3) --++(0,0.005) to[out={180-\X},in=\X] cycle (0,1.6) + ({180-\X}:0.08) to[out={180-\X},in=\X] ++({200-\X}:0.3) --++(0,0.005) to[out=\X,in={180-\X}] cycle;
- }
+ \fill[\marmot@whiskers] (0.0788, 1.6146) .. controls (0.1658, 1.6299) and (0.2086, 1.5639) .. (0.2956, 1.5486) -- (0.2956, 1.5586) .. controls (0.2097, 1.5737) and (0.1648, 1.6297) .. (0.0788, 1.6146) -- cycle;
+ \fill[\marmot@whiskers] (-0.0788, 1.6146) .. controls (-0.1658, 1.6299) and (-0.2087, 1.5639) .. (-0.2956, 1.5486) -- (-0.2956, 1.5586) .. controls (-0.2097, 1.5737) and (-0.1648, 1.6297) .. (-0.0788, 1.6146) -- cycle;
+ \fill[\marmot@whiskers] (0.0752, 1.6281) .. controls (0.1583, 1.6583) and (0.2171, 1.6309) .. (0.3002, 1.6007) -- (0.3002, 1.6107) .. controls (0.2174, 1.6408) and (0.158, 1.6582) .. (0.0752, 1.6281) -- cycle;
+ \fill[\marmot@whiskers] (-0.0752, 1.6281) .. controls (-0.1583, 1.6583) and (-0.2171, 1.6309) .. (-0.3002, 1.6007) -- (-0.3002, 1.6107) .. controls (-0.2174, 1.6408) and (-0.158, 1.6582) .. (-0.0752, 1.6281) -- cycle;
+ \fill[\marmot@whiskers] (0.0671, 1.6443) .. controls (0.1414, 1.6925) and (0.2182, 1.7164) .. (0.2925, 1.6682) -- (0.2925, 1.6782) .. controls (0.2179, 1.7266) and (0.1417, 1.6927) .. (0.0671, 1.6443) -- cycle;
+ \fill[\marmot@whiskers] (-0.0671, 1.6443) .. controls (-0.1414, 1.6925) and (-0.2182, 1.7164) .. (-0.2925, 1.6682) -- (-0.2925, 1.6782) .. controls (-0.2179, 1.7266) and (-0.1417, 1.6927) .. (-0.0671, 1.6443) -- cycle;
\fi
%
% Teeth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%