[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use a separate object for Separation tint trans. (221a66cd9)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Sep 9 12:48:47 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/221a66cd9c7bcc82e119055e21de16bd00f4dcc4

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

commit 221a66cd9c7bcc82e119055e21de16bd00f4dcc4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 9 11:48:47 2020 +0100

    Use a separate object for Separation tint trans.
    
    This matches the approach Adobe use in the PDF
    reference, and will likely be useful later (to allow
    entirely arbitrary functions in special cases).


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

221a66cd9c7bcc82e119055e21de16bd00f4dcc4
 l3backend/l3backend-color.dtx | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index 051ac6e19..ed9adb656 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -426,21 +426,24 @@
 %   containing the \enquote{real} name of the Separation, then adding a reference
 %   to that to each page. The latter uses the internal name of the \texttt{cs}.
 %   For \texttt{dvipdfmx}/\XeTeX{}, the backend does most of the work so we need a
-%   simplified version.
+%   simplified version. We use a separate object for the tint transformation
+%   following the model in the PDF reference.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_backend_separation_init:nnnnn #1#2#3#4#5
   {
+    \pdf_object_now:nx { dict }
+      {
+        /FunctionType ~ 2
+        /Domain ~ [0 ~ 1]
+        \tl_if_blank:nF {#3} { /Range ~ [#3] }
+        /C0 ~ [#4] ~
+        /C1 ~ [#5] /N ~ 1
+      }
     \@@_backend_separation_init:n
       {
         /Separation
         / \str_convert_pdfname:n {#1} ~ #2 ~
-        <<
-          /FunctionType ~ 2
-          /Domain ~ [0 ~ 1]
-          \tl_if_blank:nF {#3} { /Range ~ [#3] }
-          /C0 ~ [#4] ~
-          /C1 ~ [#5] /N ~ 1
-        >>
+        \pdf_object_last:
       }
 %<*luatex|pdftex>
     \use:x





More information about the latex3-commits mailing list.