Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 29f7cb5d19
  1. 12
      src/pdf/XPDFRenderer.cpp
  2. 2
      src/pdf/XPDFRenderer.h

@ -148,10 +148,10 @@ void XPDFRenderer::render(QPainter *p, int pageNumber, const QRectF &bounds)
p->drawImage(QPointF(savedTransform.dx() + mSliceX, savedTransform.dy() + mSliceY), *pdfImage);
p->setWorldTransform(savedTransform);
delete pdfImage;
}
}
}
QImage* XPDFRenderer::createPDFImage(int pageNumber, const qreal xscale, const qreal yscale, const QRectF &bounds)
QImage* XPDFRenderer::createPDFImage(int pageNumber, qreal xscale, qreal yscale, const QRectF &bounds)
{
if (isValid())
{
@ -169,18 +169,18 @@ QImage* XPDFRenderer::createPDFImage(int pageNumber, const qreal xscale, const q
if (bounds.isNull())
{
mDocument->displayPage(mSplash, pageNumber, this->dpiForRendering, this->dpiForRendering,
mDocument->displayPage(mSplash, pageNumber, this->dpiForRendering * xscale, this->dpiForRendering *yscale,
rotation, useMediaBox, crop, printing);
}
else
{
mSliceX = bounds.x() * xscale;
mSliceX = bounds.x() * xscale;
mSliceY = bounds.y() * yscale;
qreal sliceW = bounds.width() * xscale;
qreal sliceH = bounds.height() * yscale;
mDocument->displayPageSlice(mSplash, pageNumber, this->dpiForRendering, this->dpiForRendering,
rotation, useMediaBox, crop, printing, mSliceX, mSliceY, sliceW, sliceH);
mDocument->displayPageSlice(mSplash, pageNumber, this->dpiForRendering * xscale, this->dpiForRendering * yscale,
rotation, useMediaBox, crop, printing, mSliceX, mSliceY, sliceW, sliceH);
}
mpSplashBitmap = mSplash->getBitmap();

@ -48,7 +48,7 @@ class XPDFRenderer : public PDFRenderer
private:
void init();
QImage* createPDFImage(int pageNumber, const qreal xscale = 0.5, const qreal yscale = 0.5, const QRectF &bounds = QRectF());
QImage* createPDFImage(int pageNumber, qreal xscale = 0.5, qreal yscale = 0.5, const QRectF &bounds = QRectF());
PDFDoc *mDocument;
static QAtomicInt sInstancesCount;

Loading…
Cancel
Save