From: = <=> Date: Wed, 5 Oct 2011 23:32:26 +0000 (-0700) Subject: Fix width and height for pattering bounding box. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=e357b7a9f9757a59c65b6eeb00e75445a38e7e21;p=pdf.js.git Fix width and height for pattering bounding box. --- diff --git a/pdf.js b/pdf.js index 36e572e..1d92d88 100644 --- a/pdf.js +++ b/pdf.js @@ -6356,8 +6356,10 @@ var TilingPattern = (function tilingPattern() { graphics.transform.apply(graphics, tmpScale); graphics.transform.apply(graphics, tmpTranslate); - if (bbox && isArray(bbox) && 4 == bbox.length) { - graphics.rectangle(bbox[0], bbox[1], width, height); + if (bbox && isArray(bbox) && 4 == bbox.length) { + var bboxWidth = bbox[2] - bbox[0]; + var bboxHeight = bbox[3] - bbox[1]; + graphics.rectangle(bbox[0], bbox[1], bboxWidth, bboxHeight); graphics.clip(); graphics.endPath(); }