summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty17
1 files changed, 14 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty
index b1f9cb02fe6..c084e99bcb6 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-snowmans.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-snowmans}
- [2018/11/09 v0.1 Draw snowmans in TikZ]
+ [2019/04/07 v0.2 Draw snowmans in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -71,6 +71,17 @@
\path (-0.75, 0.0) rectangle (0.75, 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