From c4e9dec3e0c2a59adf33d09fe440f3c39944f7ed Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 22 Feb 2017 23:04:10 +0000
Subject: animate (22feb17)

git-svn-id: svn://tug.org/texlive/trunk@43307 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/animate/animate.sty | 47 +++++++++++--------------
 1 file changed, 20 insertions(+), 27 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/animate/animate.sty')

diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 730e5f81410..9e8f0cfbb24 100644
--- a/Master/texmf-dist/tex/latex/animate/animate.sty
+++ b/Master/texmf-dist/tex/latex/animate/animate.sty
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim@version{2017/02/03}
+\def\@anim@version{2017/02/22}
 \ProvidesPackage{animate}
 [\@anim@version\space PDF animations from files and inline graphics]
 
@@ -267,21 +267,14 @@
   %#1 file name, #2 page No. (multipage files), #3 Form XObj ID
   \@anim@newkey{file:\@anim@pdfmdfivesum{#1}.#2}{#3}%
 }
-%retrieve nat. dimensions from XObjects
-\def\@anim@xobjnatwd#1{% #1 Form XObj ID
-  \@anim@getkeyval{natwidth:#1}%
-}
-\def\@anim@xobjnatht#1{% #1 Form XObj ID
-  \@anim@getkeyval{natheight:#1}%
-}
-\def\@anim@xobjnatdp#1{% #1 Form XObj ID
-  \@anim@getkeyval{natdepth:#1}%
-}
-\def\@anim@xobjnatdims#1#2#3#4{% Form XObj ID, wd, ht, dp
-  \@anim@newkey{natwidth:#1}{#2}%
-  \@anim@newkey{natheight:#1}{#3}%
-  \@anim@newkey{natdepth:#1}{#4}%
-}
+
+\def\@anim@firstofthree#1#2#3{#1}
+\def\@anim@secndofthree#1#2#3{#2}
+\def\@anim@thirdofthree#1#2#3{#3}
+%macros for recalling saved nat. dimensions
+\def\@anim@xformnatwd#1{\expandafter\@anim@firstofthree#1}
+\def\@anim@xformnatht#1{\expandafter\@anim@secndofthree#1}
+\def\@anim@xformnatdp#1{\expandafter\@anim@thirdofthree#1}
 
 %helper macro that typesets graphics file into savebox
 \ifpdf
@@ -344,15 +337,14 @@
     \ifx\@anim@gropts\@empty\if@anim@multipage\message{<#4>}\fi\fi%
     \@anim@makefileknown{#3}{#4.\@anim@gropts}{\@anim@@lastxform}%
   }{% file known, re-use existing form xobject
-    \setbox\@anim@box=%
-      \hbox to \@anim@xobjnatwd{\@anim@fileknown{#3}{#4.\@anim@gropts}}{%
-        \vrule width \z@
-          height \@anim@xobjnatht{\@anim@fileknown{#3}{#4.\@anim@gropts}}
-          depth \@anim@xobjnatdp{\@anim@fileknown{#3}{#4.\@anim@gropts}}%
-          \hss%
-      }%
-    \@anim@xinline{#1}{#2}{%
-      \@anim@box}{\@anim@fileknown{#3}{#4.\@anim@gropts}}%
+    \edef\@anim@curxform{\@anim@fileknown{#3}{#4.\@anim@gropts}}%
+    \edef\@anim@curndims{\@anim@getkeyval{natdims:\@anim@curxform}}% nat. dims
+    \setbox\@anim@box=\hbox to \@anim@xformnatwd{\@anim@curndims}{%
+      \vrule width \z@
+        height \@anim@xformnatht{\@anim@curndims}
+        depth \@anim@xformnatdp{\@anim@curndims}\hss%
+    }%
+    \@anim@xinline{#1}{#2}{\@anim@box}{\@anim@curxform}%
   }%
 }
 
@@ -383,8 +375,9 @@
     %put graphics into XObject
     \@anim@xform{1}{0}{#3}%
     \xdef\@anim@@lastxform{\@anim@lastxform}%
-    \@anim@xobjnatdims{\@anim@lastxform}{%
-      \@anim@curwd}{\@anim@curht}{\@anim@curdp}%
+    \@anim@newkey{natdims:\@anim@lastxform}{%
+      {\@anim@curwd}{\@anim@curht}{\@anim@curdp}%
+    }%
   }{%
     \xdef\@anim@lastxform{#4}%
   }%
-- 
cgit v1.2.3

