Take into account the path and the line width when consuming a stroked path
This commit is contained in:
parent
7c5695f5c6
commit
2369e2d84f
@ -1664,7 +1664,13 @@ class CanvasGraphics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (consumePath) {
|
if (consumePath) {
|
||||||
this.consumePath(path, this.current.getClippedPathBoundingBox());
|
this.consumePath(
|
||||||
|
path,
|
||||||
|
this.current.getClippedPathBoundingBox(
|
||||||
|
PathType.STROKE,
|
||||||
|
getCurrentTransform(this.ctx)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// Restore the global alpha to the fill alpha
|
// Restore the global alpha to the fill alpha
|
||||||
ctx.globalAlpha = this.current.fillAlpha;
|
ctx.globalAlpha = this.current.fillAlpha;
|
||||||
|
|||||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -715,3 +715,4 @@
|
|||||||
!red_stamp.pdf
|
!red_stamp.pdf
|
||||||
!issue19633.pdf
|
!issue19633.pdf
|
||||||
!issue19424.pdf
|
!issue19424.pdf
|
||||||
|
!issue18529.pdf
|
||||||
|
|||||||
217
test/pdfs/issue18529.pdf
Normal file
217
test/pdfs/issue18529.pdf
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
%PDF-1.7
|
||||||
|
%µ¶
|
||||||
|
|
||||||
|
3 0 obj
|
||||||
|
<<
|
||||||
|
/Type /Page
|
||||||
|
/Parent 14 0 R
|
||||||
|
/MediaBox [ 0 0 65 50 ]
|
||||||
|
/Contents 15 0 R
|
||||||
|
/Resources 4 0 R
|
||||||
|
/Group <<
|
||||||
|
/Type /Group
|
||||||
|
/S /Transparency
|
||||||
|
/I false
|
||||||
|
/K false
|
||||||
|
/CS [ /DeviceRGB ]
|
||||||
|
>>
|
||||||
|
/Annots [ ]
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
4 0 obj
|
||||||
|
<<
|
||||||
|
/ExtGState 18 0 R
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
9 0 obj
|
||||||
|
<<
|
||||||
|
/Type /ExtGState
|
||||||
|
/ca 1
|
||||||
|
/CA 1
|
||||||
|
/SMask <<
|
||||||
|
/Type /Mask
|
||||||
|
/S /Luminosity
|
||||||
|
/G 13 0 R
|
||||||
|
>>
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
10 0 obj
|
||||||
|
<<
|
||||||
|
/ShadingType 2
|
||||||
|
/ColorSpace [ /DeviceGray ]
|
||||||
|
/AntiAlias true
|
||||||
|
/Function 12 0 R
|
||||||
|
/Coords [ 0 0 1 0 ]
|
||||||
|
/Extend [ true true ]
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
12 0 obj
|
||||||
|
<<
|
||||||
|
/FunctionType 2
|
||||||
|
/Range [ 0 1 ]
|
||||||
|
/C0 [ 1 ]
|
||||||
|
/C1 [ 0 ]
|
||||||
|
/Domain [ 0 1 ]
|
||||||
|
/N 1
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
13 0 obj
|
||||||
|
<<
|
||||||
|
/Length 6
|
||||||
|
/Type /XObject
|
||||||
|
/Subtype /Form
|
||||||
|
/Matrix [ 45 0 0 30 10 10 ]
|
||||||
|
/BBox [ -.05555556 -.08333333 1.0555556 1.0833334 ]
|
||||||
|
/Group <<
|
||||||
|
/Type /Group
|
||||||
|
/S /Transparency
|
||||||
|
/CS [ /DeviceGray ]
|
||||||
|
>>
|
||||||
|
/Resources <<
|
||||||
|
/Shading <<
|
||||||
|
/Sh 10 0 R
|
||||||
|
>>
|
||||||
|
>>
|
||||||
|
>>
|
||||||
|
stream
|
||||||
|
/Sh sh
|
||||||
|
endstream
|
||||||
|
endobj
|
||||||
|
|
||||||
|
14 0 obj
|
||||||
|
<<
|
||||||
|
/Type /Pages
|
||||||
|
/Count 1
|
||||||
|
/Kids [ 3 0 R ]
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
15 0 obj
|
||||||
|
<<
|
||||||
|
/Length 64
|
||||||
|
>>
|
||||||
|
stream
|
||||||
|
1 0 0 -1 0 50 cm
|
||||||
|
5 w
|
||||||
|
1 0 0 RG
|
||||||
|
1 1 1 rg
|
||||||
|
/Gs0 gs
|
||||||
|
10 10 45 30 re
|
||||||
|
S
|
||||||
|
|
||||||
|
endstream
|
||||||
|
endobj
|
||||||
|
|
||||||
|
18 0 obj
|
||||||
|
<<
|
||||||
|
/Gs0 9 0 R
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
20 0 obj
|
||||||
|
<<
|
||||||
|
/Creator (Typst 0.11.0 [edited by hand])
|
||||||
|
/CreationDate (D:20240731185044Z)
|
||||||
|
/ModDate (D:20240731185044Z)
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
21 0 obj
|
||||||
|
<<
|
||||||
|
/Length 1965
|
||||||
|
/Type /Metadata
|
||||||
|
/Subtype /XML
|
||||||
|
/Filter /ASCIIHexDecode
|
||||||
|
>>
|
||||||
|
stream
|
||||||
|
3c3f787061636b657420626567696e3d22efbbbf222069643d2257354d304d70
|
||||||
|
43656869487a7265537a4e54637a6b633964223f3e3c783a786d706d65746120
|
||||||
|
786d6c6e733a783d2261646f62653a6e733a6d6574612f2220783a786d70746b
|
||||||
|
3d22786d702d777269746572223e3c7264663a52444620786d6c6e733a726466
|
||||||
|
3d22687474703a2f2f7777772e77332e6f72672f313939392f30322f32322d72
|
||||||
|
64662d73796e7461782d6e7323223e3c7264663a4465736372697074696f6e20
|
||||||
|
7264663a61626f75743d222220786d6c6e733a64633d22687474703a2f2f7075
|
||||||
|
726c2e6f72672f64632f656c656d656e74732f312e312f222020786d6c6e733a
|
||||||
|
786d703d22687474703a2f2f6e732e61646f62652e636f6d2f7861702f312e30
|
||||||
|
2f222020786d6c6e733a786d704d4d3d22687474703a2f2f6e732e61646f6265
|
||||||
|
2e636f6d2f7861702f312e302f6d6d2f222020786d6c6e733a786d705450673d
|
||||||
|
22687474703a2f2f6e732e61646f62652e636f6d2f7861702f312e302f742f70
|
||||||
|
672f222020786d6c6e733a7064663d22687474703a2f2f6e732e61646f62652e
|
||||||
|
636f6d2f7064662f312e332f22203e3c786d703a43726561746f72546f6f6c3e
|
||||||
|
547970737420302e31312e303c2f786d703a43726561746f72546f6f6c3e3c78
|
||||||
|
6d703a437265617465446174653e323032342d30372d33315431383a35303a34
|
||||||
|
345a3c2f786d703a437265617465446174653e3c786d703a4d6f646966794461
|
||||||
|
74653e323032342d30372d33315431383a35303a34345a3c2f786d703a4d6f64
|
||||||
|
696679446174653e3c786d705450673a4e50616765733e313c2f786d70545067
|
||||||
|
3a4e50616765733e3c64633a666f726d61743e6170706c69636174696f6e2f70
|
||||||
|
64663c2f64633a666f726d61743e3c64633a6c616e67756167653e3c7264663a
|
||||||
|
4261673e3c2f7264663a4261673e3c2f64633a6c616e67756167653e3c786d70
|
||||||
|
4d4d3a446f63756d656e7449443e53447249476d3762634f6238702b32495648
|
||||||
|
2f5a50773d3d3c2f786d704d4d3a446f63756d656e7449443e3c786d704d4d3a
|
||||||
|
496e7374616e636549443e53447249476d3762634f6238702b324956482f5a50
|
||||||
|
773d3d3c2f786d704d4d3a496e7374616e636549443e3c786d704d4d3a52656e
|
||||||
|
646974696f6e436c6173733e70726f6f663c2f786d704d4d3a52656e64697469
|
||||||
|
6f6e436c6173733e3c7064663a50444656657273696f6e3e312e373c2f706466
|
||||||
|
3a50444656657273696f6e3e3c2f7264663a4465736372697074696f6e3e3c2f
|
||||||
|
7264663a5244463e3c2f783a786d706d6574613e3c3f787061636b657420656e
|
||||||
|
643d2272223f3e>
|
||||||
|
endstream
|
||||||
|
endobj
|
||||||
|
|
||||||
|
22 0 obj
|
||||||
|
<<
|
||||||
|
/Type /Catalog
|
||||||
|
/Pages 14 0 R
|
||||||
|
/ViewerPreferences <<
|
||||||
|
/Direction /L2R
|
||||||
|
>>
|
||||||
|
/Metadata 21 0 R
|
||||||
|
/Names <<
|
||||||
|
/Dests <<
|
||||||
|
/Names [ ]
|
||||||
|
>>
|
||||||
|
>>
|
||||||
|
>>
|
||||||
|
endobj
|
||||||
|
|
||||||
|
xref
|
||||||
|
0 23
|
||||||
|
0000000001 00001 f
|
||||||
|
0000000002 00003 f
|
||||||
|
0000000005 00003 f
|
||||||
|
0000000016 00000 n
|
||||||
|
0000000251 00000 n
|
||||||
|
0000000006 00002 f
|
||||||
|
0000000007 00002 f
|
||||||
|
0000000008 00002 f
|
||||||
|
0000000011 00002 f
|
||||||
|
0000000293 00000 n
|
||||||
|
0000000416 00000 n
|
||||||
|
0000000016 00002 f
|
||||||
|
0000000569 00000 n
|
||||||
|
0000000676 00000 n
|
||||||
|
0000000993 00000 n
|
||||||
|
0000001060 00000 n
|
||||||
|
0000000017 00002 f
|
||||||
|
0000000019 00002 f
|
||||||
|
0000001178 00000 n
|
||||||
|
0000000000 00002 f
|
||||||
|
0000001214 00000 n
|
||||||
|
0000001347 00000 n
|
||||||
|
0000003428 00000 n
|
||||||
|
|
||||||
|
trailer
|
||||||
|
<<
|
||||||
|
/Size 23
|
||||||
|
/Info 20 0 R
|
||||||
|
/Root 22 0 R
|
||||||
|
/ID [ (SDrIGm7bcOb8p+2IVH/ZPw==) (SDrIGm7bcOb8p+2IVH/ZPw==) ]
|
||||||
|
>>
|
||||||
|
startxref
|
||||||
|
3607
|
||||||
|
%%EOF
|
||||||
@ -12012,5 +12012,12 @@
|
|||||||
"firstPage": 1,
|
"firstPage": 1,
|
||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "issue18529",
|
||||||
|
"file": "pdfs/issue18529.pdf",
|
||||||
|
"md5": "f95d2cbdd904f5acf922e088cc3cb153",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user