summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty19
1 files changed, 15 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
index 33367c1b045..c84c0a2b0a9 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-bears.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-bears}
- [2018/11/09 v0.1 Draw teddy bears in TikZ]
+ [2019/04/07 v0.2 Draw teddy bears in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -63,6 +63,17 @@
\path (-0.8, 0.0) rectangle (0.8, 2.13);
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% 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
@@ -112,6 +123,6 @@
\bear@part@draw[\bear@body!30!black] (0.155, 1.7) circle (0.05);
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\bear@body!30!black] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14, 1.38) -- (-0.14, 1.38) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle;
+\draw[\bear@body!30!black,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
%
} \ No newline at end of file