diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def | 105 |
1 files changed, 24 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def index 6441a44a021..11e0b7afb70 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def @@ -6,7 +6,7 @@ %% %% l3drivers.dtx (with options: `package,pdfmode') %% -%% Copyright (C) 1990-2017 The LaTeX3 Project +%% Copyright (C) 1990-2018 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -22,17 +22,17 @@ \ProvidesExplFile {l3pdfmode.def}{2017/03/18}{} {L3 Experimental driver: PDF mode} -\cs_new_protected:Npn \__driver_color_pickup:N #1 { } +\cs_new_protected:Npn \driver_color_pickup:N #1 { } \AtBeginDocument { \@ifpackageloaded { color } { - \cs_set_protected:Npn \__driver_color_pickup:N #1 + \cs_set_protected:Npn \driver_color_pickup:N #1 { - \exp_last_unbraced:Nx \__driver_color_pickup_aux:w + \exp_last_unbraced:Nx \__driver_color_pickup:w { \current@color } ~ 0 ~ 0 ~ 0 \q_stop #1 } - \cs_new_protected:Npn \__driver_color_pickup_aux:w + \cs_new_protected:Npn \__driver_color_pickup:w #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \q_stop #7 { \str_if_eq:nnTF {#2} { g } @@ -59,32 +59,22 @@ { } } \int_new:N \l__driver_color_stack_int +\cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4 + { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K } } +\cs_new_protected:Npn \driver_color_gray:n #1 + { \__driver_color_select:n { #1 ~ g ~ #1 ~ G } } +\cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3 + { \__driver_color_select:n { #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG } } +\cs_new_protected:Npn \driver_color_spot:nn #1#2 + { \__driver_color_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC } } \cs_new_protected:Npx \__driver_color_select:n #1 { \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D colorstack } { \pdftex_pdfcolorstack:D } - \exp_not:N \l__driver_color_stack_int push - { - \exp_not:N \__driver_color_convert:w - #1 - \exp_not:N \q_stop - } - } -\cs_generate_variant:Nn \__driver_color_select:n { V } -\cs_new:Npn \__driver_color_convert:w #1 ~ #2 \q_stop - { \use:c { __driver_color_convert_ #1 :w } #2 \q_stop } -\cs_new:Npn \__driver_color_convert_gray:w #1 \q_stop - { #1 ~ g ~ #1 ~ G } -\cs_new:Npn \__driver_color_convert_cmyk:w #1 \q_stop - { #1 ~ k ~ #1 ~ K } -\cs_new:Npn \__driver_color_convert_rgb:w #1 \q_stop - { #1 ~ rg ~ #1 ~ RG } -\cs_new:Npn \__driver_color_convert_spot:w #1 ~ #2 \q_stop - { - /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC + \exp_not:N \l__driver_color_stack_int push {#1} } -\cs_new_protected:Npx \__driver_color_reset: +\cs_new_protected:Npx \driver_color_reset: { \cs_if_exist:NTF \luatex_pdfextension:D { \luatex_pdfextension:D colorstack } @@ -323,7 +313,7 @@ { \dim_to_decimal_in_bp:n {#1} ~ w } } \cs_new_protected:Npn \driver_draw_miterlimit:n #1 - { \__driver_draw_literal:x { \fp_eval:n {#1} ~ M } } + { \__driver_draw_literal:x { #1 ~ M } } \cs_new_protected:Npn \driver_draw_cap_butt: { \__driver_draw_literal:n { 0 ~ J } } \cs_new_protected:Npn \driver_draw_cap_round: @@ -338,82 +328,35 @@ { \__driver_draw_literal:n { 2 ~ j } } \cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4 { - \use:x - { - \__driver_draw_color_cmyk_aux:nnnn - { \fp_eval:n {#1} } - { \fp_eval:n {#2} } - { \fp_eval:n {#3} } - { \fp_eval:n {#4} } - } - } -\cs_new_protected:Npn \__driver_draw_color_cmyk_aux:nnnn #1#2#3#4 - { \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K } } \cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4 { - \__driver_draw_literal:x - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ - k - } + \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ k } } \cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4 - { - \__driver_draw_literal:x - { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ - K - } - } + { \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ K } } \cs_new_protected:Npn \driver_draw_color_gray:n #1 - { - \use:x - { \__driver_draw_color_gray_aux:n { \fp_eval:n {#1} } } - } -\cs_new_protected:Npn \__driver_draw_color_gray_aux:n #1 - { - \__driver_draw_literal:n { #1 ~ g ~ #1 ~ G } - } + { \__driver_draw_literal:n { #1 ~ g ~ #1 ~ G } } \cs_new_protected:Npn \driver_draw_fill_gray:n #1 - { \__driver_draw_literal:x { \fp_eval:n {#1} ~ g } } + { \__driver_draw_literal:n { #1 ~ g } } \cs_new_protected:Npn \driver_draw_stroke_gray:n #1 - { \__driver_draw_literal:x { \fp_eval:n {#1} ~ G } } + { \__driver_draw_literal:n { #1 ~ G } } \cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3 { - \use:x - { - \__driver_draw_color_rgb_aux:nnn - { \fp_eval:n {#1} } - { \fp_eval:n {#2} } - { \fp_eval:n {#3} } - } - } -\cs_new_protected:Npn \__driver_draw_color_rgb_aux:nnn #1#2#3 - { \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG } } \cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3 - { - \__driver_draw_literal:x - { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg } - } + { \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ rg } } \cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3 - { - \__driver_draw_literal:x - { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG } - } + { \__driver_draw_literal:n { #1 ~ #2 ~ #3 ~ RG } } \cs_new_protected:Npn \driver_draw_transformcm:nnnnnn #1#2#3#4#5#6 { \__driver_draw_literal:x { - \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ - \fp_eval:n {#3} ~ \fp_eval:n {#4} ~ + #1 ~ #2 ~ #3 ~ #4 ~ \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~ cm } |