summaryrefslogtreecommitdiff
path: root/poppler/Gfx.cc
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-04-29 20:28:07 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2010-04-29 20:28:07 +0200
commit71063d51a45835b0267a7e3f823ef49689cfd06f (patch)
tree19d3e04d35e4ed14ac86b4922a88319ef1a82078 /poppler/Gfx.cc
parente909219d8e92994bd52976f9676015fa6ca9fc91 (diff)
Make sure we are drawing text before calling endTextObject()
This is actually the right fix for the previous commit.
Diffstat (limited to 'poppler/Gfx.cc')
-rw-r--r--poppler/Gfx.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index de4eb240..221caefe 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1297,7 +1297,7 @@ void Gfx::opSetRenderingIntent(Object args[], int numArgs) {
void Gfx::opSetFillGray(Object args[], int numArgs) {
GfxColor color;
- if (textHaveCSPattern) {
+ if (textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
@@ -1335,7 +1335,7 @@ void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
GfxColor color;
int i;
- if (textHaveCSPattern) {
+ if (textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
@@ -1378,7 +1378,7 @@ void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
GfxColor color;
int i;
- if (textHaveCSPattern) {
+ if (textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
@@ -1430,7 +1430,7 @@ void Gfx::opSetFillColorSpace(Object args[], int numArgs) {
}
obj.free();
if (colorSpace) {
- if (textHaveCSPattern) {
+ if (textHaveCSPattern && drawText) {
GBool needFill = out->deviceHasTextClip(state);
out->endTextObject(state);
if (needFill) {
@@ -3342,12 +3342,12 @@ void Gfx::opEndText(Object args[], int numArgs) {
out->endTextObject(state);
drawText = gFalse;
if (textHaveCSPattern) {
- textHaveCSPattern = gFalse;
if (needFill) {
doPatternFill(gTrue);
}
out->restoreState(state);
}
+ textHaveCSPattern = gFalse;
}
//------------------------------------------------------------------------