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.def66
1 files changed, 62 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
index a2e1fb7ee87..7d8c5b96f9e 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def
@@ -68,21 +68,79 @@
\hbox_overlap_right:n { \box_use:N #1 }
\__driver_scope_end:
}
-\tl_new:N \l__driver_current_color_tl
-\tl_set:Nn \l__driver_current_color_tl { [ 0 ] }
+\tl_new:N \l__driver_color_current_tl
+\tl_set:Nn \l__driver_color_current_tl { [ 0 ] }
\AtBeginDocument
{
\@ifpackageloaded { color }
- { \tl_set:Nn \l__driver_current_color_tl { \current@color } }
+ { \tl_set:Nn \l__driver_color_current_tl { \current@color } }
{ }
}
\cs_new_protected:Npn \__driver_color_ensure_current:
{
- \tex_special:D { pdf:bcolor~\l__driver_current_color_tl }
+ \tex_special:D { pdf:bcolor~\l__driver_color_current_tl }
\group_insert_after:N \__driver_color_reset:
}
\cs_new_protected:Npn \__driver_color_reset:
{ \tex_special:D { pdf:ecolor } }
+\cs_new_eq:NN \__driver_image_getbb_eps:n \__image_read_bb:n
+\cs_new_protected:Npn \__driver_image_getbb_jpg:n #1
+ {
+ \int_zero:N \l__image_page_int
+ \__image_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
+ {
+ \bool_set_false:N \l__image_interpolate_tl
+ \__image_extract_bb:n {#1}
+ }
+\int_new:N \g__driver_image_int
+\cs_new_protected:Npn \__driver_image_include_eps:n #1
+ {
+ \tex_special:D { PSfile = #1 }
+ }
+\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_png: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
+ {
+ \__driver_image_include_auxii:xnn
+ {
+ \int_compare:nNnT \l__image_page_int > 0
+ { :P \int_use:N \l__image_page_int }
+ \bool_if:NT \l__image_interpolate_bool
+ { :I }
+ }
+ {#1} {#2}
+ }
+\cs_new_protected:Npn \__driver_image_include_auxii:nnn #1#2#3
+ {
+ \int_if_exist:cTF { c__image_ #2#1 _int }
+ {
+ \tex_special:D
+ { pdf:usexobj~@image \int_use:c { c__image_ #2#1 _int } }
+ }
+ { \__driver_image_include_auxiii:nn {#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
+ {
+ \int_gincr:N \g__driver_image_int
+ \int_const:cn { c__image_ #1#2 _int } { \g__driver_image_int }
+ \tex_special:D
+ {
+ pdf:#3~
+ @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 }
+ (#1)
+ \bool_if:NT \l__image_interpolate_bool
+ { <</Interpolate~true>> }
+ }
+ }
\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n
\cs_generate_variant:Nn \__driver_draw_literal:n { x }
\cs_new_protected:Npn \__driver_draw_begin: