From e084623aa9a5bb986ff83a5dadd0acef0ef3a306 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Feb 2022 22:19:45 +0000 Subject: animate (4feb22) git-svn-id: svn://tug.org/texlive/trunk@61875 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/animate/ChangeLog | 3 ++ Master/texmf-dist/doc/latex/animate/animate.pdf | Bin 3753532 -> 3753810 bytes Master/texmf-dist/tex/latex/animate/animate.sty | 43 ++++++++++++++++-------- 3 files changed, 32 insertions(+), 14 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/animate/ChangeLog b/Master/texmf-dist/doc/latex/animate/ChangeLog index b43af114e49..e2ef9c8a9e8 100644 --- a/Master/texmf-dist/doc/latex/animate/ChangeLog +++ b/Master/texmf-dist/doc/latex/animate/ChangeLog @@ -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 diff --git a/Master/texmf-dist/doc/latex/animate/animate.pdf b/Master/texmf-dist/doc/latex/animate/animate.pdf index 7fe63d0830d..1046dfa24c4 100644 Binary files a/Master/texmf-dist/doc/latex/animate/animate.pdf and b/Master/texmf-dist/doc/latex/animate/animate.pdf differ diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty index 9a4fed23749..c18e4f3657b 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}[2020-10-01] -\def\@anim@version{2022/01/31} +\def\@anim@version{2022/02/04} \ProvidesPackage{animate} [\@anim@version\space PDF & SVG animations from files and inline graphics] @@ -411,12 +411,7 @@ \ifdim\@anim@curdp=\@anim@animdepth\else\def\@anim@needresize{1}\fi% % resize content to final dimensions, if necessary \ifnum\@anim@needresize>\z@\relax% - \setbox#3=\hbox{% - \raisebox{-\@anim@animdepth}{% - \resizebox*{\@anim@animwidth}{% - \@anim@animtotalheight}{\raisebox{\depth}{\box#3}}% - }% - }% + \setbox#3=\hbox{\resizebox{\@anim@animwidth}{\@anim@animheight}{\box#3}}% \fi% \ifthenelse{\equal{#4}{newfile}\OR\equal{#4}{inline}}{% \@anim@xform{1}{1}{}{}{#3}% @@ -488,6 +483,11 @@ \if@anim@export% \setboolean{@anim@singleref}{false}\def\@anim@framexform{}% \fi% + % ... also, for method=ocg, we prefer packing content in an xform, as it allows + % higher frame rates + \ifnum\@anim@method=\tw@\if@anim@dvisvgm\else% + \setboolean{@anim@singleref}{false}\def\@anim@framexform{}% + \fi\fi% \if@anim@singleref\else% % put frame content in a box if necessary \setbox\@anim@box=\hbox to \@anim@animwidth{% @@ -501,13 +501,12 @@ \setbox\@anim@box=\hbox{\rotatebox{90}{\box\@anim@box}}% \fi% \fi% - % convert it to an xform - \if@anim@export\else% + \fi% + \ifcase\@anim@method% icon based + \if@anim@singleref\else% \@anim@xform{0}{1}{}{}{\@anim@box}% \let\@anim@framexform\@anim@lastxform% \fi% - \fi% - \ifcase\@anim@method% icon based %initial visibility \ifnum\@anim@poster>\@anim@mtwo\relax% insert poster frame \ifnum#2=\@anim@poster\relax% @@ -547,6 +546,10 @@ \fi% \fi% %frame insertion + \if@anim@singleref\else% + \@anim@xform{0}{1}{}{}{\@anim@box}% + \let\@anim@framexform\@anim@lastxform% + \fi% \@anim@widget{\@anim@animwidth}{\@anim@animheight}{\@anim@animdepth}{% /Subtype/Widget% \@anim@annotflag% @@ -579,9 +582,21 @@ \fi% \fi% %frame insertion - \ocgbase@oc@bdc{\@anim@curocg}% - \@anim@refxform{\@anim@framexform}% - \ocgbase@oc@emc% + \if@anim@dvisvgm% + \if@anim@singleref\else% + \@anim@xform{0}{1}{}{}{\@anim@box}% + \let\@anim@framexform\@anim@lastxform% + \fi% + % `marked content' method for dvisvgm + \ocgbase@oc@bdc{\@anim@curocg}% + \@anim@refxform{\@anim@framexform}% + \ocgbase@oc@emc% + \else% + % /OC method for PDF output, higher frame rates than + % with marked content (BDC/EMC) + \@anim@xform{0}{1}{}{/OC \@anim@curocg}{\@anim@box}% + \@anim@refxform{\@anim@lastxform}% + \fi% \fi% \fi% } -- cgit v1.2.3