diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-15 21:27:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-15 21:27:01 +0000 |
commit | b1ce47fe4d0e1f06d1b019c3c6eb5f1b0ecd5e14 (patch) | |
tree | 58362abe4b603bb5f6db898b9b835bc8af730b3e /Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | |
parent | 03b8dcfa3435f0265dfad4fd09aaab8f4ff9c617 (diff) |
l3 (15jul17)
git-svn-id: svn://tug.org/texlive/trunk@44813 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def index 4bae05e91df..f9bf990c499 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvisvgm.def @@ -22,6 +22,22 @@ \ProvidesExplFile {l3dvisvgm.def}{2017/03/18}{} {L3 Experimental driver: dvisvgm} +\AtBeginDocument + { + \@ifpackageloaded { color } + { + \cs_new_protected:Npn \__driver_color_pickup: + { \tl_set_eq:NN \l__color_current_tl \current@color } + } + { \cs_new_protected:Npn \__driver_color_pickup: { } } + } +\cs_new_protected:Npn \__driver_color_ensure_current: + { + \__driver_color_pickup: + \tex_special:D { color~push~\l__color_current_tl } + } +\cs_new_protected:Npn \__driver_color_reset: + { \tex_special:D { color~pop } } \cs_new_protected:Npn \__driver_literal:n #1 { \tex_special:D { dvisvgm:raw~ #1 { ?nl } } } \cs_new_protected:Npn \__driver_scope_begin: @@ -113,21 +129,20 @@ \hbox_overlap_right:n { \box_use:N #1 } \__driver_scope_end: } -\tl_new:N \l__driver_color_current_tl -\tl_set:Nn \l__driver_color_current_tl { gray~0 } -\AtBeginDocument +\cs_new_eq:NN \__driver_image_getbb_png:n \__image_extract_bb:n +\cs_new_eq:NN \__driver_image_getbb_jpg:n \__image_extract_bb:n +\cs_new_protected:Npn \__driver_image_include_png:n #1 { - \@ifpackageloaded { color } - { \tl_set:Nn \l__driver_color_current_tl { \current@color } } - { } + \tex_special:D + { + dvisvgm:img~ + \dim_to_decimal:n { \l__image_ury_dim } ~ + \dim_to_decimal:n { \l__image_ury_dim } ~ + \__driver_image_include_bitmap_quote:w #1 " " \q_stop + } } -\cs_new_protected:Npn \__driver_color_ensure_current: - { - \tex_special:D { color~push~\l__driver_color_current_tl } - \group_insert_after:N \__driver_color_reset: - } -\cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { color~pop } } +\cs_new_eq:NN \__driver_image_include_jpg:n \__driver_image_include_png:n +\cs_new:Npn \__driver_image_include_bitmap_quote:w #1 " #2 " #3 \q_stop { #1#2 } \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: |