qt5/src/poppler-page.cc | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 7e844eae94bc4eda1c6dcc3460840b25f4ca7898
Author: Oliver Sander <[email protected]>
Date: Wed Aug 9 11:09:50 2017 +0200
qt5: Arthur: initialize the image with the paper color
Bug #102129
diff --git a/qt5/src/poppler-page.cc b/qt5/src/poppler-page.cc
index 0bba6180..0d2dd5a8 100644
--- a/qt5/src/poppler-page.cc
+++ b/qt5/src/poppler-page.cc
@@ -17,6 +17,7 @@
* Copyright (C) 2015 William Bader <[email protected]>
* Copyright (C) 2016 Arseniy Lartsev <[email protected]>
* Copyright (C) 2016, Hanno Meyer-Thurow <[email protected]>
+ * Copyright (C) 2017, Oliver Sander <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -410,6 +411,13 @@ QImage Page::renderToImage(double xres, double yres, int
x, int y, int w, int h,
QSize size = pageSize();
QImage tmpimg(w == -1 ? qRound( size.width() * xres / 72.0 ) : w, h ==
-1 ? qRound( size.height() * yres / 72.0 ) : h, QImage::Format_ARGB32);
+ QColor bgColor(m_page->parentDoc->paperColor.red(),
+ m_page->parentDoc->paperColor.green(),
+ m_page->parentDoc->paperColor.blue(),
+ m_page->parentDoc->paperColor.alpha());
+
+ tmpimg.fill(bgColor);
+
QPainter painter(&tmpimg);
renderToPainter(&painter, xres, yres, x, y, w, h, rotate,
DontSaveAndRestore);
painter.end();
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler