Skip to content

Commit dfd1cab

Browse files
pengkunbinclaude
andcommitted
Fix undefined variables x0, x1, y0, y1 in paintFormXObjectBegin
Use bounds array indices instead of the undefined variables when calling recordClipBox. bounds is [minX, minY, maxX, maxY] from Util.intersect, and recordClipBox expects (minX, maxX, minY, maxY). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b74f9b3 commit dfd1cab

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/display/canvas.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,14 @@ class CanvasGraphics {
25652565
bounds = Util.intersect(bounds, canvasBounds) || canvasBounds;
25662566
const clip = buildClipFromDeviceBounds(bounds, this.baseTransform);
25672567
this.ctx.clip(clip);
2568-
this.dependencyTracker?.recordClipBox(opIdx, this.ctx, x0, x1, y0, y1);
2568+
this.dependencyTracker?.recordClipBox(
2569+
opIdx,
2570+
this.ctx,
2571+
bounds[0],
2572+
bounds[2],
2573+
bounds[1],
2574+
bounds[3]
2575+
);
25692576
this.endPath(opIdx);
25702577
}
25712578
}

0 commit comments

Comments
 (0)