1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #6820 from Snuffleupagus/showText-shadingPattern

Apply Patterns, if necessary, when rendering text
This commit is contained in:
Tim van der Meij 2016-01-08 14:02:56 +01:00
commit 30b8f41003
5 changed files with 23 additions and 0 deletions

View file

@ -1421,6 +1421,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
ctx.transform.apply(ctx, current.textMatrix);
ctx.translate(current.x, current.y + current.textRise);
if (current.patternFill) {
// TODO: Some shading patterns are not applied correctly to text,
// e.g. issues 3988 and 5432, and ShowText-ShadingPattern.pdf.
ctx.fillStyle = current.fillColor.getPattern(ctx, this);
}
if (fontDirection > 0) {
ctx.scale(textHScale, -1);
} else {