summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def105
1 files changed, 79 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
index d90c9c2bdc5..50173240a0a 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
%%
-\GetIdInfo$Id: l3drivers.dtx 6511 2016-05-17 20:20:23Z joseph $
+\GetIdInfo$Id: l3drivers.dtx 6644 2016-08-13 20:22:11Z bruno $
{L3 Experimental drivers}
\ProvidesExplFile
{l3pdfmode.def}{\ExplFileDate}{\ExplFileVersion}
@@ -58,13 +58,13 @@
{ \pdftex_pdfliteral:D }
{#1}
}
-\cs_new_protected_nopar:Npx \__driver_scope_begin:
+\cs_new_protected:Npx \__driver_scope_begin:
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D save \scan_stop: }
{ \pdftex_pdfsave:D }
}
-\cs_new_protected_nopar:Npx \__driver_scope_end:
+\cs_new_protected:Npx \__driver_scope_end:
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D restore \scan_stop: }
@@ -86,7 +86,7 @@
{ }
}
\int_new:N \l__driver_color_stack_int
-\cs_new_protected_nopar:Npx \__driver_color_ensure_current:
+\cs_new_protected:Npx \__driver_color_ensure_current:
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D colorstack }
@@ -95,7 +95,7 @@
{ \exp_not:N \l__driver_current_color_tl }
\group_insert_after:N \exp_not:N \__driver_color_reset:
}
-\cs_new_protected_nopar:Npx \__driver_color_reset:
+\cs_new_protected:Npx \__driver_color_reset:
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D colorstack }
@@ -157,13 +157,13 @@
}
\cs_new_eq:NN \__driver_draw_literal:n \__driver_literal:n
\cs_generate_variant:Nn \__driver_draw_literal:n { x }
-\cs_new_protected_nopar:Npn \__driver_draw_begin:
+\cs_new_protected:Npn \__driver_draw_begin:
{ \__driver_draw_scope_begin: }
-\cs_new_protected_nopar:Npn \__driver_draw_end:
+\cs_new_protected:Npn \__driver_draw_end:
{ \__driver_draw_scope_end: }
-\cs_new_protected_nopar:Npn \__driver_draw_scope_begin:
+\cs_new_protected:Npn \__driver_draw_scope_begin:
{ \__driver_draw_literal:n { q } }
-\cs_new_protected_nopar:Npn \__driver_draw_scope_end:
+\cs_new_protected:Npn \__driver_draw_scope_end:
{ \__driver_draw_literal:n { Q } }
\cs_new_protected:Npn \__driver_draw_moveto:nn #1#2
{
@@ -185,29 +185,42 @@
c
}
}
-\bool_new:N \__driver_draw_eor_bool
-\cs_new_protected_nopar:Npn \__driver_draw_closepath:
+\cs_new_protected:Npn \__driver_draw_rectangle:nnnn #1#2#3#4
+ {
+ \__driver_draw_literal:x
+ {
+ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
+ \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
+ re
+ }
+ }
+\cs_new_protected:Npn \__driver_draw_evenodd_rule:
+ { \bool_gset_true:N \g__driver_draw_eor_bool }
+\cs_new_protected:Npn \__driver_draw_nonzero_rule:
+ { \bool_gset_false:N \g__driver_draw_eor_bool }
+\bool_new:N \g__driver_draw_eor_bool
+\cs_new_protected:Npn \__driver_draw_closepath:
{ \__driver_draw_literal:n { h } }
-\cs_new_protected_nopar:Npn \__driver_draw_stroke:
+\cs_new_protected:Npn \__driver_draw_stroke:
{ \__driver_draw_literal:n { S } }
-\cs_new_protected_nopar:Npn \__driver_draw_closestroke:
+\cs_new_protected:Npn \__driver_draw_closestroke:
{ \__driver_draw_literal:n { s } }
-\cs_new_protected_nopar:Npn \__driver_draw_fill:
+\cs_new_protected:Npn \__driver_draw_fill:
{
\__driver_draw_literal:x
- { f \bool_if:NT \__driver_draw_eor_bool * }
+ { f \bool_if:NT \g__driver_draw_eor_bool * }
}
-\cs_new_protected_nopar:Npn \__driver_draw_fillstroke:
+\cs_new_protected:Npn \__driver_draw_fillstroke:
{
\__driver_draw_literal:x
- { B \bool_if:NT \__driver_draw_eor_bool * }
+ { B \bool_if:NT \g__driver_draw_eor_bool * }
}
-\cs_new_protected_nopar:Npn \__driver_draw_clip:
+\cs_new_protected:Npn \__driver_draw_clip:
{
\__driver_draw_literal:x
- { W \bool_if:NT \__driver_draw_eor_bool * }
+ { W \bool_if:NT \g__driver_draw_eor_bool * }
}
-\cs_new_protected_nopar:Npn \__driver_draw_discardpath:
+\cs_new_protected:Npn \__driver_draw_discardpath:
{ \__driver_draw_literal:n { n } }
\cs_new_protected:Npn \__driver_draw_dash:nn #1#2
{
@@ -228,18 +241,34 @@
}
\cs_new_protected:Npn \__driver_draw_miterlimit:n #1
{ \__driver_draw_literal:x { \fp_eval:n {#1} ~ M } }
-\cs_new_protected_nopar:Npn \__driver_draw_cap_butt:
+\cs_new_protected:Npn \__driver_draw_cap_butt:
{ \__driver_draw_literal:n { 0 ~ J } }
-\cs_new_protected_nopar:Npn \__driver_draw_cap_round:
+\cs_new_protected:Npn \__driver_draw_cap_round:
{ \__driver_draw_literal:n { 1 ~ J } }
-\cs_new_protected_nopar:Npn \__driver_draw_cap_rectangle:
+\cs_new_protected:Npn \__driver_draw_cap_rectangle:
{ \__driver_draw_literal:n { 2 ~ J } }
-\cs_new_protected_nopar:Npn \__driver_draw_join_miter:
+\cs_new_protected:Npn \__driver_draw_join_miter:
{ \__driver_draw_literal:n { 0 ~ j } }
-\cs_new_protected_nopar:Npn \__driver_draw_join_round:
+\cs_new_protected:Npn \__driver_draw_join_round:
{ \__driver_draw_literal:n { 1 ~ j } }
-\cs_new_protected_nopar:Npn \__driver_draw_join_bevel:
+\cs_new_protected:Npn \__driver_draw_join_bevel:
{ \__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_color_cmyk_fill:nnnn #1#2#3#4
{
\__driver_draw_literal:x
@@ -258,10 +287,34 @@
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 }
+ }
\cs_new_protected:Npn \__driver_draw_color_gray_fill:n #1
{ \__driver_draw_literal:x { \fp_eval:n {#1} ~ g } }
\cs_new_protected:Npn \__driver_draw_color_gray_stroke:n #1
{ \__driver_draw_literal:x { \fp_eval: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_color_rgb_fill:nnn #1#2#3
{
\__driver_draw_literal:x