texlive[45367] Master/texmf-dist: animate (21sep17)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 21 22:55:23 CEST 2017


Revision: 45367
          http://tug.org/svn/texlive?view=revision&revision=45367
Author:   karl
Date:     2017-09-21 22:55:23 +0200 (Thu, 21 Sep 2017)
Log Message:
-----------
animate (21sep17)

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

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/animate/files/mailto.eps

Modified: trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-09-21 00:21:29 UTC (rev 45366)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-09-21 20:55:23 UTC (rev 45367)
@@ -1,7 +1,9 @@
+2017-09-21
+	* new: option `buttonalpha' for adding transparency to control buttons
+
 2017-08-11
 	* new: `speed' property added to the JS animation object for scaling
 	overall animation speed
-	* fix: code of L-Attractor example improved
 
 2017-05-18
 	* new: configurable animation controls

Modified: trunk/Master/texmf-dist/doc/latex/animate/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README	2017-09-21 00:21:29 UTC (rev 45366)
+++ trunk/Master/texmf-dist/doc/latex/animate/README	2017-09-21 20:55:23 UTC (rev 45367)
@@ -41,7 +41,8 @@
                     keepaspectratio, scale=<factor>, nomouse,
                     autopause, autoplay, autoresume, controls[=all | none | ...],
                     final, draft,
-                    buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
+                    buttonsize=<size>,
+                    buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
                     loop, palindrome, step,
                     poster[=first | <num> | last | none],
                     method=icon | widget | ocg, dvipdfmx, xetex,
@@ -66,7 +67,8 @@
                     keepaspectratio, scale=<factor>, nomouse,
                     autopause, autoplay, autoresume, final, draft,
                     controls[=all | none | ...],
-                    buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
+                    buttonsize=<size>,
+                    buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
                     loop, palindrome, step, measure,
                     poster[=first | <num> | last | none],
                     begin={<begin text>}, end={<end text>},
@@ -108,6 +110,6 @@
 
 This material is subject to the LaTeX Project Public License. See
 
-  http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
+  http://mirrors.ctan.org/macros/latex/base/lppl.txt
 
 for the details of that license.

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

Modified: trunk/Master/texmf-dist/source/latex/animate/animate.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/animate/animate.tex	2017-09-21 00:21:29 UTC (rev 45366)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2017-09-21 20:55:23 UTC (rev 45367)
@@ -4,12 +4,12 @@
 % Copyright 2007--\today Alexander Grahn
 %
 % This material is subject to the LaTeX Project Public License. See
-%    http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
+%    http://mirrors.ctan.org/macros/latex/base/lppl.txt
 % for the details of that license.
 %
 \documentclass[a4paper]{article}
 \frenchspacing
-\usepackage[buttonbg=0.9]{animate}
+\usepackage[buttonbg=0.9,buttonalpha=0.1]{animate}
 \usepackage[UKenglish]{babel}
 \usepackage{pst-3dplot}
 \usepackage{pst-node,pst-plot,pst-tools,pst-text,pst-ode}
@@ -90,7 +90,7 @@
 \def\@anim at sanitizeColon{}\def\@anim at sanitizeJS{}\def\@anim at endsanitize{}
 \expandafter\parsedate\@anim at version\relax %set current date to package date
 \makeatother
-\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding.} \protect\footnote{Animations may run slowly if viewed in the Acrobat Reader browser plugin.}\\[1ex]\includegraphics[height=2.7ex]{mailto}\\[1ex]\url{https://github.com/agrahn/animate}}
+\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding.} \protect\footnote{Animations may run slowly if viewed in the Acrobat Reader browser plugin.}\\[1ex]\url{https://github.com/agrahn/animate}}
 \maketitle
 \endgroup
 \begin{abstract}
@@ -157,6 +157,7 @@
 buttonsize=<size>
 buttonbg=<colour>
 buttonfg=<colour>
+buttonalpha=<opacity>
 step
 nomouse
 type=<file ext>
@@ -304,8 +305,9 @@
 \begin{verbatim}
 buttonbg=<colour>
 buttonfg=<colour>
+buttonalpha=<opacity>
 \end{verbatim}
-By default, control button widgets are drawn with black strokes on transparent background. The background can be turned into a solid colour by the first option, while the second option specifies the stroke colour. The parameter \verb+<colour>+ is an array of colon-(\verb+:+)-separated numbers in the range from 0.0 to 1.0. The number of array elements determines the colour model in which the colour is defined: (1) gray value, (3) RGB, (4) CMYK. For example, `\verb+1+', `\verb+1:0.5:0.2+' and `\verb+0.5:0.3:0.7:0.1+' are valid colour specifications.
+By default, control button widgets are drawn with black strokes on transparent background. The background can be turned into a solid colour by the first option, while the second option specifies the stroke colour. The parameter \verb+<colour>+ is an array of colon-(\verb+:+)-separated numbers in the range from 0.0 to 1.0. The number of array elements determines the colour model in which the colour is defined: (1) gray value, (3) RGB, (4) CMYK. For example, `\verb+1+', `\verb+1:0.5:0.2+' and `\verb+0.5:0.3:0.7:0.1+' are valid colour specifications. Option \verb+buttonalpha+ adds transparency to the control buttons. Its parameter \verb+<opacity>+ is a number between 0.0 and 1.0, where 0.0 produces fully transparent and 1.0 fully opaque buttons.
 \begin{verbatim}
 draft
 final
@@ -806,7 +808,7 @@
   %attractor segments
   \gdef\initCond{10 10 30}% initial condition
   \pstVerb{/lorenzXYZall {} def} %takes the whole attractor
-  \multiframe{100}{i=0+1,rtZero=0+0.25,rtOne=0.25+0.25}{%
+  \multiframe{100}{rtZero=0+0.25,rtOne=0.25+0.25}{%
     %compute current attractor segment, store it in `lorenzXYZseg'
     \pstODEsolve[algebraic]{%
       lorenzXYZseg}{0 1 2}{\rtZero}{\rtOne}{26}{\initCond}{\lorenz}%
@@ -872,7 +874,7 @@
   %attractor segments
   \gdef\initCond{10 10 30}% initial condition
   \pstVerb{/lorenzXYZall {} def} %takes the whole attractor
-  \multiframe{100}{i=0+1,rtZero=0+0.25,rtOne=0.25+0.25}{%
+  \multiframe{100}{rtZero=0+0.25,rtOne=0.25+0.25}{%
     %compute current attractor segment, store it in `lorenzXYZseg'
     \pstODEsolve[algebraic]{%
       lorenzXYZseg}{0 1 2}{\rtZero}{\rtOne}{26}{\initCond}{\lorenz}%

Deleted: trunk/Master/texmf-dist/source/latex/animate/files/mailto.eps
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-09-21 00:21:29 UTC (rev 45366)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-09-21 20:55:23 UTC (rev 45367)
@@ -1,7 +1,7 @@
 % Copyright 2007--today Alexander Grahn
 
 % This material is subject to the LaTeX Project Public License. See
-%   http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
+%   http://mirrors.ctan.org/macros/latex/base/lppl.txt
 % for the details of that license.
 
 % Package for creating portable, JavaScript driven animations from sets of
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2017/08/11}
+\def\@anim at version{2017/09/21}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -717,10 +717,7 @@
   \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]
-      /BP pdfmark
+      mark /_objdef {@anm at obj\the\@anim at objnum}/BBox [0 0 15 15]/BP pdfmark
       {%
         %landscape mode (powerdot, geometry /w landscape option)
         isls{%
@@ -728,9 +725,29 @@
           [-1 0 0 1 15 0] concat%  flip around vertical axis
         }if
         #2
-      }?pdfmark mark /EP pdfmark
+      }?pdfmark
+      mark /EP pdfmark
+      \ifx\empty\@anim at alpha\empty\else
+        mark {@anm at obj\the\@anim at objnum} <<
+          /Group <</S/Transparency>>
+        >> /PUT pdfmark
+      \fi
       grestore
     }%
+    %nested XObject if transparency is 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
+        /.setopacityalpha where {pop .setopacityalpha}{pop} ifelse
+        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%
   }
@@ -974,7 +991,25 @@
   }
   %XObject creation
   \def\@anim at xbutton#1#2#3{% #1 name, #2 stroking commands, #3 @anim at num
-    \@anim at streamobj{/Type/XObject/Subtype/Form/BBox [0 0 15 15]}{#2}%
+    \@anim at streamobj{%
+      /Type/XObject/Subtype/Form/BBox [0 0 15 15]
+      \ifx\empty\@anim at alpha\empty\else%
+        /Group <</S/Transparency>>%
+      \fi%
+    }{#2}%
+    \ifx\empty\@anim at alpha\empty\else%
+      \@anim at streamobj{%
+        /Type/XObject/Subtype/Form/BBox [0 0 15 15]%
+        /Resources <<%
+          /XObject <</R1 \@anim at lastobj>>%
+          /ExtGState <<%
+            /R2 <<%
+              /Type/ExtGState/ca \@anim at alpha/CA \@anim at alpha/AIS false%
+            >>%
+          >>%
+        >>%
+      }{/R2 gs /R1 Do Q}%
+    \fi%
     \@anim at newkey{btn#1:#3}{\@anim at lastobj}%
   }
 \fi
@@ -2498,6 +2533,9 @@
     \fi%
   \fi%
 }
+\define at key{anim at user}{buttonalpha}{%button opacity
+  \xdef\@anim at alpha{#1}%
+}
 
 \newboolean{@anim at controls}
 \newboolean{@anim at controls@play}
@@ -2695,6 +2733,7 @@
   \xdef\@anim@@@fg{\@anim@@@@fg}%
   \xdef\@anim at bgcolour{\@anim@@bgcolour}% default button colours
   \xdef\@anim at fgcolour{\@anim@@fgcolour}%
+  \global\let\@anim at alpha\@anim@@alpha%
   \xdef\@anim at btnsize{\@anim@@btnsize}%
   \xdef\@anim at poster{\@anim@@poster}%
   \global\let\if at anim@controls=\if at anim@@controls%
@@ -2826,6 +2865,10 @@
     \fi%
   \fi%
 }
+\def\@anim@@alpha{}
+\define at key{anim at pkg}{buttonalpha}{%button opacity
+  \xdef\@anim@@alpha{#1}%
+}
 \newcount\@anim@@resizeflags
 \def\@anim@@widtharg{\width}%
 \define at key{anim at pkg}{width}{%



More information about the tex-live-commits mailing list