texlive[45431] Master/texmf-dist: animate (29sep17)

commits+karl at tug.org commits+karl at tug.org
Fri Sep 29 22:38:25 CEST 2017


Revision: 45431
          http://tug.org/svn/texlive?view=revision&revision=45431
Author:   karl
Date:     2017-09-29 22:38:25 +0200 (Fri, 29 Sep 2017)
Log Message:
-----------
animate (29sep17)

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	2017-09-29 20:38:13 UTC (rev 45430)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-09-29 20:38:25 UTC (rev 45431)
@@ -1,3 +1,7 @@
+2017-09-29
+	* fix: improved button face generation (PDF XObjects) for dvips, based on
+	current pdfbase.sty (pkg media9)
+
 2017-09-22
 	* fix: control button transparency with Distiller; README.md
 

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	2017-09-29 20:38:13 UTC (rev 45430)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-09-29 20:38:25 UTC (rev 45431)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2017/09/22}
+\def\@anim at version{2017/09/29}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -71,7 +71,7 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \RequirePackage{pdfbase}%low level PDF operations
-\@ifpackagelater{pdfbase}{2017/03/23}{}{
+\@ifpackagelater{pdfbase}{2017/09/29}{}{
   \PackageError{animate}{%
     Support package `pdfbase.sty' too old.%
   }{%
@@ -80,21 +80,25 @@
   }%
 }
 \ExplSyntaxOn
+  \let\@anim at literal\pbs_literal:nn
+
   \def\@anim at dictobj#1{
     \pbs_pdfobj:nnn{}{dict}{#1}
     \xdef\@anim at lastobj{\pbs_pdflastobj:}
   }
+
   \def\@anim at arrayobj#1{
     \pbs_pdfobj:nnn{}{array}{#1}
     \xdef\@anim at lastobj{\pbs_pdflastobj:}
   }
+
   \def\@anim at streamobj#1#2{
     \pbs_pdfobj:nnn{}{stream}{{#1}{#2}}
     \xdef\@anim at lastobj{\pbs_pdflastobj:}
   }
 
-  \def\@anim at xform#1#2#3#4{
-    \pbs_pdfxform:nnnnn{#1}{#2}{}{#3}{#4}
+  \def\@anim at xform#1#2#3#4#5{
+    \pbs_pdfxform:nnnnn{#1}{#2}{#3}{#4}{#5}
     \xdef\@anim at lastxform{\pbs_pdflastxform:}
   }
 
@@ -319,7 +323,7 @@
   %create form xobject from box argument
   \ifthenelse{\equal{#4}{!}}{% %%%% new graphics %%%%
     %put graphics into XObject
-    \@anim at xform{1}{0}{}{#3}%
+    \@anim at xform{1}{0}{}{}{#3}%
     \xdef\@anim@@lastxform{\@anim at lastxform}%
     \@anim at newkey{natdims:\@anim at lastxform}{%
       {\@anim at curwd}{\@anim at curht}{\@anim at curdp}%
@@ -342,7 +346,7 @@
           }{\raisebox{\depth}{\box#3}}%
         }%
       }%
-      \@anim at xform{0}{0}{}{#3}%
+      \@anim at xform{0}{0}{}{}{#3}%
     \fi%
   \fi%
   %keep a record of XObject number
@@ -386,7 +390,7 @@
     \fi%
   \fi%
   \ifcase\@anim at method% icon based
-    \@anim at xform{0}{1}{}{\@anim at box}%
+    \@anim at xform{0}{1}{}{}{\@anim at box}%
     %initial visibility
     \ifnum\@anim at poster>\@anim at mtwo\relax% insert poster frame
       \ifnum#2=\@anim at poster\relax%
@@ -425,7 +429,7 @@
       \fi%
     \fi%
     %frame insertion
-    \@anim at xform{0}{1}{}{\@anim at box}%
+    \@anim at xform{0}{1}{}{}{\@anim at box}%
     \@anim at pdfwid{\@anim at animwidth}{\@anim at animheight}{\@anim at animdepth}{%
       /Subtype/Widget%
       \@anim at annotflag%
@@ -468,12 +472,12 @@
     \fi%
     %frame insertion
 %    % marked content method
-%    \@anim at xform{0}{0}{}{\@anim at box}%
+%    \@anim at xform{0}{0}{}{}{\@anim at box}%
 %    \ocgbase at oc@bdc{\@anim at curocg}%
 %    \@anim at refxform{\@anim at lastxform}%
 %    \ocgbase at oc@emc%
     % /OC  method
-    \@anim at xform{0}{0}{/OC \@anim at curocg}{\@anim at box}%
+    \@anim at xform{0}{0}{}{/OC \@anim at curocg}{\@anim at box}%
     \@anim at refxform{\@anim at lastxform}%
   \fi%
 }
@@ -713,60 +717,31 @@
       \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
       \@anim at btnstep}{#1}%
   }
-  \newcount\@anim at objnum
   \def\@anim at xbutton#1#2#3{% #1: name; #2: stroking commands, #3 @anim at num
-    \special{ps:
-      gsave [1 0 0 1 0 0] setmatrix
-      mark
-        /_objdef {@anm at obj\the\@anim at objnum}/BBox [0 0 15 15]
-        \ifx\empty\@anim at alpha\empty\else
-          product (Distiller) search {
-            pop pop pop
-            /Group <</S/Transparency>>
-          }{pop}ifelse
-        \fi
-      /BP pdfmark
-      {
-        %landscape mode (powerdot, geometry /w landscape option)
-        isls{
-          [0 -1 1 0 0 15] concat % rotate by 270 degrees
-          [-1 0 0 1 15 0] concat%  flip around vertical axis
-        }if
-        #2
-      }?pdfmark
-      mark /EP pdfmark
-      \ifx\empty\@anim at alpha\empty\else
-        product (Ghostscript) search {
-          pop pop pop
-          mark {@anm at obj\the\@anim at objnum} <<
-            /Group <</S/Transparency>>
-          >> /PUT pdfmark
-        }{pop}ifelse
-      \fi
-      grestore
-    }%
-    %nested XObject if transparency is added
+    \global\setbox\@anim at box=\hbox to 15bp {\vbox to 15bp {\vss%
+      \@anim at literal{}{#2}%
+    }\hss}%
+    %distill box into XObject
+    \@anim at xform{0}{1}{}{%
+      \ifx\empty\@anim at alpha\empty\else/Group <</S/Transparency>>\fi%
+    }{\@anim at box}%
+    %nested XObject if transparency is to be added
     \ifx\empty\@anim at alpha\empty\else%
-      \edef\@anim at objnum@last{\the\@anim at objnum}%
-      \global\advance\@anim at objnum by \@ne%
-      \special{ps:
-        gsave [1 0 0 1 0 0] setmatrix
-        mark /_objdef {@anm at obj\the\@anim at objnum}/BBox [0 0 15 15]/BP pdfmark
-        \@anim at alpha
-        {product (Distiller) search {
-          pop pop pop
-          mark /CA \@anim at alpha /ca \@anim at alpha /SetTransparency pdfmark
-        }{
-          pop
-          /.setopacityalpha where {pop .setopacityalpha}{pop} ifelse
-        }ifelse} ?pdfmark
-        mark {@anm at obj\@anim at objnum@last} /SP pdfmark
-        mark /EP pdfmark
-        grestore
-      }%
-    \fi%  
-    \@anim at newkey{btn#1:#3}{{@anm at obj\the\@anim at objnum}}%
-    \global\advance\@anim at objnum by \@ne%
+      \global\setbox\@anim at box=\hbox to 15bp {\vbox to 15bp {\vss%
+        \@anim at literal{direct}{%
+          /.setopacityalpha where {%
+            %Ghostscript
+            pop \@anim at alpha\space .setopacityalpha%
+          }{%
+            %Distiller
+            mark /CA \@anim at alpha /ca \@anim at alpha /SetTransparency pdfmark%
+          } ifelse%
+        }%  
+        \@anim at refxform{\@anim at lastxform}%
+      }\hss}%
+      \@anim at xform{0}{0}{}{}{\@anim at box}%
+    \fi%
+    \@anim at newkey{btn#1:#3}{\@anim at lastxform}%
   }
 \else %pdftex/dvipdfmx/xetex
   %stroking commands
@@ -1018,14 +993,14 @@
       \@anim at streamobj{%
         /Type/XObject/Subtype/Form/BBox [0 0 15 15]%
         /Resources <<%
-          /XObject <</R1 \@anim at lastobj>>%
           /ExtGState <<%
-            /R2 <<%
+            /R1 <<%
               /Type/ExtGState/ca \@anim at alpha/CA \@anim at alpha/AIS false%
             >>%
           >>%
+          /XObject <</R2 \@anim at lastobj>>%
         >>%
-      }{/R2 gs /R1 Do Q}%
+      }{/R1 gs /R2 Do}%
     \fi%
     \@anim at newkey{btn#1:#3}{\@anim at lastobj}%
   }
@@ -1618,7 +1593,7 @@
     \ifnum\@anim at poster=\@anim at mtwo\relax%
       \ifdefined\@anim at apdummy\else% empty appearance widget
         \setbox\@anim at box=\hbox{\phantom{x}}%
-        \@anim at xform{0}{0}{}{\@anim at box}%
+        \@anim at xform{0}{0}{}{}{\@anim at box}%
         \xdef\@anim at apdummy{\@anim at lastxform}%
         \@anim at pdfwid{1ex}{1ex}{\z@}{%
           /Subtype/Widget%
@@ -1637,7 +1612,7 @@
   \else%
     \ifdefined\@anim at apdummy\else% empty appearance dummy
       \setbox\@anim at box=\hbox{\phantom{x}}%
-      \@anim at xform{0}{0}{}{\@anim at box}%
+      \@anim at xform{0}{0}{}{}{\@anim at box}%
       \xdef\@anim at apdummy{\@anim at lastxform}%
     \fi%
     \def\@anim at apmk{\@anim at apdummy}%
@@ -1701,7 +1676,7 @@
   \if at anim@mk\else%
     \ifdefined\@anim at apdummy\else% empty appearance dummy
       \setbox\@anim at box=\hbox{\phantom{x}}%
-      \@anim at xform{0}{0}{}{\@anim at box}%
+      \@anim at xform{0}{0}{}{}{\@anim at box}%
       \xdef\@anim at apdummy{\@anim at lastxform}%
     \fi%
   \fi%



More information about the tex-live-commits mailing list