From f3b5d3c9c62f96231000fb85bf2228c51727bd58 Mon Sep 17 00:00:00 2001 From: Oliver Sander Date: Sun, 25 Mar 2018 21:38:27 +0200 Subject: [PATCH 5/7] Do not make ArthurOutputDev::startPage fill the page with white Reasons: - Why white? Why not any other color? - Apparently the method is rarely called: The renderToArthur method in file poppler-page.cc, for example, does not call it. - Most importantly: We want to use ArthurOutputDev to render type3 glyphs. But they should have a transparent background, or rather, no background at all. --- qt5/src/ArthurOutputDev.cc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/qt5/src/ArthurOutputDev.cc b/qt5/src/ArthurOutputDev.cc index d5d47823..dcac59dd 100644 --- a/qt5/src/ArthurOutputDev.cc +++ b/qt5/src/ArthurOutputDev.cc @@ -123,18 +123,7 @@ void ArthurOutputDev::startDoc(XRef *xrefA) { } void ArthurOutputDev::startPage(int pageNum, GfxState *state, XRef *) -{ - // fill page with white background. - int w = static_cast(state->getPageWidth()); - int h = static_cast(state->getPageHeight()); - QColor fillColour(Qt::white); - QBrush fill(fillColour); - m_painter.top()->save(); - m_painter.top()->setPen(fillColour); - m_painter.top()->setBrush(fill); - m_painter.top()->drawRect(0, 0, w, h); - m_painter.top()->restore(); -} +{} void ArthurOutputDev::endPage() { } -- 2.16.2