From 7345b8683c7cbeaedf53e992fda0b3fa6141084e Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sat, 7 Sep 2019 03:00:49 +0000
Subject: CTAN sync 201909070300

---
 .../latex/contrib/l3backend/l3backend-graphics.dtx | 56 ++++++++++++++++++++--
 1 file changed, 51 insertions(+), 5 deletions(-)

(limited to 'macros/latex/contrib/l3backend/l3backend-graphics.dtx')

diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index 1dda6b33ca..4993de4e56 100644
--- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2019-08-25}
+% \date{Released 2019-09-05}
 %
 % \maketitle
 %
@@ -557,8 +557,8 @@
 %<*dvisvgm>
 %    \end{macrocode}
 %
-% \begin{macro}{\@@_backend_getbb_png:n, \@@_backend_getbb_jpg:n}
-%   These can be included by extracting the bounding box data.
+% \begin{macro}{\@@_backend_getbb_eps:n}
+%   Simply use the generic function.
 %    \begin{macrocode}
 %<*initex>
 \use:n
@@ -566,13 +566,59 @@
 %<*package>
 \AtBeginDocument
 %</package>
+  { \cs_new_eq:NN \@@_backend_getbb_eps:n \graphics_read_bb:n }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_getbb_png:n, \@@_backend_getbb_jpg:n}
+%   These can be included by extracting the bounding box data.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_getbb_jpg:n #1
+  {
+    \int_zero:N \l_graphics_page_int
+    \tl_clear:N \l_graphics_pagebox_tl
+    \graphics_extract_bb:n {#1}
+  }
+\cs_new_eq:NN \@@_backend_getbb_png:n \@@_backend_getbb_jpg:n
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_getbb_pdf:n}
+%   Same as for \texttt{dvipdfmx}: use the generic function
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_getbb_pdf:n #1
   {
-    \cs_new_eq:NN \@@_backend_getbb_png:n \graphics_extract_bb:n
-    \cs_new_eq:NN \@@_backend_getbb_jpg:n \graphics_extract_bb:n
+    \tl_clear:N \l_graphics_decodearray_tl
+    \bool_set_false:N \l_graphics_interpolate_bool
+    \graphics_extract_bb:n {#1}
   }
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_backend_include_eps:n, \@@_backend_include_pdf:n}
+% \begin{macro}{\@@_backend_include:nn}
+%   The special syntax is relatively clear here: remember we need PostScript
+%   sizes here. (This is the same as the \texttt{dvips} code.)
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_include_eps:n #1
+  { @@_backend_include:nn { PSfile } {#1} } 
+\cs_new_protected:Npn \@@_backend_include_pdf:n #1
+  { @@_backend_include:nn { pdffile } {#1} } 
+\cs_new_protected:Npn \@@_backend_include:nn #1#2
+  {
+    \__kernel_backend_literal:x
+      {
+        #1 = #2 \c_space_tl
+        llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl
+        lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl
+        urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl
+        ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\@@_backend_include_png:n, \@@_backend_include_jpg:n}
 % \begin{macro}{\@@_backend_include_bitmap_quote:w}
 %   The backend here has built-in support for basic graphic inclusion (see
-- 
cgit v1.2.3

