Skip to content

Commit

Permalink
Don't double apply an xobject's matrix and bbox.
Browse files Browse the repository at this point in the history
When an xobject is a group we were double applying the matrix and
bounding box.

This improves mozilla#6961 quite a bit, but it still is missing the indention
in the ruler.
  • Loading branch information
brendandahl committed Nov 5, 2021
1 parent 30bd5f0 commit f76cac8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@ class PartialEvaluator {
operatorList.addOp(OPS.beginGroup, [groupOptions]);
}

operatorList.addOp(OPS.paintFormXObjectBegin, [matrix, bbox]);
// If it's a group, beginGroup will handle setting the matrix and bbox,
// otherwise paintFormXObjectBegin will apply it.
const args = group ? [null, null] : [matrix, bbox];
operatorList.addOp(OPS.paintFormXObjectBegin, args);

return this.getOperatorList({
stream: xobj,
Expand Down

0 comments on commit f76cac8

Please sign in to comment.