[poppler] poppler/CairoOutputDev.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Fri Aug 19 07:22:55 PDT 2011


 poppler/CairoOutputDev.cc |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit c043f298e68bdfffcb7505ec354ec7487b5bd7b2
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Jul 8 21:13:36 2011 +0930

    cairo: assume printer pixel size is 1/600" when stroking 0 width lines
    
    Fixes bug #39067.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 6d692d9..d560bea 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -408,6 +408,11 @@ void CairoOutputDev::updateLineWidth(GfxState *state) {
     /* find out how big pixels (device unit) are in the x and y directions
      * choose the smaller of the two as our line width */
     double x = 1.0, y = 1.0;
+    if (printing) {
+      // assume printer pixel size is 1/600 inch
+      x = 72.0/600;
+      y = 72.0/600;
+    }
     cairo_device_to_user_distance(cairo, &x, &y);
     cairo_set_line_width (cairo, MIN(fabs(x),fabs(y)));
   } else {


More information about the poppler mailing list