[poppler] poppler/Gfx.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Thu Apr 29 11:29:23 PDT 2010


 poppler/Gfx.cc |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 71063d51a45835b0267a7e3f823ef49689cfd06f
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Thu Apr 29 20:28:07 2010 +0200

    Make sure we are drawing text before calling endTextObject()
    
    This is actually the right fix for the previous commit.

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index de4eb24..221caef 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;
 }
 
 //------------------------------------------------------------------------


More information about the poppler mailing list