mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Don't use QImage to compose double pages. Drawing the page on a QPixmap is way faster and requires less conversions!
This commit is contained in:
parent
9c022fb2f1
commit
d11414d181
@ -516,13 +516,10 @@ QPixmap * Render::getCurrentDoublePage()
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
QImage auximage(totalWidth, totalHeight, QImage::Format_RGB32);
|
||||
QPainter painter(&auximage);
|
||||
QPixmap * page = new QPixmap(totalWidth, totalHeight);
|
||||
QPainter painter(page);
|
||||
painter.drawImage(leftpage, *buffer[currentPageBufferedIndex]);
|
||||
painter.drawImage(rightpage, *buffer[currentPageBufferedIndex+1]);
|
||||
|
||||
QPixmap * page = new QPixmap();
|
||||
*page = page->fromImage(auximage);
|
||||
return page;
|
||||
}
|
||||
else
|
||||
@ -563,13 +560,10 @@ QPixmap * Render::getCurrentDoubleMangaPage()
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
QImage auximage(totalWidth, totalHeight, QImage::Format_RGB32);
|
||||
QPainter painter(&auximage);
|
||||
QPixmap * page = new QPixmap(totalWidth, totalHeight);
|
||||
QPainter painter(page);
|
||||
painter.drawImage(rightpage, *buffer[currentPageBufferedIndex]);
|
||||
painter.drawImage(leftpage, *buffer[currentPageBufferedIndex+1]);
|
||||
|
||||
QPixmap * page = new QPixmap();
|
||||
*page = page->fromImage(auximage);
|
||||
return page;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user