[Kst] [Bug 127975] Exporting to eps file results in ridiculous line widths

Andrew Walker arwalker at sumusltd.com
Wed May 24 22:27:02 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=127975         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2006-05-24 22:27 -------
SVN commit 544440 by arwalker:

BUG:127975 Set the printer resolution to give correct scaling.

 M  +9 -2      kstviewwindow.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewwindow.cpp #544439:544440
 @ -239,7 +239,8  @
       QPrinter printer(QPrinter::HighResolution);
       QString dotFormat = QString(".eps");
       int iPos = filename.findRev(dotFormat, -1, false);
-
+      int iResolution;
+      
       if (iPos != -1 && iPos == (int)(filename.length() - dotFormat.length())) {
         filenameNewEps = filename;
       } else {
 @ -247,11 +248,17  @
       }
       filenameNew = filenameNewEps + ".ps";
 
+      iResolution = size.width() / 11;
+      if ( size.height() / 8 > iResolution ) {
+        iResolution = size.height() / 8;
+      }
+      
+      printer.setResolution(iResolution);
       printer.setPageSize(QPrinter::Letter);
       printer.setOrientation(QPrinter::Landscape);
       printer.setOutputToFile(true);
       printer.setOutputFileName(filenameNew);
-
+      
       KstPainter paint(KstPainter::P_PRINT);
       paint.begin(&printer);
       QPaintDeviceMetrics metrics(&printer);


More information about the Kst mailing list