Merge pull request #6820 from Snuffleupagus/showText-shadingPattern
Apply Patterns, if necessary, when rendering text
This commit is contained in:
commit
30b8f41003
@ -1421,6 +1421,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
ctx.transform.apply(ctx, current.textMatrix);
|
ctx.transform.apply(ctx, current.textMatrix);
|
||||||
ctx.translate(current.x, current.y + current.textRise);
|
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) {
|
if (fontDirection > 0) {
|
||||||
ctx.scale(textHScale, -1);
|
ctx.scale(textHScale, -1);
|
||||||
} else {
|
} else {
|
||||||
|
2
test/pdfs/.gitignore
vendored
2
test/pdfs/.gitignore
vendored
@ -25,6 +25,8 @@
|
|||||||
!bug1200096.pdf
|
!bug1200096.pdf
|
||||||
!issue5564_reduced.pdf
|
!issue5564_reduced.pdf
|
||||||
!canvas.pdf
|
!canvas.pdf
|
||||||
|
!issue5804.pdf
|
||||||
|
!ShowText-ShadingPattern.pdf
|
||||||
!complex_ttf_font.pdf
|
!complex_ttf_font.pdf
|
||||||
!issue3694_reduced.pdf
|
!issue3694_reduced.pdf
|
||||||
!extgstate.pdf
|
!extgstate.pdf
|
||||||
|
BIN
test/pdfs/ShowText-ShadingPattern.pdf
Normal file
BIN
test/pdfs/ShowText-ShadingPattern.pdf
Normal file
Binary file not shown.
BIN
test/pdfs/issue5804.pdf
Normal file
BIN
test/pdfs/issue5804.pdf
Normal file
Binary file not shown.
@ -1013,6 +1013,21 @@
|
|||||||
"link": false,
|
"link": false,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue5804",
|
||||||
|
"file": "pdfs/issue5804.pdf",
|
||||||
|
"md5": "442f27939edb6aaf173ceff38d69bb14",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
|
{ "id": "ShowText-ShadingPattern",
|
||||||
|
"file": "pdfs/ShowText-ShadingPattern.pdf",
|
||||||
|
"md5": "fe683725db037ffe19d390969610a652",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq",
|
||||||
|
"about": "Please note that this file currently renders incorrectly."
|
||||||
|
},
|
||||||
{ "id": "issue5644",
|
{ "id": "issue5644",
|
||||||
"file": "pdfs/issue5644.pdf",
|
"file": "pdfs/issue5644.pdf",
|
||||||
"md5": "6f9313c5043b3ecb0ab2df321d3e1847",
|
"md5": "6f9313c5043b3ecb0ab2df321d3e1847",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user