summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3backend
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-19 03:03:14 +0000
committerNorbert Preining <norbert@preining.info>2020-06-19 03:03:14 +0000
commitfa4840ca74917d6402885b9b77c26e51b61fc68a (patch)
treeefd50c9a9a8eddb4154175ae575aa5f435582a06 /macros/latex/contrib/l3backend
parent7a78c3b8b21b6842d27bb48f37197f8c380ccc5e (diff)
CTAN sync 202006190303
Diffstat (limited to 'macros/latex/contrib/l3backend')
-rw-r--r--macros/latex/contrib/l3backend/CHANGELOG.md10
-rw-r--r--macros/latex/contrib/l3backend/README.md2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-basics.dtx12
-rw-r--r--macros/latex/contrib/l3backend/l3backend-box.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx118
-rw-r--r--macros/latex/contrib/l3backend/l3backend-draw.dtx190
-rw-r--r--macros/latex/contrib/l3backend/l3backend-graphics.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-header.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx2
9 files changed, 121 insertions, 219 deletions
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md
index 4a6efebd0a..cbd624e024 100644
--- a/macros/latex/contrib/l3backend/CHANGELOG.md
+++ b/macros/latex/contrib/l3backend/CHANGELOG.md
@@ -6,6 +6,13 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2020-06-18]
+
+### Changed
+- Use `scn` operator for separations
+- Internal color model
+- Internal performance enhancements
+
## [2020-06-03]
### Fixed
@@ -76,7 +83,8 @@ this project uses date-based 'snapshot' version identifiers.
- Include `l3backend` in file names
- Moved backend code to internal for each 'parent' module
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-06-03...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2020-06-18...HEAD
+[2020-06-18]: https://github.com/latex3/latex3/compare/2020-06-03...2020-06-18
[2020-06-03]: https://github.com/latex3/latex3/compare/2020-05-05...2020-06-03
[2020-05-05]: https://github.com/latex3/latex3/compare/2020-03-12...2020-05-05
[2020-03-12]: https://github.com/latex3/latex3/compare/2020-02-23...2020-03-12
diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md
index f03026a6b9..ca54b35b76 100644
--- a/macros/latex/contrib/l3backend/README.md
+++ b/macros/latex/contrib/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2020-06-03
+Release 2020-06-18
This package forms parts of `expl3`, and contains the code used to interface
with backends (drivers) across the `expl3` codebase. The functions here are
diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx
index 26c516150a..80d8714358 100644
--- a/macros/latex/contrib/l3backend/l3backend-basics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
@@ -71,23 +71,23 @@
%<*package>
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2020-06-03}{}
+ {l3backend-dvipdfmx.def}{2020-06-18}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2020-06-03}{}
+ {l3backend-dvips.def}{2020-06-18}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2020-06-03}{}
+ {l3backend-dvisvgm.def}{2020-06-18}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*pdfmode>
- {l3backend-pdfmode.def}{2020-06-03}{}
+ {l3backend-pdfmode.def}{2020-06-18}{}
{L3 backend support: PDF mode}
%</pdfmode>
%<*xdvipdfmx>
- {l3backend-xdvipdfmx.def}{2020-06-03}{}
+ {l3backend-xdvipdfmx.def}{2020-06-18}{}
{L3 backend support: xdvipdfmx}
%</xdvipdfmx>
%</package>
diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx
index 323756837e..ca94b19e9b 100644
--- a/macros/latex/contrib/l3backend/l3backend-box.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index 2b3e4d3708..2c0dd47ea1 100644
--- a/macros/latex/contrib/l3backend/l3backend-color.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
@@ -78,7 +78,8 @@
% \begin{macro}{\@@_backend_pickup:w}
% Allow for \LaTeXe{} color. Here, the possible input values are limited:
% \texttt{dvips}-style colors can mainly be taken as-is with the exception
-% spot ones (here we need a model and a tint).
+% spot ones (here we need a model and a tint). The \texttt{x}-type expansion
+% is there to cover the case where \pkg{xcolor} is in use.
% \begin{macrocode}
%<*package>
\cs_new_protected:Npn \@@_backend_pickup:N #1 { }
@@ -92,8 +93,8 @@
{
\tl_set:Nx #1
{
- spot ~
- \exp_after:wN \use:n \current@color \c_space_tl 1
+ { spot }
+ { \exp_after:wN \use:n \current@color \c_space_tl 1 }
}
}
{
@@ -102,7 +103,7 @@
}
}
\cs_new_protected:Npn \@@_backend_pickup:w #1 ~ #2 \s_@@_stop #3
- { \tl_set:Nn #3 { #1 ~ #2 } }
+ { \tl_set:Nn #3 { {#1} {#2} } }
}
}
%</package>
@@ -110,34 +111,27 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_backend_cmyk:w}
-% \begin{macro}{\@@_backend_gray:w}
-% \begin{macro}{\@@_backend_rgb:w}
-% \begin{macro}{\@@_backend_spot:w}
-% \begin{macro}{\@@_backend_select:n, \@@_backend_select:x}
+% \begin{macro}
+% {
+% \@@_backend_cmyk:n ,
+% \@@_backend_gray:n ,
+% \@@_backend_rgb:n ,
+% \@@_backend_spot:n ,
+% \@@_backend_select:n
+% }
% \begin{macro}{\@@_backend_reset:}
% \begin{macro}{color.fc}
% Push the data to the stack. In the case of \texttt{dvips} also reset the
% drawing fill color in raw PostScript.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_cmyk:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop
- {
- \@@_backend_select:x
- {
- cmyk~
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4}
- }
- }
-\cs_new_protected:Npn \@@_backend_gray:w #1 \s_@@_stop
- { \@@_backend_select:x { gray~ \fp_eval:n {#1} } }
-\cs_new_protected:Npn \@@_backend_rgb:w #1 ~ #2 ~ #3 \s_@@_stop
- {
- \@@_backend_select:x
- { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} }
- }
-\cs_new_protected:Npn \@@_backend_spot:w #1 ~ #2 \s_@@_stop
- { \@@_backend_select:n { #1 } }
+\cs_new_protected:Npn \@@_backend_cmyk:n #1
+ { \@@_backend_select:n { cmyk ~ #1 } }
+\cs_new_protected:Npn \@@_backend_gray:n #1
+ { \@@_backend_select:n { gray ~ #1 } }
+\cs_new_protected:Npn \@@_backend_rgb:n #1
+ { \@@_backend_select:n { rgb ~ #1 } }
+\cs_new_protected:Npn \@@_backend_spot:n #1
+ { \@@_backend_select:n {#1} }
\cs_new_protected:Npn \@@_backend_select:n #1
{
\__kernel_backend_literal:n { color~push~ #1 }
@@ -146,17 +140,12 @@
%</dvips>
\group_insert_after:N \@@_backend_reset:
}
-\cs_generate_variant:Nn \@@_backend_select:n { x }
\cs_new_protected:Npn \@@_backend_reset:
{ \__kernel_backend_literal:n { color~pop } }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
%</dvisvgm|dvipdfmx|dvips|xdvipdfmx>
@@ -192,20 +181,20 @@
#1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s_@@_stop #7
{
\str_if_eq:nnTF {#2} { g }
- { \tl_set:Nn #7 { gray ~ #1 } }
+ { \tl_set:Nn #7 { { gray } {#1} } }
{
\str_if_eq:nnTF {#4} { rg }
- { \tl_set:Nn #7 { rgb ~ #1 ~ #2 ~ #3 } }
+ { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
{
\str_if_eq:nnTF {#5} { k }
- { \tl_set:Nn #7 { cmyk ~ #1 ~ #2 ~ #3 ~ #4 } }
+ { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
{
\str_if_eq:nnTF {#2} { cs }
{
- \tl_set:Nx #7 { spot ~ \use_none:n #1 ~ #5 }
+ \tl_set:Nx #7 { { spot } { \use_none:n #1 ~ #5 } }
}
{
- \tl_set:Nn #7 { gray ~ 0 }
+ \tl_set:Nn #7 { { gray } { 0 } }
}
}
}
@@ -226,48 +215,28 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_backend_cmyk:w, \@@_backend_cmyk:nnnn}
-% \begin{macro}{\@@_backend_gray:w, \@@_backend_gray:n}
-% \begin{macro}{\@@_backend_rgb:w, \@@_backend_rgb:nnn}
+% \begin{macro}
+% {
+% \@@_backend_cmyk:n ,
+% \@@_backend_gray:n ,
+% \@@_backend_rgb:n ,
+% \@@_backend_spot:n
+% }
% \begin{macro}{\@@_backend_spot:w}
-% \begin{macro}{\@@_backend_select:n, \@@_backend_select:x}
+% \begin{macro}{\@@_backend_select:n}
% \begin{macro}{\@@_backend_reset:}
% Simply dump the data, but allowing for \LuaTeX{}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_cmyk:w #1 ~ #2 ~ #3 ~ #4 \s_@@_stop
- {
- \use:x
- {
- \@@_backend_cmyk:nnnn
- { \fp_eval:n {#1} }
- { \fp_eval:n {#2} }
- { \fp_eval:n {#3} }
- { \fp_eval:n {#4} }
- }
- }
-\cs_new_protected:Npn \@@_backend_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_select:n
- { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K }
- }
-\cs_new_protected:Npn \@@_backend_gray:w #1 \s_@@_stop
- { \exp_args:Nx \@@_backend_gray:n { \fp_eval:n {#1} } }
+\cs_new_protected:Npn \@@_backend_cmyk:n #1
+ { \@@_backend_select:n { #1 ~ k ~ #1 ~ K } }
\cs_new_protected:Npn \@@_backend_gray:n #1
{ \@@_backend_select:n { #1 ~ g ~ #1 ~ G } }
-\cs_new_protected:Npn \@@_backend_rgb:w #1~ #2 ~ #3 \s_@@_stop
- {
- \use:x
- {
- \@@_backend_rgb:nnn
- { \fp_eval:n {#1} }
- { \fp_eval:n {#2} }
- { \fp_eval:n {#3} }
- }
- }
-\cs_new_protected:Npn \@@_backend_rgb:nnn #1#2#3
- { \@@_backend_select:n { #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG } }
+\cs_new_protected:Npn \@@_backend_rgb:n #1
+ { \@@_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
+\cs_new_protected:Npn \@@_backend_spot:n #1
+ { \@@_backend_spot:w #1 \s_@@_stop }
\cs_new_protected:Npn \@@_backend_spot:w #1 ~ #2 \s_@@_stop
- { \@@_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC } }
+ { \@@_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
\cs_new_protected:Npx \@@_backend_select:n #1
{
\cs_if_exist:NTF \tex_pdfextension:D
@@ -276,7 +245,6 @@
\exp_not:N \l__kernel_color_stack_int push {#1}
\group_insert_after:N \exp_not:N \@@_backend_reset:
}
-\cs_generate_variant:Nn \@@_backend_select:n { x }
\cs_new_protected:Npx \@@_backend_reset:
{
\cs_if_exist:NTF \tex_pdfextension:D
@@ -289,8 +257,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
%</pdfmode>
diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx
index 6b235e4faa..6c82820a90 100644
--- a/macros/latex/contrib/l3backend/l3backend-draw.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
@@ -313,7 +313,7 @@
{ \dim_to_decimal_in_bp:n {#1} ~ setlinewidth }
}
\cs_new_protected:Npn \@@_backend_miterlimit:n #1
- { \@@_backend_literal:x { \fp_eval:n {#1} ~ setmiterlimit } }
+ { \@@_backend_literal:n { #1 ~ setmiterlimit } }
\cs_new_protected:Npn \@@_backend_cap_butt:
{ \@@_backend_literal:n { 0 ~ setlinecap } }
\cs_new_protected:Npn \@@_backend_cap_round:
@@ -335,8 +335,8 @@
%
% \begin{macro}
% {
-% \@@_backend_color_fill_cmyk:nnnn ,
-% \@@_backend_color_stroke_cmyk:nnnn
+% \@@_backend_color_fill_cmyk:n ,
+% \@@_backend_color_stroke_cmyk:n
% }
% \begin{macro}
% {
@@ -345,63 +345,37 @@
% }
% \begin{macro}
% {
-% \@@_backend_color_fill_rgb:nnn ,
-% \@@_backend_color_stroke_rgb:nnn
-% }
-% \begin{macro}
-% {
-% \@@_backend_color_fill:n, \@@_backend_color_fill:x,
-% \@@_backend_color_stroke:n, \@@_backend_color_stroke:x
+% \@@_backend_color_fill_rgb:n ,
+% \@@_backend_color_stroke_rgb:n
% }
+% \begin{macro}{\@@_backend_color_fill:n, \@@_backend_color_stroke:n}
% For \texttt{dvips}, we can use the standard color stack to deal with
% stroke color, but for fills have to switch to raw PostScript. This is
% thus not handled by the stack, but the context is very restricted. See
% also how fills are implemented.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_color_fill_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_color_fill:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- setcmykcolor
- }
- }
-\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_color_stroke:x
- {
- cmyk ~
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4}
- }
- }
-\cs_new_protected:Npn \@@_backend_color_fill_gray:n #1
- { \@@_backend_color_fill:x { \fp_eval:n {#1} ~ setgray } }
+\cs_new_protected:Npn \@@_backend_color_fill_cmyk:n #1
+ { \@@_backend_color_fill:n { #1 ~ setcmykcolor } }
+\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:n #1
+ { \@@_backend_color_stroke:n { cmyk ~ #1 } }
\cs_new_protected:Npn \@@_backend_color_stroke_gray:n #1
- { \@@_backend_color_stroke:x { gray ~ \fp_eval:n {#1} } }
-\cs_new_protected:Npn \@@_backend_color_fill_rgb:nnn #1#2#3
- {
- \@@_backend_color_fill:x
- { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ setrgbcolor }
- }
-\cs_new_protected:Npn \@@_backend_color_stroke_rgb:nnn #1#2#3
- {
- \@@_backend_color_stroke:x
- { rgb ~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} }
- }
+ { \@@_backend_color_fill:n { #1 ~ setgray } }
+\cs_new_protected:Npn \@@_backend_color_fill_gray:n #1
+ { \@@_backend_color_stroke:n { gray ~ #1 } }
+\cs_new_protected:Npn \@@_backend_color_fill_rgb:n #1
+ { \@@_backend_color_fill:n { #1 ~ setrgbcolor } }
+\cs_new_protected:Npn \@@_backend_color_stroke_rgb:n #1
+ { \@@_backend_color_stroke:n { rgb ~ #1 } }
\cs_new_protected:Npn \@@_backend_color_fill:n #1
{
\__kernel_backend_postscript:n
{ /color.fc ~ { #1 } ~ def }
}
-\cs_generate_variant:Nn \@@_backend_color_fill:n { x }
\cs_new_protected:Npn \@@_backend_color_stroke:n #1
{
\__kernel_backend_literal:n { color~push~#1 }
\group_insert_after:N \@@_color_reset:
}
-\cs_generate_variant:Nn \@@_backend_color_stroke:n { x }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -418,14 +392,7 @@
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
{
\@@_backend_literal:n
- {
- [
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- 0 ~ 0
- ] ~
- concat
- }
+ { [ #1 ~ #2 ~ #3 ~ #4 ~ 0 ~ 0 ] ~ concat }
}
% \end{macrocode}
% \end{macro}
@@ -633,7 +600,7 @@
{ \dim_to_decimal_in_bp:n {#1} ~ w }
}
\cs_new_protected:Npn \@@_backend_miterlimit:n #1
- { \@@_backend_literal:x { \fp_eval:n {#1} ~ M } }
+ { \@@_backend_literal:x { #1 ~ M } }
\cs_new_protected:Npn \@@_backend_cap_butt:
{ \@@_backend_literal:n { 0 ~ J } }
\cs_new_protected:Npn \@@_backend_cap_round:
@@ -655,8 +622,8 @@
%
% \begin{macro}
% {
-% \@@_backend_color_fill_cmyk:nnnn ,
-% \@@_backend_color_stroke_cmyk:nnnn
+% \@@_backend_color_fill_cmyk:n ,
+% \@@_backend_color_stroke_cmyk:n
% }
% \begin{macro}
% {
@@ -665,46 +632,26 @@
% }
% \begin{macro}
% {
-% \@@_backend_color_fill_rgb:nnn ,
-% \@@_backend_color_stroke_rgb:nnn
+% \@@_backend_color_fill_rgb:n ,
+% \@@_backend_color_stroke_rgb:n
% }
% \begin{macro}{\@@_backend_color_select:n, \@@_backend_color_select:x}
% \begin{macro}{\@@_backend_color_reset:}
% Color has to be split between \texttt{(x)dvipdfmx} and the PDF engines
% as there is no color stack for fill/stroke separation in the former.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_color_fill_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_color_select:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- k
- }
- }
-\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_color_select:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- k
- }
- }
+\cs_new_protected:Npn \@@_backend_color_fill_cmyk:n #1
+ { \@@_backend_color_select:n { #1 ~ k } }
+\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:n #1
+ { \@@_backend_color_select:n { #1 ~ K } }
\cs_new_protected:Npn \@@_backend_color_fill_gray:n #1
- { \@@_backend_color_select:x { \fp_eval:n {#1} ~ g } }
+ { \@@_backend_color_select:n { #1 ~ g } }
\cs_new_protected:Npn \@@_backend_color_stroke_gray:n #1
- { \@@_backend_color_select:x { \fp_eval:n {#1} ~ G } }
-\cs_new_protected:Npn \@@_backend_color_fill_rgb:nnn #1#2#3
- {
- \@@_backend_color_select:x
- { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg }
- }
-\cs_new_protected:Npn \@@_backend_color_stroke_rgb:nnn #1#2#3
- {
- \@@_backend_color_select:x
- { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG }
- }
+ { \@@_backend_color_select:n { #1 ~ G } }
+\cs_new_protected:Npn \@@_backend_color_fill_rgb:n #1
+ { \@@_backend_color_select:n { #1 ~ rg } }
+\cs_new_protected:Npn \@@_backend_color_stroke_rgb:n #1
+ { \@@_backend_color_select:n { #1 ~ RG } }
%<*pdfmode>
\cs_new_protected:Npx \@@_backend_color_select:n #1
{
@@ -746,11 +693,7 @@
\cs_new_protected:Npn \@@_backend_cm:nnnn #1#2#3#4
{
%<*pdfmode>
- \__kernel_backend_matrix:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4}
- }
+ \__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 }
%</pdfmode>
%<*dvipdfmx|xdvipdfmx>
\@@_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
@@ -904,13 +847,8 @@
\@@_backend_cm:nnnn {#2} {#3} {#4} {#5}
%</pdfmode>
%<*dvipdfmx|xdvipdfmx>
- \__kernel_backend_literal:x
- {
- pdf:btrans~matrix~
- \fp_eval:n {#2} ~ \fp_eval:n {#3} ~
- \fp_eval:n {#4} ~ \fp_eval:n {#5} ~
- 0 ~ 0
- }
+ \__kernel_backend_literal:n
+ { pdf:btrans~matrix~ #2 ~ #3 ~ #4 ~ #5 ~ 0 ~ 0 }
%</dvipdfmx|xdvipdfmx>
\hbox_overlap_right:n { \box_use:N #1 }
%<*dvipdfmx|xdvipdfmx>
@@ -1199,7 +1137,7 @@
\cs_new_protected:Npn \@@_backend_linewidth:n #1
{ \@@_backend_scope:x { stroke-width=" \dim_to_decimal:n {#1} " } }
\cs_new_protected:Npn \@@_backend_miterlimit:n #1
- { \@@_backend_scope:x { stroke-miterlimit=" \fp_eval:n {#1} " } }
+ { \@@_backend_scope:x { stroke-miterlimit=" #1 " } }
\cs_new_protected:Npn \@@_backend_cap_butt:
{ \@@_backend_scope:n { stroke-linecap="butt" } }
\cs_new_protected:Npn \@@_backend_cap_round:
@@ -1222,43 +1160,41 @@
%
% \begin{macro}
% {
-% \@@_backend_color_fill_cmyk:nnnn ,
-% \@@_backend_color_stroke_cmyk:nnnn
+% \@@_backend_color_fill_cmyk:n ,
+% \@@_backend_color_stroke_cmyk:n
% }
+% \begin{macro}{\@@_backend_color_fill_cmyk:w}
% \begin{macro}
% {
% \@@_backend_color_fill_gray:n ,
% \@@_backend_color_stroke_gray:n
% }
+% \begin{macro}{\@@_backend_color_gray_aux:n}
% \begin{macro}
% {
-% \@@_backend_color_fill_rgb:nnn ,
-% \@@_backend_color_stroke_rgb:nnn
+% \@@_backend_color_fill_rgb:n ,
+% \@@_backend_color_stroke_rgb:n
% }
% \begin{macro}{\@@_backend_color_fill:nnn}
% SVG fill color has to be covered outside of the stack, as for
% \texttt{dvips}. Here, we are only allowed RGB colors so there is some
% conversion to do.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_backend_color_fill_cmyk:nnnn #1#2#3#4
+\cs_new_protected:Npn \@@_backend_color_fill_cmyk:n #1
+ { \@@_backend_color_fill_cmyk:w #1 \s_@@_stop }
+\cs_new_protected:Npn \@@_backend_color_fill_cmyk:w
+ #1 ~ #2 ~ #3 ~ #4 \s_@@_stop
{
\use:x
{
\@@_backend_color_fill:nnn
- { \fp_eval:n { -100 * ( (#1) * ( 1 - (#4) ) - 1 ) } }
- { \fp_eval:n { -100 * ( (#2) * ( 1 - (#4) ) + #4 - 1 ) } }
- { \fp_eval:n { -100 * ( (#3) * ( 1 - (#4) ) + #4 - 1 ) } }
- }
- }
-\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:nnnn #1#2#3#4
- {
- \@@_backend_select:x
- {
- cmyk~
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4}
+ { \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 ) ) } }
}
}
+\cs_new_protected:Npn \@@_backend_color_stroke_cmyk:n #1
+ { \@@_backend_select:n { cmyk ~ #1 } }
\cs_new_protected:Npn \@@_backend_color_fill_gray:n #1
{
\use:x
@@ -1271,7 +1207,7 @@
{ \@@_backend_color_fill:nnn {#1} {#1} {#1} }
\cs_new_protected:Npn \@@_backend_color_stroke_gray:n #1
{ \@@_backend_select:x { gray~ \fp_eval:n {#1} } }
-\cs_new_protected:Npn \@@_backend_color_fill_rgb:nnn #1#2#3
+\cs_new_protected:Npn \@@_backend_color_fill_rgb:n #1
{
\use:x
{
@@ -1296,16 +1232,15 @@
"
}
}
-\cs_new_protected:Npn \@@_backend_color_stroke_rgb:nnn #1#2#3
- {
- \@@_backend_select:x
- { rgb~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} }
- }
+\cs_new_protected:Npn \@@_backend_color_stroke_rgb:n #1
+ { \@@_backend_select:n { rgb ~ #1 } }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_backend_cm:nnnn}
% The four arguments here are floats (the affine matrix), the last
@@ -1316,14 +1251,7 @@
\@@_backend_scope:n
{
transform =
- "
- matrix
- (
- \fp_eval:n {#1} , \fp_eval:n {#2} ,
- \fp_eval:n {#3} , \fp_eval:n {#4} ,
- 0pt , 0pt
- )
- "
+ " matrix ( #1 , #2 , #3 , #4 , 0pt , 0pt ) "
}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index dd19bba9a1..305d1759a1 100644
--- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx
index 955f8a3b14..a66cb0f145 100644
--- a/macros/latex/contrib/l3backend/l3backend-header.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-header.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index 5382b4a92c..e10ad17e8f 100644
--- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-06-03}
+% \date{Released 2020-06-18}
%
% \maketitle
%