texlive[61875] Master/texmf-dist: animate (4feb22)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 4 23:19:45 CET 2022


Revision: 61875
          http://tug.org/svn/texlive?view=revision&revision=61875
Author:   karl
Date:     2022-02-04 23:19:45 +0100 (Fri, 04 Feb 2022)
Log Message:
-----------
animate (4feb22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
    trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
    trunk/Master/texmf-dist/tex/latex/animate/animate.sty

Modified: trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2022-02-04 22:19:22 UTC (rev 61874)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2022-02-04 22:19:45 UTC (rev 61875)
@@ -1,3 +1,6 @@
+2022-02-04
+	* fix: ocg method: moving back to /OC method (instead of BDC/EMC)
+
 2022-01-31
 	* improvement: optimizing XObject nesting for smaller output files
 

Modified: trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2022-02-04 22:19:22 UTC (rev 61874)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2022-02-04 22:19:45 UTC (rev 61875)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}[2020-10-01]
 
-\def\@anim at version{2022/01/31}
+\def\@anim at version{2022/02/04}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF & SVG animations from files and inline graphics]
 
@@ -411,12 +411,7 @@
   \ifdim\@anim at curdp=\@anim at animdepth\else\def\@anim at needresize{1}\fi%
   % resize content to final dimensions, if necessary
   \ifnum\@anim at needresize>\z@\relax%
-    \setbox#3=\hbox{%
-      \raisebox{-\@anim at animdepth}{%
-        \resizebox*{\@anim at animwidth}{%
-          \@anim at animtotalheight}{\raisebox{\depth}{\box#3}}%
-      }%
-    }%
+    \setbox#3=\hbox{\resizebox{\@anim at animwidth}{\@anim at animheight}{\box#3}}%
   \fi%
   \ifthenelse{\equal{#4}{newfile}\OR\equal{#4}{inline}}{%
     \@anim at xform{1}{1}{}{}{#3}%
@@ -488,6 +483,11 @@
   \if at anim@export%
     \setboolean{@anim at singleref}{false}\def\@anim at framexform{}%
   \fi%
+  % ... also, for method=ocg, we prefer packing content in an xform, as it allows
+  % higher frame rates
+  \ifnum\@anim at method=\tw@\if at anim@dvisvgm\else%
+    \setboolean{@anim at singleref}{false}\def\@anim at framexform{}%
+  \fi\fi%
   \if at anim@singleref\else%
     % put frame content in a box if necessary
     \setbox\@anim at box=\hbox to \@anim at animwidth{%
@@ -501,13 +501,12 @@
         \setbox\@anim at box=\hbox{\rotatebox{90}{\box\@anim at box}}%
       \fi%
     \fi%
-    % convert it to an xform
-    \if at anim@export\else%
+  \fi%
+  \ifcase\@anim at method% icon based
+    \if at anim@singleref\else%
       \@anim at xform{0}{1}{}{}{\@anim at box}%
       \let\@anim at framexform\@anim at lastxform%
     \fi%
-  \fi%
-  \ifcase\@anim at method% icon based
     %initial visibility
     \ifnum\@anim at poster>\@anim at mtwo\relax% insert poster frame
       \ifnum#2=\@anim at poster\relax%
@@ -547,6 +546,10 @@
       \fi%
     \fi%
     %frame insertion
+    \if at anim@singleref\else%
+      \@anim at xform{0}{1}{}{}{\@anim at box}%
+      \let\@anim at framexform\@anim at lastxform%
+    \fi%
     \@anim at widget{\@anim at animwidth}{\@anim at animheight}{\@anim at animdepth}{%
       /Subtype/Widget%
       \@anim at annotflag%
@@ -579,9 +582,21 @@
         \fi%
       \fi%
       %frame insertion
-      \ocgbase at oc@bdc{\@anim at curocg}%
-      \@anim at refxform{\@anim at framexform}%
-      \ocgbase at oc@emc%
+      \if at anim@dvisvgm%
+        \if at anim@singleref\else%
+          \@anim at xform{0}{1}{}{}{\@anim at box}%
+          \let\@anim at framexform\@anim at lastxform%
+        \fi%
+        % `marked content' method for dvisvgm
+        \ocgbase at oc@bdc{\@anim at curocg}%
+        \@anim at refxform{\@anim at framexform}%
+        \ocgbase at oc@emc%
+      \else%
+        % /OC method for PDF output, higher frame rates than
+        % with marked content (BDC/EMC)
+        \@anim at xform{0}{1}{}{/OC \@anim at curocg}{\@anim at box}%
+        \@anim at refxform{\@anim at lastxform}%
+      \fi%
     \fi%
   \fi%
 }



More information about the tex-live-commits mailing list.