diff options
author | Karl Berry <karl@freefriends.org> | 2017-05-14 22:40:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-05-14 22:40:58 +0000 |
commit | e0c5d6d38a1f285f20a66692e46d2e607d6ff1dd (patch) | |
tree | 977232bc088d27b46d9a6330c8f4f47aa98dbb78 /Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def | |
parent | 4407d96af752e6e79a48c25c5189bd1a63fbd125 (diff) |
l3 (14may17)
git-svn-id: svn://tug.org/texlive/trunk@44351 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def | 67 |
1 files changed, 26 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def index 421757e959a..a2e1fb7ee87 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvipdfmx.def @@ -25,26 +25,9 @@ \cs_new_protected:Npn \__driver_literal:n #1 { \tex_special:D { pdf:literal~ #1 } } \cs_new_protected:Npn \__driver_scope_begin: - { \__driver_literal:n { q } } + { \tex_special:D { x:gsave } } \cs_new_protected:Npn \__driver_scope_end: - { \__driver_literal:n { Q } } -\cs_new_protected:Npn \__driver_matrix:n #1 - { \__driver_literal:n { #1 \c_space_tl 0~0~cm } } -\tl_new:N \l__driver_current_color_tl -\tl_set:Nn \l__driver_current_color_tl { [ 0 ] } -\AtBeginDocument - { - \@ifpackageloaded { color } - { \tl_set:Nn \l__driver_current_color_tl { \current@color } } - { } - } -\cs_new_protected:Npn \__driver_color_ensure_current: - { - \tex_special:D { pdf:bcolor~\l__driver_current_color_tl } - \group_insert_after:N \__driver_color_reset: - } -\cs_new_protected:Npn \__driver_color_reset: - { \tex_special:D { pdf:ecolor } } + { \tex_special:D { x:grestore } } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { \__driver_scope_begin: @@ -63,41 +46,43 @@ \cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { \__driver_scope_begin: - \box_set_wd:Nn #1 \c_zero_dim - \fp_set:Nn \l__driver_cos_fp { round ( cosd ( #2 ) , 5 ) } - \fp_compare:nNnT \l__driver_cos_fp = \c_zero_fp - { \fp_zero:N \l__driver_cos_fp } - \fp_set:Nn \l__driver_sin_fp { round ( sind ( #2 ) , 5 ) } - \__driver_matrix:n + \tex_special:D { - \fp_use:N \l__driver_cos_fp \c_space_tl - \fp_compare:nNnTF \l__driver_sin_fp = \c_zero_fp - { 0~0 } - { - \fp_use:N \l__driver_sin_fp - \c_space_tl - \fp_eval:n { -\l__driver_sin_fp } - } - \c_space_tl - \fp_use:N \l__driver_cos_fp + x:rotate~ + \fp_compare:nNnTF {#2} = \c_zero_fp + { 0 } + { \fp_eval:n { round ( #2 , 5 ) } } } - \box_use:N #1 - \__driver_scope_end: + \box_use:N #1 + \__driver_scope_end: } -\fp_new:N \l__driver_cos_fp -\fp_new:N \l__driver_sin_fp \cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { \__driver_scope_begin: - \__driver_matrix:n + \tex_special:D { + x:scale~ \fp_eval:n { round ( #2 , 5 ) } ~ - 0~0~ \fp_eval:n { round ( #3 , 5 ) } } \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 ] } +\AtBeginDocument + { + \@ifpackageloaded { color } + { \tl_set:Nn \l__driver_current_color_tl { \current@color } } + { } + } +\cs_new_protected:Npn \__driver_color_ensure_current: + { + \tex_special:D { pdf:bcolor~\l__driver_current_color_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_draw_literal:n \__driver_literal:n \cs_generate_variant:Nn \__driver_draw_literal:n { x } \cs_new_protected:Npn \__driver_draw_begin: |