[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: cleaning (eba6532)

Ulrike Fischer fischer at troubleshooting-tex.de
Sat Jun 29 11:44:47 CEST 2019


Repository : https://github.com/latex3/pdfresources
On branch  : backendtest
Link       : https://github.com/latex3/pdfresources/commit/eba65321ede4b6f22f22011190b3ecd2ce5838ef

>---------------------------------------------------------------

commit eba65321ede4b6f22f22011190b3ecd2ce5838ef
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Jun 29 11:44:47 2019 +0200

    cleaning


>---------------------------------------------------------------

eba65321ede4b6f22f22011190b3ecd2ce5838ef
 experiments/dvips-transparency.tex     |  45 +++++---
 testfiles/extgstate-patches.luatex.tpf | 193 --------------------------------
 testfiles/extgstate-patches.pvt        |  15 ---
 testfiles/extgstate-patches.tpf        | 194 ---------------------------------
 4 files changed, 32 insertions(+), 415 deletions(-)

diff --git a/experiments/dvips-transparency.tex b/experiments/dvips-transparency.tex
index 685d73a..828500d 100644
--- a/experiments/dvips-transparency.tex
+++ b/experiments/dvips-transparency.tex
@@ -5,19 +5,15 @@
 %https://chat.stackexchange.com/transcript/message/50669099#50669099
 \begin{document}
 Hello
-%works
-%\special{ps:
-%  systemdict /.setopacityalpha known
-%  {0.5 .setopacityalpha}{mark /CA 0.5 /ca 0.5 /SetTransparency pdfmark}
-%  ifelse
-%} 
+% works arg 1: ghostscript, arg 2 distiller
+\special{ps:
+  systemdict /.setopacityalpha known
+  {0.5 .setopacityalpha}{mark /CA 0.5 /ca 0.5 /SetTransparency pdfmark}
+  ifelse
+}
 World!
 
 %seems to do nothing ...
-%\special{ps:
-%  mark /CA 0.5 /ca 0.5 /SetTransparency pdfmark
-%  }
-
 World!
 
 % works too
@@ -26,7 +22,18 @@ World!
 
 % overprint? transparency fill/stroke?
 \end{document}
+\__kernel_backend_postscript_header:n
+    /.setopacityalpha where {pop} {/.setopacityalpha{pop}def} ifelse % install .setopacityalpha
+    /.pgfsetfillopacityalpha{/pgffoa exch def
+      /pgffill{gsave pgffoa .setopacityalpha fill 1 .setopacityalpha newpath fill grestore newpath}bind def
+      /pgfeofill{gsave pgffoa .setopacityalpha eofill 1 .setopacityalpha newpath eofill grestore newpath}bind def}bind def
+    /.pgfsetstrokeopacityalpha{/pgfsoa exch def /pgfstr{gsave pgfsoa .setopacityalpha stroke grestore newpath}bind def}bind def
 
+\special{ps:
+  systemdict /.setopacityalpha known
+  {0.5 .setopacityalpha}{mark /CA 0.5 /ca 0.5 /SetTransparency pdfmark}
+  ifelse
+}
 
 \special{"
   10 setlinewidth
@@ -48,6 +55,18 @@ World!
 \makebox[100bp]{\rule{0pt}{100bp}}
 
 \end{document}
-
-\bf 
-\bye
\ No newline at end of file
+%pgf
+\def\pgfsys at stroke@opacity#1{%
+  \expandafter\ifx\csname pgf at sys@pdf at so@#1\endcsname\relax%
+    \expandafter\gdef\csname pgf at sys@pdf at so@#1\endcsname{/pgf at CA#1}%
+    \pgfutil at addpdfresource@extgs{/pgf at CA#1 << /CA #1 >>}%<<
+  \fi%
+  \pgfsysprotocol at literal{\csname pgf at sys@pdf at so@#1\endcsname\space gs}%
+}
+\def\pgfsys at fill@opacity#1{%
+  \expandafter\ifx\csname pgf at sys@pdf at fo@#1\endcsname\relax%
+    \expandafter\gdef\csname pgf at sys@pdf at fo@#1\endcsname{/pgf at ca#1}%
+    \pgfutil at addpdfresource@extgs{/pgf at ca#1 << /ca #1 >>}%<<
+  \fi%
+  \pgfsysprotocol at literal{\csname pgf at sys@pdf at fo@#1\endcsname\space gs}%
+} 
\ No newline at end of file
diff --git a/testfiles/extgstate-patches.luatex.tpf b/testfiles/extgstate-patches.luatex.tpf
deleted file mode 100644
index ab0c808..0000000
--- a/testfiles/extgstate-patches.luatex.tpf
+++ /dev/null
@@ -1,193 +0,0 @@
-%PDF-1.5
-%ÌÕÁÔÅØÐÄÆ
-9 0 obj
-<< /Type /ExtGState /op false /OP false >>
-endobj
-10 0 obj
-<< /Type /ExtGState /op true /OP true /OPM 0 >>
-endobj
-11 0 obj
-<< /Type /ExtGState /op true /OP true /OPM 1 >>
-endobj
-12 0 obj
-<< /SPCko 9 0 R /SPCmz 10 0 R /SPCop 11 0 R >>
-endobj
-13 0 obj
-<< /Type/ExtGState /op false /OP false >>
-endobj
-14 0 obj
-<< /Type/ExtGState /op true /OP true /OPM 0 >>
-endobj
-15 0 obj
-<< /Type/ExtGState /op true /OP true /OPM 1 >>
-endobj
-18 0 obj
-<< /Length 512 >>        
-stream
-/TRP1 gs
-/SPCop gs 
-0 g 0 G
-0 g 0 G
-0 g 0 G
-1 0 0 1 148.712 638.852 cm
-q 
-0 G 
-0 g 
-0.3985 w 
-q 
-q 
-/pgf at CA0.4 gs 
-/pgf at ca0.4 gs 
-1 0 0 rg 1 0 0 RG
-0.0 0.0 m 
-0.0 0.0 m 
-0.0 28.3468 l 
-28.3468 28.3468 l 
-28.3468 0.0 l 
-h 
-28.3468 28.3468 m 
-f 
-0 g 0 G
-Q 
-Q 
-n 
-Q 
-1 0 0 1 -148.712 -638.852 cm
-BT
-/F25 9.96264 Tf
-1 0 0 1 148.712 626.896 Tm [<001C0023>-28<002B>]TJ
-/TRP.6 gs
-1 0 0 1 163.935 626.896 Tm [<0073007300730073007300730073007300730073>]TJ
-/TRP1 gs
-0 g 0 G
-1 0 0 1 303.133 89.365 Tm [<0052>]TJ
-0 g 0 G
-ET
-endstream
-endobj
-17 0 obj
-<< /Type /Page /Contents 18 0 R /Resources 16 0 R /MediaBox [ 0 0 612 792 ] /Parent 20 0 R >>
-endobj
-16 0 obj
-<< /ExtGState 1 0 R /ColorSpace 2 0 R /Pattern 3 0 R /Shading 4 0 R /Properties 5 0 R  /Font << /F25 19 0 R >> /ProcSet [ /PDF /Text ] >>
-endobj
-1 0 obj
-<< /SPCko 13 0 R /SPCmz 14 0 R /SPCop 15 0 R /TRP.6 <</ca .6/CA .6>> /TRP1 <</ca 1/CA 1>> /pgf at CA0.4  << /CA 0.4 >> /pgf at ca0.4  << /ca 0.4 >>  >>
-endobj
-2 0 obj
-<< /pgfprgb  [/Pattern /DeviceRGB]  >>
-endobj
-3 0 obj
-<<  >>
-endobj
-4 0 obj
-<<  >>
-endobj
-5 0 obj
-<<  >>
-endobj
-21 0 obj
-[ 28 [ 500 ] 35 [ 556 ] 43 [ 444 ] 82 [ 500 ] 115 [ 750 ] ]
-endobj
-23 0 obj
-<< /Length 15 >>         
-[BINARY STREAM]
-endobj
-24 0 obj
-<< /Subtype /CIDFontType0C /Length 1138 >>       
-[BINARY STREAM]
-endobj
-22 0 obj
-<< /Type /FontDescriptor /FontName /LGSPPO+LMRoman10-Regular /Flags 4 /FontBBox [ -430 -290 1417 1127 ] /Ascent 1127 /CapHeight 683 /Descent -290 /ItalicAngle 0 /StemV 93 /XHeight 431 /FontFile3 24 0 R /CIDSet 23 0 R >>
-endobj
-25 0 obj
-<< /Length 748 >>        
-stream
-%!PS-Adobe-3.0 Resource-CMap
-%%DocumentNeededResources: ProcSet (CIDInit)
-%%IncludeResource: ProcSet (CIDInit)
-%%BeginResource: CMap (TeX-LGSPPO-LMRoman10-Regular-0)
-%%Title: (TeX-LGSPPO-LMRoman10-Regular-0 TeX LGSPPO-LMRoman10-Regular 0)
-%%Version: 1.000
-%%EndComments
-/CIDInit /ProcSet findresource begin
-12 dict begin
-begincmap
-/CIDSystemInfo
-<< /Registry (TeX)
-/Ordering (LGSPPO-LMRoman10-Regular)
-/Supplement 0
->> def
-/CMapName /TeX-Identity-LGSPPO-LMRoman10-Regular def
-/CMapType 2 def
-1 begincodespacerange
-<0000> <FFFF>
-endcodespacerange
-0 beginbfrange
-endbfrange
-5 beginbfchar
-<001C> <0061>
-<0023> <0062>
-<002B> <0063>
-<0052> <0031>
-<0073> <0058>
-endbfchar
-endcmap
-CMapName currentdict /CMap defineresource pop
-end
-end
-%%EndResource
-%%EOF
-endstream
-endobj
-19 0 obj
-<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /LGSPPO+LMRoman10-Regular /DescendantFonts [ 26 0 R ] /ToUnicode 25 0 R >>
-endobj
-26 0 obj
-<< /Type /Font /Subtype /CIDFontType0 /BaseFont /LGSPPO+LMRoman10-Regular /FontDescriptor 22 0 R /W 21 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
-endobj
-20 0 obj
-<< /Type /Pages  /Count 1 /Kids [ 17 0 R ] >>
-endobj
-27 0 obj
-<< /Type /Catalog /Pages 20 0 R >>
-endobj
-28 0 obj
-<< /Producer (LuaTeX) /Creator (TeX) /Trapped /False >>
-endobj
-xref
-0 29
-0000000006 65535 f 
-0000001289 00000 n 
-0000001450 00000 n 
-0000001504 00000 n 
-0000001526 00000 n 
-0000001548 00000 n 
-0000000007 00000 f 
-0000000008 00000 f 
-0000000000 00000 f 
-0000000020 00000 n 
-0000000078 00000 n 
-0000000142 00000 n 
-0000000206 00000 n 
-0000000269 00000 n 
-0000000327 00000 n 
-0000000390 00000 n 
-0000001135 00000 n 
-0000001025 00000 n 
-0000000453 00000 n 
-0000003987 00000 n 
-0000004341 00000 n 
-0000001570 00000 n 
-0000002943 00000 n 
-0000001646 00000 n 
-0000001721 00000 n 
-0000003179 00000 n 
-0000004141 00000 n 
-0000004403 00000 n 
-0000004454 00000 n 
-trailer
-<< /Size 29 /Root 27 0 R /Info 28 0 R >>
-startxref
-4526
-%%EOF
diff --git a/testfiles/extgstate-patches.pvt b/testfiles/extgstate-patches.pvt
deleted file mode 100644
index 4656caa..0000000
--- a/testfiles/extgstate-patches.pvt
+++ /dev/null
@@ -1,15 +0,0 @@
-\input{regression-test}
-\RequirePackage[enable-debug,check-declarations]{expl3}
-\RequirePackage[patches]{pdfresources}
-
-\documentclass{article}
-\usepackage{tikz,transparent}
-\usetikzlibrary{patterns,shadings}
-\usepackage[overprint]{colorspace}
-
-
-\begin{document}
-\tikz\fill[opacity=0.4,red](0,0)rectangle (1,1);
-
-abc\texttransparent{0.6}{XXXXXXXXXX}
-\end{document} 
\ No newline at end of file
diff --git a/testfiles/extgstate-patches.tpf b/testfiles/extgstate-patches.tpf
deleted file mode 100644
index 3950b77..0000000
--- a/testfiles/extgstate-patches.tpf
+++ /dev/null
@@ -1,194 +0,0 @@
-%PDF-1.5
-%ÐÔÅØ
-9 0 obj
-<< /Type /ExtGState /op false /OP false >>
-endobj
-10 0 obj
-<< /Type /ExtGState /op true /OP true /OPM 0 >>
-endobj
-11 0 obj
-<< /Type /ExtGState /op true /OP true /OPM 1 >>
-endobj
-12 0 obj
-<< /SPCko 9 0 R /SPCmz 10 0 R /SPCop 11 0 R >>
-endobj
-13 0 obj
-<< /Type/ExtGState /op false /OP false >>
-endobj
-14 0 obj
-<< /Type/ExtGState /op true /OP true /OPM 0 >>
-endobj
-15 0 obj
-<< /Type/ExtGState /op true /OP true /OPM 1 >>
-endobj
-18 0 obj
-<<
-/Length 429       
->>
-stream
-/TRP1 gs
-/SPCop gs 
-0 g 0 G
-0 g 0 G
-0 g 0 G
-1 0 0 1 148.712 638.852 cm
-q 
-0 G 
-0 g 
-0.3985 w 
-q 
-q 
-/pgf at CA0.4 gs 
-/pgf at ca0.4 gs 
-1 0 0 rg 1 0 0 RG
-0.0 0.0 m 
-0.0 0.0 m 
-0.0 28.3468 l 
-28.3468 28.3468 l 
-28.3468 0.0 l 
-h 
-28.3468 28.3468 m 
-f 
-0 g 0 G
-Q 
-Q 
-n 
-Q 
-1 0 0 1 -148.712 -638.852 cm
-BT
-/F8 9.9626 Tf 148.712 626.896 Td [(ab)-28(c)]TJ
-/TRP.6 gs
- [(XXXXXXXXXX)]TJ
-/TRP1 gs
-0 g 0 G
- 154.421 -537.531 Td [(1)]TJ
-0 g 0 G
-ET
-endstream
-endobj
-17 0 obj
-<<
-/Type /Page
-/Contents 18 0 R
-/Resources 16 0 R
-/MediaBox [0 0 612 792]
-/Parent 20 0 R
->>
-endobj
-16 0 obj
-<<
-/ExtGState 1 0 R /ColorSpace 2 0 R /Pattern 3 0 R /Shading 4 0 R /Properties 5 0 R 
-/Font << /F8 19 0 R >>
-/ProcSet [ /PDF /Text ]
->>
-endobj
-1 0 obj
-<< /SPCko 13 0 R /SPCmz 14 0 R /SPCop 15 0 R /TRP.6 <</ca .6/CA .6>> /TRP1 <</ca 1/CA 1>> /pgf at CA0.4  << /CA 0.4 >> /pgf at ca0.4  << /ca 0.4 >>  >>
-endobj
-2 0 obj
-<< /pgfprgb  [/Pattern /DeviceRGB]  >>
-endobj
-3 0 obj
-<<  >>
-endobj
-4 0 obj
-<<  >>
-endobj
-5 0 obj
-<<  >>
-endobj
-21 0 obj
-[500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4]
-endobj
-22 0 obj
-<<
-/Length1 1421
-/Length2 8159
-/Length3 0
-/Length 9580      
->>
-[BINARY STREAM]
-endobj
-23 0 obj
-<<
-/Type /FontDescriptor
-/FontName /BYEZUZ+CMR10
-/Flags 4
-/FontBBox [-40 -250 1009 750]
-/Ascent 694
-/CapHeight 683
-/Descent -194
-/ItalicAngle 0
-/StemV 69
-/XHeight 431
-/CharSet (/X/a/b/c/one)
-/FontFile 22 0 R
->>
-endobj
-19 0 obj
-<<
-/Type /Font
-/Subtype /Type1
-/BaseFont /BYEZUZ+CMR10
-/FontDescriptor 23 0 R
-/FirstChar 49
-/LastChar 99
-/Widths 21 0 R
->>
-endobj
-20 0 obj
-<<
-/Type /Pages
-/Count 1
-/Kids [17 0 R]
->>
-endobj
-24 0 obj
-<<
-/Type /Catalog
-/Pages 20 0 R
->>
-endobj
-25 0 obj
-<<
-/Producer (pdfTeX)
-/Creator (TeX)
-/Trapped /False
->>
-endobj
-xref
-0 26
-0000000006 65535 f 
-0000001197 00000 n 
-0000001358 00000 n 
-0000001412 00000 n 
-0000001434 00000 n 
-0000001456 00000 n 
-0000000007 00000 f 
-0000000008 00000 f 
-0000000000 00000 f 
-0000000015 00000 n 
-0000000073 00000 n 
-0000000137 00000 n 
-0000000201 00000 n 
-0000000264 00000 n 
-0000000322 00000 n 
-0000000385 00000 n 
-0000001044 00000 n 
-0000000936 00000 n 
-0000000448 00000 n 
-0000011668 00000 n 
-0000011807 00000 n 
-0000001478 00000 n 
-0000001763 00000 n 
-0000011441 00000 n 
-0000011866 00000 n 
-0000011917 00000 n 
-trailer
-<< /Size 26
-/Root 24 0 R
-/Info 25 0 R
- >>
-startxref
-11989
-%%EOF





More information about the latex3-commits mailing list