summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/l3backend/l3backend-color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required/l3backend/l3backend-color.dtx')
-rw-r--r--macros/latex-dev/required/l3backend/l3backend-color.dtx28
1 files changed, 9 insertions, 19 deletions
diff --git a/macros/latex-dev/required/l3backend/l3backend-color.dtx b/macros/latex-dev/required/l3backend/l3backend-color.dtx
index 307432d554..1dae4b5ce9 100644
--- a/macros/latex-dev/required/l3backend/l3backend-color.dtx
+++ b/macros/latex-dev/required/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-04-11}
+% \date{Released 2024-05-08}
%
% \maketitle
%
@@ -920,7 +920,7 @@
% Here, \texttt{dvipdfmx}/\XeTeX{} we write direct PDF specials for the fill,
% and only use the stack for the stroke color (see above for comments on why
% we cannot use multiple stacks with these backends). \LuaTeX{} and \pdfTeX{}
-% have mutiple stacks that can deal with fill and stroke. For \texttt{dvips}
+% have multiple stacks that can deal with fill and stroke. For \texttt{dvips}
% we have to manage fill and stroke color ourselves. We also handle
% \texttt{dvisvgm} independently, as there we can create SVG directly.
%
@@ -1138,8 +1138,7 @@
% \@@_backend_fill_rgb:n ,
% \@@_backend_fill:n
% }
-% Fill color here is the same as general color \emph{except} we skip the
-% stroke part.
+% Fill color here is the same as general color.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_fill_cmyk:n #1
{ \@@_backend_fill:n { cmyk ~ #1 } }
@@ -1155,27 +1154,19 @@
% \end{macro}
%
% \begin{macro}{\@@_backend_stroke_cmyk:n}
-% \begin{macro}{\@@_backend_stroke_cmyk:w}
% \begin{macro}{\@@_backend_stroke_gray:n, \@@_backend_stroke_gray_aux:n}
% \begin{macro}{\@@_backend_stroke_rgb:n}
% \begin{macro}{\@@_backend_stroke_rgb:w}
% \begin{macro}{\@@_backend:nnn}
-% For drawings in SVG, we use scopes for all stroke colors. That
-% requires using \texttt{RGB} values, which luckily are easy to
-% convert here (|cmyk| to |RGB| is a fixed function).
+% For drawings in SVG, we use scopes for all stroke colors. The backend
+% provides the necessary conversion for CMYK but only if that is set as
+% the main color: a little bit of gymnastics as a result.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_stroke_cmyk:n #1
- { \@@_backend_cmyk:w #1 \s_@@_stop }
-\cs_new_protected:Npn \@@_backend_stroke_cmyk:w
- #1 ~ #2 ~ #3 ~ #4 \s_@@_stop
{
- \use:e
- {
- \@@_backend:nnn
- { \fp_eval:n { -100 * ( 1 - min ( 1 , #1 + #4 ) ) } }
- { \fp_eval:n { -100 * ( 1 - min ( 1 , #2 + #4 ) ) } }
- { \fp_eval:n { -100 * ( 1 - min ( 1 , #3 + #4 ) ) } }
- }
+ \@@_backend_fill_cmyk:n {#1}
+ \__kernel_backend_scope:n { stroke = "{?color}" }
+ \@@_backend_reset:
}
\cs_new_protected:Npn \@@_backend_stroke_gray:n #1
{
@@ -1221,7 +1212,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}
% {