Version: HEAD (using KDE KDE 3.5.0) Installed from: Compiled From Sources OS: Linux PROBLEM: The line widths resulting from exporting a plot to a .eps file are much too large. STEPS TO REPRODUCE: Start kst Create a plot with a curve Select File... Export to Graphics File... Select the EPS option and set the width and height to 500 RESULTS: Line widths are much too thick EXPECTED RESULTS: The .eps file should appear approximately as on the screen
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);