summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def110
1 files changed, 70 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
index 61f8f584ea8..ff4307c4acf 100644
--- a/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
+++ b/Master/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
@@ -10,8 +10,9 @@
%% l3backend-draw.dtx (with options: `package,dvips')
%% l3backend-graphics.dtx (with options: `package,dvips')
%% l3backend-pdf.dtx (with options: `package,dvips')
+%% l3backend-opacity.dtx (with options: `package,dvips')
%%
-%% Copyright (C) 1990-2021 The LaTeX3 Project
+%% Copyright (C) 1990-2021 The LaTeX Project
%%
%% It may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License (LPPL), either version 1.3c of
@@ -25,7 +26,7 @@
%%
%% File: l3backend-basics.dtx
\ProvidesExplFile
- {l3backend-dvips.def}{2021-01-09}{}
+ {l3backend-dvips.def}{2020-01-29}{}
{L3 backend support: dvips}
\cs_if_exist:NTF \__kernel_dependency_version_check:nn
{
@@ -104,8 +105,7 @@
\cs_new_protected:Npn \__color_backend_select:n #1
{
\__kernel_backend_literal:n { color~push~ #1 }
- \__kernel_backend_postscript:n { /color.sc~ { ~ } ~def }
- \__kernel_backend_postscript:n { /color.fc~ { ~ } ~def }
+ \__kernel_backend_postscript:n { /color.sc ~ { } ~ def }
\group_insert_after:N \__color_backend_reset:
}
\cs_new_protected:Npn \__color_backend_reset:
@@ -282,21 +282,26 @@
}
}
\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
- { \__kernel_backend_postscript:n { /color.fc { #1 ~ setcmykcolor } def } }
+ { \__color_backend_fill:n { cmyk ~ #1 } }
\cs_new_protected:Npn \__color_backend_fill_gray:n #1
- { \__kernel_backend_postscript:n { /color.fc { #1 ~ setgray } def } }
+ { \__color_backend_fill:n { gray ~ #1 } }
\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
- { \__kernel_backend_postscript:n { /color.fc { #1 ~ setrgbcolor } def } }
- \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+ { \__color_backend_fill:n { rgb ~ #1 } }
+\cs_new_protected:Npn \__color_backend_fill:n #1
+ {
+ \__kernel_backend_literal:n { color~push~ #1 }
+ \group_insert_after:N \__color_backend_reset:
+ }
+\cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
{ \__kernel_backend_postscript:n { /color.sc { #1 ~ setcmykcolor } def } }
\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
{ \__kernel_backend_postscript:n { /color.sc { #1 ~ setgray } def } }
\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
{ \__kernel_backend_postscript:n { /color.sc { #1 ~ setrgbcolor } def } }
\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
- { \__kernel_backend_postscript:n { /color.fc { #1 } def } }
+ { \__color_backend_fill:n { separation ~ #1 ~ #2 } }
\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
- { \__kernel_backend_postscript:n { /color.sc { #1 } def } }
+ { \__kernel_backend_postscript:n { /color.sc { separation ~ #1 ~ #2 } def } }
\cs_new_eq:NN \__color_backend_fill_devicen:nn \__color_backend_fill_separation:nn
\cs_new_eq:NN \__color_backend_stroke_devicen:nn \__color_backend_stroke_separation:nn
%% File: l3backend-box.dtx
@@ -436,14 +441,11 @@
}
\cs_new_protected:Npn \__draw_backend_fill:
{
- \__draw_backend_literal:n { gsave }
- \__draw_backend_literal:n { color.fc }
\__draw_backend_literal:x
{
\bool_if:NT \g__draw_draw_eor_bool { eo }
fill
}
- \__draw_backend_literal:n { grestore }
\bool_if:NT \g__draw_draw_clip_bool
{
\__draw_backend_literal:x
@@ -457,16 +459,15 @@
}
\cs_new_protected:Npn \__draw_backend_fillstroke:
{
- \__draw_backend_literal:n { gsave }
- \__draw_backend_literal:n { color.sc }
- \__draw_backend_literal:n { color.fc }
\__draw_backend_literal:x
{
\bool_if:NT \g__draw_draw_eor_bool { eo }
fill
}
- \__draw_backend_literal:n { grestore }
+ \__draw_backend_literal:n { gsave }
+ \__draw_backend_literal:n { color.sc }
\__draw_backend_literal:n { stroke }
+ \__draw_backend_literal:n { grestore }
\bool_if:NT \g__draw_draw_clip_bool
{
\__draw_backend_literal:x
@@ -904,29 +905,38 @@
/DEST
}
}
-\cs_new_protected:Npn \__pdf_backend_destination_box:nn #1#2
- {
- \group_begin:
- \hbox_set:Nn \l__pdf_internal_box {#2}
- \box_move_down:nn
- { \box_dp:N \l__pdf_internal_box }
- { \hbox:n { \__kernel_backend_postscript:n { pdf.save.ll } } }
- \box_use:N \l__pdf_internal_box
- \box_move_up:nn
- { \box_ht:N \l__pdf_internal_box }
- { \hbox:n { \__kernel_backend_postscript:n { pdf.save.ur } } }
- \__pdf_backend_pdfmark:n
- {
- /View
- [
- /FitR ~
- pdf.llx ~ pdf.lly ~ pdf.dest2device ~
- pdf.urx ~ pdf.ury ~ pdf.dest2device
- ]
- /Dest ( #1 ) cvn
- /DEST
- }
- \group_end:
+\cs_new_protected:Npn \__pdf_backend_destination:nnnn #1#2#3#4
+ {
+ \exp_args:Ne \__pdf_backend_destination_aux:nnnn
+ { \dim_eval:n {#2} } {#1} {#3} {#4}
+ }
+\cs_new_protected:Npn \__pdf_backend_destination_aux:nnnn #1#2#3#4
+ {
+ \vbox_to_zero:n
+ {
+ \tex_kern:D \dim_eval:n {#4} \scan_stop:
+ \hbox:n { \__kernel_backend_postscript:n { pdf.save.ll } }
+ \tex_vss:D
+ }
+ \tex_kern:D #1 \scan_stop:
+ \vbox_to_zero:n
+ {
+ \tex_kern:D \dim_eval:n { -#3 } \scan_stop:
+ \hbox:n { \__kernel_backend_postscript:n { pdf.save.ur } }
+ \tex_vss:D
+ }
+ \tex_kern:D -#1 \scan_stop:
+ \__pdf_backend_pdfmark:n
+ {
+ /View
+ [
+ /FitR ~
+ pdf.llx ~ pdf.lly ~ pdf.dest2device ~
+ pdf.urx ~ pdf.ury ~ pdf.dest2device
+ ]
+ /Dest ( #2 ) cvn
+ /DEST
+ }
}
\cs_new_protected:Npn \__pdf_backend_compresslevel:n #1
{
@@ -960,6 +970,26 @@
{ \__pdf_backend_pdfmark:n { /#1 ~ #2 /BDC } }
\cs_new_protected:Npn \__pdf_backend_emc:
{ \__pdf_backend_pdfmark:n { /EMC } }
+%% File: l3backend-opacity.dtx
+\cs_new_protected:Npn \__opacity_backend_select:n #1
+ {
+ \exp_args:Nx \__opacity_backend_select_aux:n
+ { \fp_eval:n { min(max(0,#1),1) } }
+ }
+\cs_new_protected:Npn \__opacity_backend_select_aux:n #1
+ {
+ \__kernel_backend_postscript:n
+ { #1 ~ .setfillconstantalpha ~ #1 ~ .setstrokeconstantalpha }
+ }
+\cs_new_protected:Npn \__opacity_backend_fill:n #1
+ { \__opacity_backend:xn { \fp_eval:n { min(max(0,#1),1) } } { fill } }
+\cs_new_protected:Npn \__opacity_backend_stroke:n #1
+ { \__opacity_backend:xn { \fp_eval:n { min(max(0,#1),1) } } { stroke } }
+\cs_new_protected:Npn \__opacity_backend:nn #1#2
+ {
+ \__kernel_backend_postscript:n { #1 ~ .set #2 constantalpha }
+ }
+\cs_generate_variant:Nn \__opacity_backend:nn { x }
%%
%%
%% End of file `l3backend-dvips.def'.