[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: transparency tests (5c606f4)
Ulrike Fischer
fischer at troubleshooting-tex.de
Fri Jul 5 00:19:32 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : backendtest
Link : https://github.com/latex3/pdfresources/commit/5c606f48ae4eb1ce32e00ae92445678a669b91cd
>---------------------------------------------------------------
commit 5c606f48ae4eb1ce32e00ae92445678a669b91cd
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Jul 5 00:19:32 2019 +0200
transparency tests
>---------------------------------------------------------------
5c606f48ae4eb1ce32e00ae92445678a669b91cd
experiments/dvips-pattern.tex | 40 ++++++++++++++++++++++++++++++++++
experiments/dvips-texttransparency.tex | 32 +++++++++++++++++++++++++++
pageresources.tex | 6 +++--
3 files changed, 76 insertions(+), 2 deletions(-)
diff --git a/experiments/dvips-pattern.tex b/experiments/dvips-pattern.tex
new file mode 100644
index 0000000..72e446c
--- /dev/null
+++ b/experiments/dvips-pattern.tex
@@ -0,0 +1,40 @@
+\documentclass{standalone}
+%https://chat.stackexchange.com/transcript/message/50846964#50846964
+%define pattern prototype
+%% ps2pdf -dCompressStreams=false -dCompressPages=false -dNOSAFER dvips-pattern.ps
+
+\special{!
+ <<
+ /PatternType 1
+ /PaintType 1
+ /TilingType 1
+ /BBox [0 0 10 10]
+ /XStep 11
+ /YStep 11
+ /PaintProc {
+ pop
+ 0 0 moveto
+ 10 0 lineto
+ 5 10 lineto
+ closepath
+ 0.1 setlinewidth
+ stroke
+ } bind
+ >> matrix makepattern /Triang exch def
+}
+
+\begin{document}
+
+\makebox[200bp][l]{%
+ \rule{0pt}{100bp}%
+ \special{"
+ /Pattern setcolorspace
+ Triang setcolor
+ 0 0 moveto
+ 200 0 lineto
+ 200 100 lineto
+ 0 100 lineto closepath fill
+ }%
+}
+
+\end{document}
\ No newline at end of file
diff --git a/experiments/dvips-texttransparency.tex b/experiments/dvips-texttransparency.tex
new file mode 100644
index 0000000..2c527b2
--- /dev/null
+++ b/experiments/dvips-texttransparency.tex
@@ -0,0 +1,32 @@
+\documentclass{article}
+
+\usepackage{lipsum,l3pdf}
+\ExplSyntaxOn
+\pdf_uncompress:
+\ExplSyntaxOff
+\begin{document}
+% \special{color push Black 0.5 .setopacityalpha} %not ok!!
+\special{background rgb 1 1 0 0.5 .setopacityalpha}
+\special{color push rgb 1 0 0 0.5 .setopacityalpha}
+\lipsum[1]
+\special{color push rgb 0 0 1}
+\lipsum[1]
+\special{color push rgb 0 0 1 1.0 .setopacityalpha}
+\lipsum[1]
+\special{color push cmyk 0.5 0 1 0 0.8 .setopacityalpha}
+\lipsum[2]
+\special{color push gray 0.8 0.2 .setopacityalpha}
+\lipsum[1]
+\special{color pop}
+End!
+\special{color pop}
+End!
+\special{color pop}
+End!
+\special{color pop}
+End!
+\special{color pop}
+End!
+\special{background rgb 1 1 0 1 .setopacityalpha}
+
+\end{document}
\ No newline at end of file
diff --git a/pageresources.tex b/pageresources.tex
index a77e021..3a40fd6 100644
--- a/pageresources.tex
+++ b/pageresources.tex
@@ -168,8 +168,10 @@ It must be decided when to copy the property into pdfpageattr. Atbeginshipout?
(perhaps should be handled as an instance for a resource dictionary, entries ExtGState,
ColorSpace, Pattern, Shading, XObject, Font, ProcSet, Properties, see e.g. /DR entry in AcroForm).
\begin{itemize}
-\item token register, is added to the Resources dictionary of all \emph{following} pages.
-\item non-additive: A new call overwrites the content of the register (but not automatic entries like Font or XObject).
+\item pdfmode: token register, is added to the Resources dictionary of all \emph{following} pages.
+ non-additive: A new call overwrites the content of the register (but not automatic entries like Font or XObject).
+\item xetex: can be added with a special
+\item dvips: probably only through \enquote{side-effects}
\item Entries:
\begin{enumerate}
\item \emph{ExtGState} (dict)
More information about the latex3-commits
mailing list