summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def120
1 files changed, 64 insertions, 56 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
index bed26918ee0..3bdc8505acb 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
@@ -9,7 +9,7 @@
%% l3drivers-color.dtx (with options: `package,dvipdfmx')
%% l3drivers-box.dtx (with options: `package,dvipdfmx')
%% l3drivers-draw.dtx (with options: `package,dvipdfmx')
-%% l3drivers-image.dtx (with options: `package,dvipdfmx')
+%% l3drivers-graphics.dtx (with options: `package,dvipdfmx')
%% l3drivers-pdf.dtx (with options: `package,dvipdfmx')
%%
%% Copyright (C) 1990-2019 The LaTeX3 Project
@@ -33,6 +33,7 @@
\cs_new_protected:Npn \__driver_literal:n #1
{ \__driver_literal:e { \exp_not:n {#1} } }
\cs_generate_variant:Nn \__driver_literal:n { x }
+\box_new:N \l__driver_internal_box
\cs_new_protected:Npn \__driver_literal_pdf:n #1
{ \__driver_literal:n { pdf:literal~ #1 } }
\cs_generate_variant:Nn \__driver_literal_pdf:n { x }
@@ -351,91 +352,98 @@
\__driver_literal:n { pdf:etrans }
\__driver_scope_end:
}
-%% File: l3drivers-image.dtx
-\cs_new_eq:NN \__driver_image_getbb_eps:n \image_read_bb:n
-\cs_new_protected:Npn \__driver_image_getbb_jpg:n #1
+%% File: l3drivers-graphics.dtx
+\AtBeginDocument
+ { \cs_new_eq:NN \driver_graphics_getbb_eps:n \graphics_read_bb:n }
+\cs_new_protected:Npn \driver_graphics_getbb_jpg:n #1
{
- \int_zero:N \l_image_page_int
- \tl_clear:N \l_image_pagebox_tl
- \image_extract_bb: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 \__driver_image_getbb_png:n \__driver_image_getbb_jpg:n
-\cs_new_protected:Npn \__driver_image_getbb_pdf:n #1
+\cs_new_eq:NN \driver_graphics_getbb_png:n \driver_graphics_getbb_jpg:n
+\cs_new_protected:Npn \driver_graphics_getbb_pdf:n #1
{
- \tl_clear:N \l_image_decode_tl
- \bool_set_false:N \l_image_interpolate_bool
- \image_extract_bb:n {#1}
+ \tl_clear:N \l_graphics_decodearray_tl
+ \bool_set_false:N \l_graphics_interpolate_bool
+ \graphics_extract_bb:n {#1}
}
-\int_new:N \g__driver_image_int
-\cs_new_protected:Npn \__driver_image_include_eps:n #1
+\int_new:N \g__driver_graphics_int
+\cs_new_protected:Npn \driver_graphics_include_eps:n #1
{
- \__driver_literal:n { PSfile = #1 }
+ \__driver_literal:x
+ {
+ PSfile = #1 \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
+ }
}
-\cs_new_protected:Npn \__driver_image_include_jpg:n #1
- { \__driver_image_include_auxi:nn {#1} { image } }
-\cs_new_eq:NN \__driver_image_include_png:n \__driver_image_include_jpg:n
-\cs_new_protected:Npn \__driver_image_include_pdf:n #1
- { \__driver_image_include_auxi:nn {#1} { epdf } }
-\cs_new_protected:Npn \__driver_image_include_auxi:nn #1#2
+\cs_new_protected:Npn \driver_graphics_include_jpg:n #1
+ { \__driver_graphics_include_auxi:nn {#1} { image } }
+\cs_new_eq:NN \driver_graphics_include_png:n \driver_graphics_include_jpg:n
+\cs_new_protected:Npn \driver_graphics_include_pdf:n #1
+ { \__driver_graphics_include_auxi:nn {#1} { epdf } }
+\cs_new_protected:Npn \__driver_graphics_include_auxi:nn #1#2
{
- \__driver_image_include_auxii:xnn
+ \__driver_graphics_include_auxii:xnn
{
- \tl_if_empty:NF \l_image_pagebox_tl
- { : \l_image_pagebox_tl }
- \int_compare:nNnT \l_image_page_int > 1
- { :P \int_use:N \l_image_page_int }
- \tl_if_empty:NF \l_image_decode_tl
- { :D \l_image_decodearray_tl }
- \bool_if:NT \l_image_interpolate_bool
+ \tl_if_empty:NF \l_graphics_pagebox_tl
+ { : \l_graphics_pagebox_tl }
+ \int_compare:nNnT \l_graphics_page_int > 1
+ { :P \int_use:N \l_graphics_page_int }
+ \tl_if_empty:NF \l_graphics_decodearray_tl
+ { :D \l_graphics_decodearray_tl }
+ \bool_if:NT \l_graphics_interpolate_bool
{ :I }
}
{#1} {#2}
}
-\cs_new_protected:Npn \__driver_image_include_auxii:nnn #1#2#3
+\cs_new_protected:Npn \__driver_graphics_include_auxii:nnn #1#2#3
{
- \int_if_exist:cTF { c__driver_image_ #2#1 _int }
+ \int_if_exist:cTF { c__driver_graphics_ #2#1 _int }
{
\__driver_literal:x
- { pdf:usexobj~@image \int_use:c { c__driver_image_ #2#1 _int } }
+ { pdf:usexobj~@image \int_use:c { c__driver_graphics_ #2#1 _int } }
}
- { \__driver_image_include_auxiii:nn {#2} {#1} {#3} }
+ { \__driver_graphics_include_auxiii:nnn {#2} {#1} {#3} }
}
-\cs_generate_variant:Nn \__driver_image_include_auxii:nnn { x }
-\cs_new_protected:Npn \__driver_image_include_auxiii:nnn #1#2#3
+\cs_generate_variant:Nn \__driver_graphics_include_auxii:nnn { x }
+\cs_new_protected:Npn \__driver_graphics_include_auxiii:nnn #1#2#3
{
- \int_gincr:N \g__driver_image_int
- \int_const:cn { c__driver_image_ #1#2 _int } { \g__driver_image_int }
+ \int_gincr:N \g__driver_graphics_int
+ \int_const:cn { c__driver_graphics_ #1#2 _int } { \g__driver_graphics_int }
\__driver_literal:x
{
pdf:#3~
- @image \int_use:c { c__driver_image_ #1#2 _int }
- \int_compare:nNnT \l_image_page_int > 1
- { page ~ \int_use:N \l_image_page_int \c_space_tl }
- \tl_if_empty:NF \l_image_pagebox_tl
+ @image \int_use:c { c__driver_graphics_ #1#2 _int } ~
+ \int_compare:nNnT \l_graphics_page_int > 1
+ { page ~ \int_use:N \l_graphics_page_int \c_space_tl }
+ \tl_if_empty:NF \l_graphics_pagebox_tl
{
- pagebox ~ \l_image_pagebox_tl \c_space_tl
+ pagebox ~ \l_graphics_pagebox_tl \c_space_tl
bbox ~
- \dim_to_decimal_in_bp:n \l_image_llx_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l_image_lly_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l_image_urx_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l_image_ury_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_graphics_ury_dim \c_space_tl
}
(#1)
\bool_lazy_or:nnT
- { \l_image_interpolate_bool }
- { ! \tl_if_empty_p:N \l_image_decodearray_tl }
+ { \l_graphics_interpolate_bool }
+ { ! \tl_if_empty_p:N \l_graphics_decodearray_tl }
{
<<
- \tl_if_empty:NF \l_image_decode_tl
- { /Decode~[ \l_image_decodearray_tl ] }
- \bool_if:NT \l_image_interpolate_bool
+ \tl_if_empty:NF \l_graphics_decodearray_tl
+ { /Decode~[ \l_graphics_decodearray_tl ] }
+ \bool_if:NT \l_graphics_interpolate_bool
{ /Interpolate~true> }
>>
}
}
}
%% File: l3drivers-pdf.dtx
-\box_new:N \l__driver_pdf_tmp_box
\cs_new_protected:Npx \__driver_pdf:n #1
{ \__driver_literal:n { pdf: #1 } }
\cs_generate_variant:Nn \__driver_pdf:n { x }
@@ -575,8 +583,8 @@
\cs_new_protected:Npn \driver_pdf_destination_rectangle:nn #1#2
{
\group_begin:
- \hbox_set:Nn \l__driver_pdf_tmp_box {#2}
- \box_move_down:nn { \box_dp:N \l__driver_pdf_tmp_box }
+ \hbox_set:Nn \l__driver_internal_box {#2}
+ \box_move_down:nn { \box_dp:N \l__driver_internal_box }
{
\hbox:n
{
@@ -584,8 +592,8 @@
\__driver_pdf:n { obj ~ @driver_#1_lly ~ @ypos }
}
}
- \box_use:N \l__driver_pdf_tmp_box
- \box_move_up:nn { \box_ht:N \l__driver_pdf_tmp_box }
+ \box_use:N \l__driver_internal_box
+ \box_move_up:nn { \box_ht:N \l__driver_internal_box }
{
\hbox:n
{