On Tuesday, April 17, 2012 08:07:08 PM Leonard Rosenthol wrote: > Each Appearance Stream is a separate Xobject and so should be rendered > with as if between a q & Q pairing, so that one Xobject doesn't impact > another. Thank you, Leonard.
Patch 0001 saves/restores context while drawing the annotation border, so that the graphic state is not changed. > On 4/17/12 6:29 PM, "Fabio D'Urso" wrote: > > * = Actually, that border should not be drawn. I've got a fix, but > > it hides this bug, therefore it'll have to wait until this issue is solved Patch 0002 removes the extra border. Fabio
From 8a8579fdeee80a7bd6beb3f700ebfcf65da6529e Mon Sep 17 00:00:00 2001 From: Fabio D'Urso <[email protected]> Date: Fri, 30 Mar 2012 21:52:04 +0200 Subject: [PATCH 1/2] Save/restore gfx state when drawing annot border --- poppler/Gfx.cc | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index 958194b..9109df4 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -5178,6 +5178,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor, // draw the border if (border && border->getWidth() > 0) { + saveState(); if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) { state->setStrokePattern(NULL); state->setStrokeColorSpace(new GfxDeviceRGBColorSpace()); @@ -5216,6 +5217,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor, state->closePath(); } out->stroke(state); + restoreState(); } } -- 1.7.6.5
From efc432cc4bf4e87d72106275f5f42bc2cc5c7a78 Mon Sep 17 00:00:00 2001 From: Fabio D'Urso <[email protected]> Date: Tue, 17 Apr 2012 20:25:57 +0200 Subject: [PATCH 2/2] Do not draw border in AnnotText::draw --- poppler/Annot.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 5d03e33..130b9bb 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -2303,7 +2303,7 @@ void AnnotText::draw(Gfx *gfx, GBool printing) { // draw the appearance stream appearance.fetch(xref, &obj); - gfx->drawAnnot(&obj, border, color, + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, rect->x1, rect->y1, rectx2, recty2); obj.free(); } -- 1.7.6.5
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
