[latex3-commits] [git/LaTeX3-latex3-latex3] master: Tidy up opacity support for dvisvgm (0d7bc91b3)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jan 24 18:45:01 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/0d7bc91b308cfafa795a1ff3f0f2ab07b6170d17

>---------------------------------------------------------------

commit 0d7bc91b308cfafa795a1ff3f0f2ab07b6170d17
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jan 24 17:45:01 2021 +0000

    Tidy up opacity support for dvisvgm


>---------------------------------------------------------------

0d7bc91b308cfafa795a1ff3f0f2ab07b6170d17
 l3backend/l3backend-opacity.dtx | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/l3backend/l3backend-opacity.dtx b/l3backend/l3backend-opacity.dtx
index c9f2a8cde..e5993bc2d 100644
--- a/l3backend/l3backend-opacity.dtx
+++ b/l3backend/l3backend-opacity.dtx
@@ -256,25 +256,19 @@
 %<*dvisvgm>
 %    \end{macrocode}
 %
-% \begin{macro}{\@@_backend_select:n}
-%   No stack support.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_select:n #1 { }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_backend_fill:n, \@@_backend_stroke:n}
-% \begin{macro}{\@@_backend:nn, \@@_backend:xn}
+% \begin{macro}{\@@_backend_select:n, \@@_backend_fill:n, \@@_backend_stroke:n}
+% \begin{macro}{\@@_backend:nn}
 %   Once again, we use a scope here. There is a general opacity function for
 %   SVG, but that is of course not set up using the stack.
 %    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_select:n #1
+  { \@@_backend:nn {#1} { } }
 \cs_new_protected:Npn \@@_backend_fill:n #1
-  { \@@_backend:nn { \fp_eval:n { min(max(0,#1),1) } } { fill } }
+  { \@@_backend:nn {#1} { fill- } }
 \cs_new_protected:Npn \@@_backend_stroke:n #1
-  { \@@_backend:nn { \fp_eval:n { min(max(0,#1),1) } } { stroke } }
+  { \@@_backend:nn { {#1} } { stroke- } }
 \cs_new_protected:Npn \@@_backend:nn #1#2
-  { \__kernel_backend_scope:n { #2 -opacity = "#1" } }
-\cs_generate_variant:Nn \@@_backend:nn { x }
+  { \__kernel_backend_scope:x { #2 opacity = " \fp_eval:n { min(max(0,#1),1) } " } }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}





More information about the latex3-commits mailing list.