Link to PDF file (or attach file here):
https://issues.apache.org/jira/secure/attachment/12650283/000004_ShadingPatternTextPDF.pdf

Configuration:
- Web browser and its version: FF 51.0.1 32bit
- Operating system and its version: W7
- PDF.js version: latest

Steps to reproduce the problem:
display file

What is the expected behavior? (add screenshot)
![ok](https://cloud.githubusercontent.com/assets/6665575/23339534/5ff2de9c-fc25-11e6-837e-0fdaf81b4ca9.png)

What went wrong? (add screenshot)
![nok](https://cloud.githubusercontent.com/assets/6665575/23339536/63f7a37e-fc25-11e6-813c-cc218cc4def3.png)

possibly similar problem:
https://www.pdflib.com/fileadmin/pdflib/Cookbook/pdf/color_gradient.pdf (shaded text completely missing)
https://issues.apache.org/jira/secure/attachment/12630566/pslib-shading.pdf (page 4, part of text missing)
https://issues.apache.org/jira/secure/attachment/12652009/pattern-shading-2-4-idMatrix.pdf (some text missing)
https://issues.apache.org/jira/secure/attachment/12652010/pattern-shading-2-4-noMatrix.pdf (some text missing)

[x, y] = Util.applyTransform([x, y], transform);
    this.minX = Math.min(this.minX, x);
    this.minY = Math.min(this.minY, y);
    this.maxX = Math.max(this.maxX, x);
    this.maxY = Math.max(this.maxY, y);
  }
  updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3) {
    const box = Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3);
    this.updatePathMinMax(transform, box[0], box[1]);
    this.updatePathMinMax(transform, box[2], box[3]);
  }
  getPathBoundingBox() {
    return [this.minX, this.minY, this.maxX, this.maxY];
  }
  updateClipFromPath() {
    const intersect = Util.intersect(this.clipBox, this.getPathBoundingBox());
    this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);
  }
  startNewPathAndClipBox(box) {
    this.clipBox = box;
    this.minX = Infinity;
    this.minY = Infinity;
    this.maxX = 0;
    this.maxY = 0;
  }
  getClippedPathBoundingBox() {
    return Util.intersect(this.clipBox, this.getPathBoundingBox());
  }
}
function putBinaryImageData(ctx, imgData, transferMaps = null) {