| Summary: | Exporting to eps file results in ridiculous line widths | ||
|---|---|---|---|
| Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
| Component: | general | Assignee: | kst |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.x | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Andrew Walker
2006-05-24 22:26:00 UTC
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);
|