From e510c836f69956af19c6d93d4bd56a22163f49d6 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Fri, 30 Oct 2009 16:14:10 +0900 Subject: [PATCH] call missing saveState() on Gfx::opBeginText. --- poppler/Gfx.cc | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index eeabd87..332af7b 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -3280,6 +3280,7 @@ void Gfx::opBeginText(Object args[], int numArgs) { fontChanged = gTrue; if (out->supportTextCSPattern(state)) { colorSpaceText = NULL; + out->saveState(state); textHaveCSPattern = gTrue; } } @@ -3288,9 +3289,9 @@ void Gfx::opEndText(Object args[], int numArgs) { GBool needFill = out->deviceHasTextClip(state); out->endTextObject(state); drawText = gFalse; - if (out->supportTextCSPattern(state) && textHaveCSPattern) { - if (needFill) { - doPatternFill(gTrue); + if (out->supportTextCSPattern(state)) { + if (textHaveCSPattern && needFill) { + doPatternFill(gTrue); } out->restoreState(state); if (colorSpaceText != NULL) { -- 1.6.5