[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kviewshell/plugins/ps
From: Stefan Kebekus <kebekus () kde ! org>
Date: 2006-08-22 6:56:29
Message-ID: 1156229789.927981.17314.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 575818 by kebekus:
properly respect bounding boxes for EPS file; port from kvs 0.7
M +6 -14 psRenderer.cpp
--- trunk/KDE/kdegraphics/kviewshell/plugins/ps/psRenderer.cpp #575817:575818
@@ -137,31 +137,23 @@
int pageHeight = ps.sizeInPixel(res).height();
int pageWidth = ps.sizeInPixel(res).width();
- if (isThumbnail)
- {
+ if (isThumbnail) {
// Because the rendering quality of ghostscript is quite bad at low resolutions, \
we
// render thumbnails two times as big as needed, and then downscale the final \
image.
argus << QString("-r%1").arg(2 * res); // resolution in \
dpi
argus << QString("-g%1x%2").arg(2 * pageWidth).arg(2 * pageHeight); // page size \
in pixels
- }
- else
- {
+ } else {
argus << QString("-r%1").arg(res); // resolution in dpi
argus << QString("-g%1x%2").arg(pageWidth).arg(pageHeight); // page size in \
pixels }
argus << "-dTextAlphaBits=4 -dGraphicsAlphaBits=2"; // Antialiasing
- argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] \
/PermitFileControl [] >> setuserparams .locksafe";
- if (eps)
- {
+ argus << "-c" << KProcess::quote("<< /PermitFileReading [ ExtraIncludePath ] \
/PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe"); + if (eps) \
{ + argus << "-c" << KProcess::quote("%1 %2 \
translate").arg(-internalDoc->boundingBox().llx()).arg(-internalDoc->boundingBox().lly());
argus << "-f" << filename;
- }
- else
- {
+ } else
argus << "-f" << tempPSfile.name();
- }
- //kDebug() << argus.join(" ") << endl;
-
proc << argus;
kDebug() << "start ghostscript for page " << currentPageNumber << "." << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic