From 0ccacc1d8980852df67a341fb43293cedabe71e8 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 6 Nov 2024 16:00:57 -0500 Subject: [PATCH] Tests: Add some dashed paths to paths.pdf --- Tests/LibPDF/paths.pdf | 77 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/Tests/LibPDF/paths.pdf b/Tests/LibPDF/paths.pdf index 8327ce6c67b..94d0d992a09 100644 --- a/Tests/LibPDF/paths.pdf +++ b/Tests/LibPDF/paths.pdf @@ -14,7 +14,7 @@ endobj endobj 4 0 obj -<> +<> stream /DeviceRGB CS @@ -210,10 +210,10 @@ q 0 J 2 j 1 0 0 SC -200 90 m -230 50 l -260 90 l -200 90 l +240 90 m +270 50 l +300 90 l +240 90 l S Q @@ -307,6 +307,71 @@ q S Q +% PDF 1.7 spec, TABLE 4.6 Examples of line dash patterns + +q +0 J +1 0 0 SC +3 0 0 3 100 60 cm +1 w + +[] 0 d +0 0 m 13 0 l S + +1 0 0 1 0 -3 cm +[3] 0 d +0 0 m 13 0 l S + +1 0 0 1 0 -3 cm +[2] 1 d +0 0 m 13 0 l S + +1 0 0 1 0 -3 cm +[2 1] 0 d +0 0 m 13 0 l S + +1 0 0 1 0 -3 cm +[3 5] 6 d +0 0 m 13 0 l S + +1 0 0 1 0 -3 cm +[2 3] 11 d +0 0 m 13 0 l S +Q + +% Dashed rect with 0 dash length + +[ 0 10 ] 0 d +1 J +0 1 0 SC +155 45 30 30 re +S + +% Dashed rects with different cap styles. The last one also has a no-op negative +% scale factor. + +1 w +[ 2 2 ] 1 d +0 J +0 1 0 SC +195 45 30 30 re +S + +1 w +[ 2 2 ] 1 d +1 J +0 1 0 SC +155 5 30 30 re +S + +-1 0 0 -1 0 0 cm +1 w +[ 2 2 ] 1 d +2 J +0 1 0 SC +-195 -5 -30 -30 re +S + endstream endobj @@ -321,5 +386,5 @@ xref trailer <> startxref -2568 +3236 %%EOF