Commit 789e799b authored by Enrico Ros's avatar Enrico Ros

generate smooth scaled image of the requested size (looks/caches/works

a lot better this way)

svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428595
parent bd81ccae
......@@ -9,6 +9,7 @@
#include <qpainter.h>
#include <qpixmap.h>
#include <qimage.h>
#include <kprinter.h>
#include "core/page.h"
......@@ -42,8 +43,12 @@ bool KIMGIOGenerator::canGeneratePixmap()
void KIMGIOGenerator::generatePixmap( PixmapRequest * request )
QPixmap *p = new QPixmap(*m_pix);
// perform a smooth scaled generation
QImage smoothImage = m_pix->convertToImage().smoothScale( request->width, request->height );
QPixmap * p = new QPixmap( smoothImage );
request->page->setPixmap(request->id, p);
// signal that the request has been accomplished
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment