|
|
@ -1506,6 +1506,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
var bounds = Util.getAxialAlignedBoundingBox( |
|
|
|
var bounds = Util.getAxialAlignedBoundingBox( |
|
|
|
group.bbox, |
|
|
|
group.bbox, |
|
|
|
currentCtx.mozCurrentTransform); |
|
|
|
currentCtx.mozCurrentTransform); |
|
|
|
|
|
|
|
// Clip the bounding box to the current canvas.
|
|
|
|
|
|
|
|
bounds = Util.intersect(bounds, [0, |
|
|
|
|
|
|
|
0, |
|
|
|
|
|
|
|
currentCtx.canvas.width, |
|
|
|
|
|
|
|
currentCtx.canvas.height]); |
|
|
|
// Use ceil in case we're between sizes so we don't create canvas that is
|
|
|
|
// Use ceil in case we're between sizes so we don't create canvas that is
|
|
|
|
// too small and make the canvas at least 1x1 pixels.
|
|
|
|
// too small and make the canvas at least 1x1 pixels.
|
|
|
|
var drawnWidth = Math.max(Math.ceil(bounds[2] - bounds[0]), 1); |
|
|
|
var drawnWidth = Math.max(Math.ceil(bounds[2] - bounds[0]), 1); |
|
|
|