File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1422,9 +1422,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
1422
1422
group .bbox ,
1423
1423
currentCtx .mozCurrentTransform );
1424
1424
// Use ceil in case we're between sizes so we don't create canvas that is
1425
- // too small.
1426
- var drawnWidth = Math .ceil (bounds [2 ] - bounds [0 ]);
1427
- var drawnHeight = Math .ceil (bounds [3 ] - bounds [1 ]);
1425
+ // too small and make the canvas at least 1x1 pixels.
1426
+ var drawnWidth = Math .max (Math .ceil (bounds [2 ] - bounds [0 ]), 1 );
1427
+ var drawnHeight = Math .max (Math .ceil (bounds [3 ] - bounds [1 ]), 1 );
1428
+
1428
1429
var scratchCanvas = createScratchCanvas (drawnWidth , drawnHeight );
1429
1430
var groupCtx = scratchCanvas .getContext ('2d' );
1430
1431
addContextCurrentTransform (groupCtx );
You can’t perform that action at this time.
0 commit comments