From kde-commits Fri Aug 31 18:12:14 2012 From: Martin Koller Date: Fri, 31 Aug 2012 18:12:14 +0000 To: kde-commits Subject: [kdelibs/KDE/4.9] kimgio: fix bounding box in writing Message-Id: <20120831181214.D03EBA60DD () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=134643674323546 Git commit 0fb5da54e7fd430d64d881fdf8427075df5a76a4 by Martin Koller. Committed on 31/08/2012 at 20:08. Pushed by mkoller into branch 'KDE/4.9'. fix bounding box in writing A very old bug reappeared. Obviously Qt internals have changed since then. BUG: 85217 FIXED-IN: 4.9.2 REVIEW: 106290 M +1 -2 kimgio/eps.cpp http://commits.kde.org/kdelibs/0fb5da54e7fd430d64d881fdf8427075df5a76a4 diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index dc09619..6dce017 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -258,11 +258,10 @@ bool EPSHandler::write(const QImage &image) psOut.setOutputFileName(tmpFile.fileName()); psOut.setOutputFormat(QPrinter::PostScriptFormat); psOut.setFullPage(true); + psOut.setPaperSize(image.size(), QPrinter::DevicePixel); = // painting the pixmap to the "printer" which is a file p.begin( &psOut ); - // Qt uses the clip rect for the bounding box - p.setClipRect( 0, 0, image.width(), image.height()); p.drawImage( QPoint( 0, 0 ), image ); p.end(); =20