diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3dvips.def | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def index 367bdaf2526..30c8a6dc4f3 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def @@ -46,15 +46,11 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3drivers.dtx 6472 2016-04-05 13:26:17Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6494 2016-05-14 21:10:56Z joseph $ {L3 Experimental drivers} \ProvidesExplFile {l3dvips.def}{\ExplFileDate}{\ExplFileVersion} {L3 Experimental driver: dvips} -\cs_new_protected_nopar:Npx \__driver_state_save: - { \tex_special:D { ps:gsave } } -\cs_new_protected_nopar:Npx \__driver_state_restore: - { \tex_special:D { ps:grestore } } \cs_new_protected:Npx \__driver_literal:n #1 { \tex_special:D @@ -66,22 +62,26 @@ neg~exch~neg~exch~translate } } +\cs_new_protected_nopar:Npn \__driver_scope_begin: + { \tex_special:D { ps:gsave } } +\cs_new_protected_nopar:Npn \__driver_scope_end: + { \tex_special:D { ps:grestore } } \cs_new:Npn \__driver_absolute_lengths:n #1 { - /savedmatrix~matrix~currentmatrix~def~ + matrix~currentmatrix~ Resolution~72~div~VResolution~72~div~scale~ DVImag~dup~scale~ #1 ~ - savedmatrix~setmatrix + setmatrix } \cs_new_protected:Npn \__driver_box_use_clip:N #1 { - \__driver_state_save: + \__driver_scope_begin: \__driver_literal:n { \__driver_absolute_lengths:n { - 0~ + 0 ~ \dim_to_decimal_in_bp:n { \box_dp:N #1 } ~ \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~ \dim_to_decimal_in_bp:n { -\box_ht:N #1 - \box_dp:N #1 } ~ @@ -89,36 +89,34 @@ } } \hbox_overlap_right:n { \box_use:N #1 } - \__driver_state_restore: + \__driver_scope_end: \skip_horizontal:n { \box_wd:N #1 } } -\cs_new_protected_nopar:Npn \__driver_box_rotate_begin: +\cs_new_protected:Npn \__driver_box_use_rotate:Nn #1#2 { - \__driver_state_save: - \fp_set:Nn \l__box_angle_fp { round ( \l__box_angle_fp , 5 ) } + \__driver_scope_begin: \__driver_literal:n { - \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp + \fp_compare:nNnTF {#2} = \c_zero_fp { 0 } - { \fp_eval:n { -\l__box_angle_fp } } - \c_space_tl + { \fp_eval:n { round ( -#2 , 5 ) } } ~ rotate } + \box_use:N #1 + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore: -\cs_new_protected_nopar:Npn \__driver_box_scale_begin: +\cs_new_protected:Npn \__driver_box_use_scale:Nnn #1#2#3 { - \__driver_state_save: - \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) } - \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) } + \__driver_scope_begin: \__driver_literal:n { - \fp_use:N \l__box_scale_x_fp \c_space_tl - \fp_use:N \l__box_scale_y_fp \c_space_tl + \fp_eval:n { round ( #2 , 5 ) } ~ + \fp_eval:n { round ( #3 , 5 ) } ~ scale } + \hbox_overlap_right:n { \box_use:N #1 } + \__driver_scope_end: } -\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore: \tl_new:N \l__driver_current_color_tl \tl_set:Nn \l__driver_current_color_tl { gray~0 } \AtBeginDocument @@ -127,12 +125,13 @@ { \tl_set:Nn \l__driver_current_color_tl { \current@color } } { } } -\cs_new_protected_nopar:Npx \__driver_color_ensure_current: +\cs_new_protected_nopar:Npn \__driver_color_ensure_current: { - \tex_special:D { color~push~\exp_not:N \l__driver_current_color_tl } - \group_insert_after:N \exp_not:N \__driver_color_reset: + \tex_special:D { color~push~\l__driver_current_color_tl } + \group_insert_after:N \__driver_color_reset: } -\cs_new_protected_nopar:Npx \__driver_color_reset: + +\cs_new_protected_nopar:Npn \__driver_color_reset: { \tex_special:D { color~pop } } %% %% |