mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 15:21:00 +02:00
Merge pull request #21127 from calixteman/issue21126
Correctly compute the bbox when simplifying the path construction
This commit is contained in:
commit
badebcca00
@ -15,6 +15,7 @@
|
||||
|
||||
import {
|
||||
DrawOPS,
|
||||
F32_BBOX_INIT,
|
||||
ImageKind,
|
||||
OPS,
|
||||
RenderingIntentFlag,
|
||||
@ -520,7 +521,9 @@ addState(
|
||||
const [, [buffer], minMax] = args;
|
||||
|
||||
if (minMax) {
|
||||
Util.scaleMinMax(transform, minMax);
|
||||
const newBBox = F32_BBOX_INIT.slice();
|
||||
Util.axialAlignedBoundingBox(minMax, transform, newBBox);
|
||||
minMax.set(newBBox);
|
||||
for (let k = 0, kk = buffer.length; k < kk; ) {
|
||||
switch (buffer[k++]) {
|
||||
case DrawOPS.moveTo:
|
||||
|
||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -904,3 +904,4 @@
|
||||
!three_pages_with_number.pdf
|
||||
!issue13520.pdf
|
||||
!22060_A1_01_Plans.pdf
|
||||
!issue21126.pdf
|
||||
|
||||
BIN
test/pdfs/issue21126.pdf
Normal file
BIN
test/pdfs/issue21126.pdf
Normal file
Binary file not shown.
@ -14136,5 +14136,12 @@
|
||||
"firstPage": 3,
|
||||
"lastPage": 3,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue21126",
|
||||
"file": "pdfs/issue21126.pdf",
|
||||
"md5": "29c23022ab3d983733e1ee37fd0bc785",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user