summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-07 21:21:35 +0000
committerKarl Berry <karl@freefriends.org>2019-04-07 21:21:35 +0000
commitd71a23f77ba5aa8ad94858efe8080b2cc100bb25 (patch)
tree40b59b167bfa17b10adb5a738a32b0262986016a /Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty
parent1f825a1d4a63908fb04cf83a3f531201d2023847 (diff)
tikzlings (7apr19)
git-svn-id: svn://tug.org/texlive/trunk@50841 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty17
1 files changed, 14 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty
index e9d2f7898a2..1a262ca9475 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-coatis.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-coatis}
- [2018/11/09 v0.1 Drawing coatis in TikZ]
+ [2019/04/07 v0.2 Drawing coatis in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -68,6 +68,17 @@
\path (-0.84,0.1) rectangle (1.63,2.26);
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% 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