[poppler] qt5/src

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Aug 9 21:29:23 UTC 2017


 qt5/src/poppler-page.cc |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 7e844eae94bc4eda1c6dcc3460840b25f4ca7898
Author: Oliver Sander <oliver.sander at tu-dresden.de>
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 <williambader at hotmail.com>
  * Copyright (C) 2016 Arseniy Lartsev <arseniy at alumni.chalmers.se>
  * Copyright (C) 2016, Hanno Meyer-Thurow <h.mth at web.de>
+ * Copyright (C) 2017, Oliver Sander <oliver.sander at tu-dresden.de>
  *
  * 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();


More information about the poppler mailing list