[latex3-commits] [l3svn] 02/03: Drop pagebox support in images

noreply at latex-project.org noreply at latex-project.org
Thu May 18 18:35:54 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit dcc8fa637e779d3ac23594cf6f368489cb1666d4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu May 18 17:26:23 2017 +0100

    Drop pagebox support in images
    
    This one seems less useful than interpolation switching: again to see
    what is actually used in practice.
---
 l3kernel/l3drivers.dtx                 |   40 ++------------------------------
 l3kernel/testfiles/m3expl001.xetex.tlg |    4 ----
 l3kernel/testfiles/m3expl003.xetex.tlg |    4 ----
 l3trial/l3image/l3image.dtx            |   38 ++----------------------------
 4 files changed, 4 insertions(+), 82 deletions(-)

diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 3eb56e8..7a958b4 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -720,7 +720,6 @@
 \cs_new_protected:Npn \@@_image_getbb_jpg:n #1
   {
     \int_zero:N \l__image_page_int
-    \tl_clear:N \l__image_pagebox_tl
     \tl_clear:N \l_@@_image_attr_tl
     \@@_image_getbb_auxi:n {#1}
   }
@@ -732,8 +731,6 @@
       {
         \int_compare:nNnT \l__image_page_int > 0
           { :P \int_use:N \l__image_page_int }
-        \tl_if_empty:NF \l__image_pagebox_tl
-          { : \l__image_pagebox_tl }
       }
     \@@_image_getbb_auxi:n {#1}
   }
@@ -757,8 +754,6 @@
     \tex_immediate:D \pdftex_pdfximage:D
       \int_compare:nNnT \l__image_page_int > 0
         { page ~ \int_use:N \l__image_page_int }
-      \tl_if_empty:NF \l__image_pagebox_tl
-        { \l__image_pagebox_tl }
       {#1}
     \hbox_set:Nn \l__image_tmp_box
       { \pdftex_pdfrefximage:D \pdftex_pdflastximage:D }
@@ -946,7 +941,6 @@
 \cs_new_protected:Npn \@@_image_getbb_jpg:n #1
   {
     \int_zero:N \l__image_page_int
-    \tl_clear:N \l__image_pagebox_tl
     \__image_extract_bb:n {#1}
   }
 \cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
@@ -996,8 +990,6 @@
       {
         \int_compare:nNnT \l__image_page_int > 0
           { :P \int_use:N \l__image_page_int }
-        \tl_if_empty:NF \l__image_pagebox_tl
-          { : \l__image_pagebox_tl }
       }
       {#1} {#2}
   }
@@ -1021,8 +1013,6 @@
         @image \int_use:c { c__image_ #1#2 _int }
         \int_compare:nNnT \l__image_page_int > 0
           { page ~ \int_use:N \l__image_page_int \c_space_tl }
-        \tl_if_empty:NF \l__image_pagebox_tl
-          { pagebox ~ \l__image_pagebox_tl \c_space_tl }
         (#1)
       }
   }
@@ -1076,14 +1066,8 @@
 % \begin{macro}[aux]{\@@_image_getbb_auxi:nN}
 % \begin{macro}[aux]{\@@_image_getbb_auxii:nnN, \@@_image_getbb_auxii:VnN}
 % \begin{macro}[aux]{\@@_image_getbb_auxiii:nNnn}
-% \begin{macro}[aux]{\@@_image_getbb_auxiv:nnNnn, \@@_image_getbb_auxiv:VnNnn}
-% \begin{macro}[aux]{\@@_image_getbb_auxv:nNnn, \@@_image_getbb_auxv:nNnn}
-% \begin{macro}[aux, EXP]{\@@_image_getbb_pagebox:w}
 %   For \texttt{xdvipdfmx}, there are two primitives that allow us to obtain
-%   the bounding box without needing \texttt{extractbb}. The only complexity
-%   is passing the various minor variations to a common core process. The
-%   \XeTeX{} primitive omits the text |box| from the page box specification,
-%   so there is also some \enquote{trimming} to do here.
+%   the bounding box without needing \texttt{extractbb}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_image_getbb_jpg:n #1
   {
@@ -1100,26 +1084,10 @@
       { \@@_image_getbb_auxiii:nNnn {#1} #2 }
   }
 \cs_new_protected:Npn \@@_image_getbb_auxii:nnN #1#2#3
-  { \@@_image_getbb_aux:nNnn {#2} #3 { :P #1 } { page #1 } }
+  { \@@_image_getbb_auxiii:nNnn {#2} #3 { :P #1 } { page #1 } }
 \cs_generate_variant:Nn \@@_image_getbb_auxii:nnN { V }
 \cs_new_protected:Npn \@@_image_getbb_auxiii:nNnn #1#2#3#4
   {
-    \tl_if_empty:NTF \l__image_pagebox_tl
-      { \@@_image_getbb_auxiv:VnNnn \l__image_pagebox_tl }
-      { \@@_image_getbb_auxv:nNnn }
-      {#1} #2 {#3} {#4}
-  }
-\cs_new_protected:Npn \@@_image_getbb_auxiv:nnNnn #1#2#3#4#5
-  {
-    \use:x
-      {
-        \@@_image_getbb_auxv:nNnn {#2} #3 { #4 : #1 }
-          { #5 ~ \@@_image_getbb_pagebox:w #1 }
-      }
-  }
-\cs_generate_variant:Nn \@@_image_getbb_auxiv:nnNnn { V }
-\cs_new_protected:Npn \@@_image_getbb_auxv:nNnn #1#2#3#4
-  {
     \dim_if_exist:cTF { c__image_ #1#3 _ht_dim }
       {
         \dim_set_eq:Nc \l__image_ht_dim { c__image_ #1#3 _ht_dim }
@@ -1137,16 +1105,12 @@
     \dim_const:cn { c__image_ #1#3 _wd_dim }
       { \l__image_wd_dim }
   }
-\cs_new:Npn \@@_image_getbb_pagebox:w #1 box {#1}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
 %
 %    \begin{macrocode}
 %</xdvipdfmx>
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 8b1f274..da2436c 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -5046,11 +5046,7 @@ Defining \__driver_image_getbb_auxi:nN on line ...
 Defining \__driver_image_getbb_auxii:nnN on line ...
 Defining \__driver_image_getbb_auxii:VnN on line ...
 Defining \__driver_image_getbb_auxiii:nNnn on line ...
-Defining \__driver_image_getbb_auxiv:nnNnn on line ...
-Defining \__driver_image_getbb_auxiv:VnNnn on line ...
-Defining \__driver_image_getbb_auxv:nNnn on line ...
 Defining \__driver_image_getbb_auxvi:nNnn on line ...
-Defining \__driver_image_getbb_pagebox:w on line ...
 Defining \__driver_draw_literal:n on line ...
 Defining \__driver_draw_literal:x on line ...
 Defining \__driver_draw_begin: on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 1e440d2..9ff4022 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -5047,11 +5047,7 @@ Defining \__driver_image_getbb_auxi:nN on line ...
 Defining \__driver_image_getbb_auxii:nnN on line ...
 Defining \__driver_image_getbb_auxii:VnN on line ...
 Defining \__driver_image_getbb_auxiii:nNnn on line ...
-Defining \__driver_image_getbb_auxiv:nnNnn on line ...
-Defining \__driver_image_getbb_auxiv:VnNnn on line ...
-Defining \__driver_image_getbb_auxv:nNnn on line ...
 Defining \__driver_image_getbb_auxvi:nNnn on line ...
-Defining \__driver_image_getbb_pagebox:w on line ...
 Defining \__driver_draw_literal:n on line ...
 Defining \__driver_draw_literal:x on line ...
 Defining \__driver_draw_begin: on line ...
diff --git a/l3trial/l3image/l3image.dtx b/l3trial/l3image/l3image.dtx
index be1468b..b0d9138 100644
--- a/l3trial/l3image/l3image.dtx
+++ b/l3trial/l3image/l3image.dtx
@@ -57,13 +57,6 @@
 %   file. The value should be a positive integer.
 % \end{variable}
 %
-% \begin{variable}{pagebox}
-%   The page box setting used when determining the bounding box of an image:
-%   used for |.pdf| images which may present multiple page boxes. Valid
-%   settings are |artbox|, |bleedbox|, |cropbox| (the standard setting),
-%   |mediabox| and |trimbox|.
-% \end{variable}
-%
 % \subsection{Internal functions}
 %
 % Inclusion of image files requires a range of low-level data be passed to
@@ -76,12 +69,6 @@
 %   which may contain multiple pages.
 % \end{variable}
 %
-% \begin{variable}[int]{\l__image_pagebox_tl}
-%   The nature of the page box setting used to determine the bounding box of
-%   material: used for |.pdf| files which feature multiple page box
-%   specifications.
-% \end{variable}
-%
 % \begin{variable}[int]{\l__image_ht_dim, \l__image_wd_dim}
 %   Dimensions holding the height and width of the image file.
 %   These values may be extracted/read from the image files themselves
@@ -168,20 +155,13 @@
 %
 % \subsection{Image feature support}
 %
-% \begin{macro}[int]{\l__image_page_int, \l__image_pagebox_tl}
-%   Keys which control features of images. The somewhat odd order for
-%   |pagebox| matches that in the \pdfTeX{} manual (where the choices all
-%   have numerical values).
+% \begin{macro}[int]{\l__image_page_int}
+%   Keys which control features of images.
 %    \begin{macrocode}
 \keys_define:nn { image }
   {
     page    .int_set:N   = \l__image_page_int,
-    pagebox .choices:nn  =
-      { artbox, bleedbox , mediabox , trimbox }
-      { \tl_set:Nn \l__image_pagebox_tl {#1} } ,
-    pagebox / cropbox .code:n = { \tl_clear:N \l__image_pagebox_tl }
   }
-\tl_new:N \l__image_pagebox_tl
 %    \end{macrocode}
 % \end{macro}
 %
@@ -198,8 +178,6 @@
 % \begin{macro}[int]{\__image_extract_bb:n, \__image_read_bb:n}
 % \begin{macro}[aux]{\@@_extract_bb_auix:nn, \@@_extract_bb_auix:Vn}
 % \begin{macro}[aux]{\@@_extract_bb_auxii:nnn}
-% \begin{macro}[aux]{\@@_extract_bb_auxiii:nnnn, \@@_extract_bb_auxiii:Vnnn}
-% \begin{macro}[aux]{\@@_extract_bb_auxiv:nnn}
 % \begin{macro}[aux]{\@@_read_bb_auxi:nnnn, \@@_read_bb_auxii:Vnnn}
 % \begin{macro}[aux]
 %   {
@@ -226,16 +204,6 @@
 \cs_generate_variant:Nn \@@_extract_bb_auxi:nn { Vn }
 \cs_new_protected:Npn \@@_extract_bb_auxii:nnn #1#2#3
   {
-   \tl_if_empty:NTF \l__image_pagebox_tl
-      { \@@_extract_bb_auxiv:nnn }
-      { \@@_extract_bb_auxiii:Vnnn \l__image_pagebox_tl }
-      {#1} {#2} {#3}
-  }
-\cs_new_protected:Npn \@@_extract_bb_auxiii:nnnn #1#2#3#4
-  { \@@_extract_bb_auxiv:nnn {#2} { #3 : #1 } { #4 -B~#1~ } }
-\cs_generate_variant:Nn \@@_extract_bb_auxiii:nnnn { V }
-\cs_new_protected:Npn \@@_extract_bb_auxiv:nnn #1#2#3
-  {
     \@@_read_bb_auxi:nnnn {#1} {#2}
       { \tex_openin:D \l_@@_tmp_ior = "|extractbb~#3-O~#1" }
       { pipe-failed }
@@ -329,8 +297,6 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \end{macro}
-% \end{macro}
 %
 % \subsection{Messages}
 %

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list