[poppler] poppler/CairoOutputDev.cc

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Jan 20 15:12:28 PST 2012


 poppler/CairoOutputDev.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a04fca6266bda6d04068f38f16fe492cb6b8677b
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Jan 21 09:41:12 2012 +1030

    cairo: use fabs when comparing the transformed line width
    
    as the transform may cause a negative width.
    
    Bug 43441

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index d49b87f..7ef36df 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -439,7 +439,7 @@ void CairoOutputDev::updateLineWidth(GfxState *state) {
 
       /* find out line width in device units */
       cairo_user_to_device_distance(cairo, &x, &y);
-      if (x <= 1.0 && y <= 1.0) {
+      if (fabs(x) <= 1.0 && fabs(y) <= 1.0) {
 	/* adjust width to at least one device pixel */
 	x = y = 1.0;
 	cairo_device_to_user_distance(cairo, &x, &y);


More information about the poppler mailing list