diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.sty | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.sty index 60fc08220a0..f7fa99eb887 100644 --- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.sty +++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-mice.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-mice} - [2018/11/09 v0.1 Drawing mice in TikZ] + [2019/04/07 v0.2 Drawing mice in TikZ] \RequirePackage{tikz} \RequirePackage{tikzlings-addons} @@ -68,6 +68,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 @@ -109,9 +120,12 @@ \mouse@part@draw[\mouse@body!65!white,rotate around={\mouse@rotatearms:(-0.47,1.15)}] (-0.47,0.93) ellipse (0.13 and 0.24); % % Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\foreach \X in {10,20,33}{% - \fill[\mouse@body!50!black] (0,1.2) + (\X:0.08) to[out=\X,in={180-\X}] ++({\X-20}:0.3) --++(0,0.01) to[out={180-\X},in=\X] cycle (0,1.2) + ({180-\X}:0.08) to[out={180-\X},in=\X] ++({200-\X}:0.3) --++(0,0.01) to[out=\X,in={180-\X}] cycle; -} +\fill[\mouse@body!50!black] (0.0788, 1.2046) .. controls (0.1658, 1.2199) and (0.2086, 1.1539) .. (0.2956, 1.1386) -- (0.2956, 1.1486) .. controls (0.2097, 1.1637) and (0.1648, 1.2197) .. (0.0788, 1.2046) -- cycle; +\fill[\mouse@body!50!black] (-0.0788, 1.2046) .. controls (-0.1658, 1.2199) and (-0.2087, 1.1539) .. (-0.2956, 1.1386) -- (-0.2956, 1.1486) .. controls (-0.2097, 1.1637) and (-0.1648, 1.2197) .. (-0.0788, 1.2046) -- cycle; +\fill[\mouse@body!50!black] (0.0752, 1.2181) .. controls (0.1583, 1.2483) and (0.2171, 1.2209) .. (0.3002, 1.1907) -- (0.3002, 1.2007) .. controls (0.2174, 1.2308) and (0.158, 1.2482) .. (0.0752, 1.2181) -- cycle; +\fill[\mouse@body!50!black] (-0.0752, 1.2181) .. controls (-0.1583, 1.2483) and (-0.2171, 1.2209) .. (-0.3002, 1.1907) -- (-0.3002, 1.2007) .. controls (-0.2174, 1.2308) and (-0.158, 1.2482) .. (-0.0752, 1.2181) -- cycle; +\fill[\mouse@body!50!black] (0.0671, 1.2343) .. controls (0.1414, 1.2825) and (0.2182, 1.3064) .. (0.2925, 1.2582) -- (0.2925, 1.2682) .. controls (0.2179, 1.3166) and (0.1417, 1.2827) .. (0.0671, 1.2343) -- cycle; +\fill[\mouse@body!50!black] (-0.0671, 1.2343) .. controls (-0.1414, 1.2825) and (-0.2182, 1.3064) .. (-0.2925, 1.2582) -- (-0.2925, 1.2682) .. controls (-0.2179, 1.3166) and (-0.1417, 1.2827) .. (-0.0671, 1.2343) -- cycle; % % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \mouse@part@draw[\mouse@body!50!black] (0, 1.248) circle (0.09); |