Ship named PDF color spaces and patterns from native color stacks

This commit is contained in:
gloamxun committed 2026-11-29 02:35:22 +08:00
1 parent 745c33fd44
commit e9893a5c1b
5 files changed
+123 -6

No files matched your search

@@ -0,0 +1,15 @@
\catcode123=1 \catcode125=2 \catcode35=6
\def\space{ }
\pdfoutput=1
\pdfcompresslevel=0 \pdfobjcompresslevel=0
\pdfpagewidth=144bp \pdfpageheight=144bp
\pdfhorigin=12bp \pdfvorigin=12bp
\immediate\pdfobj stream attr
{/Type /Pattern /PatternType 1 /PaintType 1 /TilingType 1 /BBox[0 0 8 8] /XStep 8 /YStep 8 /Resources<<>>}
{0 0 1 rg 0 0 4 8 re f}
\edef\resources{/Pattern<< /Hatch \the\pdflastobj\space 0 R >>}
\pdfpageresources=\expandafter{\resources}
\shipout\vbox{\hbox{\pdfcolorstack0 push{/Pattern cs/Hatch scn}%
\vrule width90bp height36bp depth0bp \pdfcolorstack0 pop}%
\prevdepth=-1000pt\hbox{\vrule width90bp height24bp depth0bp}}
\end