diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc index 7d13656..b319ef0 100644 --- a/qt4/src/poppler-document.cc +++ b/qt4/src/poppler-document.cc @@ -458,6 +458,11 @@ namespace Poppler { m_doc->setPaperColor(color); } + void Document::setThinLineMode(const int mode) + { + m_doc->setThinLineMode(mode); + } + void Document::setColorDisplayProfile(void* outputProfileA) { #if defined(USE_CMS) @@ -501,6 +506,11 @@ namespace Poppler { return m_doc->paperColor; } + int Document::thinLineMode() const + { + return m_doc->thinLineMode; + } + void Document::setRenderBackend( Document::RenderBackend backend ) { // no need to delete the outputdev as for the moment we always create a splash one diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc index f9ac443..d22e214 100644 --- a/qt4/src/poppler-page.cc +++ b/qt4/src/poppler-page.cc @@ -293,6 +293,19 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, } GBool AA = m_page->parentDoc->m_hints & Document::TextAntialiasing ? gTrue : gFalse; + SplashThinLineMode thinLineMode; + switch (m_page->parentDoc->thinLineMode) { + case 1: + thinLineMode = splashThinLineSolid; + break; + case 2: + thinLineMode = splashThinLineShape; + break; + case 0: + default: + thinLineMode = splashThinLineDefault; + break; + } SplashOutputDev * splash_output = new SplashOutputDev( #if defined(SPLASH_CMYK) @@ -300,7 +313,7 @@ QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, #else splashModeXBGR8, #endif - 4, gFalse, bgColor, gTrue, AA); + 4, gFalse, bgColor, gTrue, AA, thinLineMode); splash_output->setVectorAntialias(m_page->parentDoc->m_hints & Document::Antialiasing ? gTrue : gFalse); splash_output->setFreeTypeHinting(m_page->parentDoc->m_hints & Document::TextHinting ? gTrue : gFalse, diff --git a/qt4/src/poppler-private.cc b/qt4/src/poppler-private.cc index 308a966..9b98670 100644 --- a/qt4/src/poppler-private.cc +++ b/qt4/src/poppler-private.cc @@ -244,6 +244,7 @@ namespace Debug { m_backend = Document::SplashBackend; paperColor = Qt::white; m_hints = 0; + thinLineMode = 0; m_optContentModel = 0; if ( count == 0 ) diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h index 5759a4e..e3b87f3 100644 --- a/qt4/src/poppler-private.h +++ b/qt4/src/poppler-private.h @@ -120,6 +120,11 @@ namespace Poppler { paperColor = color; } + void setThinLineMode(int mode) + { + thinLineMode = mode; + } + void fillMembers() { m_fontInfoIterator = new FontIterator(0, this); @@ -145,6 +150,7 @@ namespace Poppler { QPointer m_optContentModel; QColor paperColor; int m_hints; + int thinLineMode; static int count; }; diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h index f4f6fc6..2308bd4 100644 --- a/qt4/src/poppler-qt4.h +++ b/qt4/src/poppler-qt4.h @@ -1382,6 +1382,21 @@ QString subject = m_doc->info("Subject"); FormType formType() const; /** + Sets the thin line mode + + \param 0: splashThinLineDefault / 1: splashThinLineSolid / 2: splashThinLineShape + + \since 0.24 + */ + void setThinLineMode(int mode); + /** + The thin line mode + + The default no enhancement. + */ + int thinLineMode() const; + + /** Destructor. */ ~Document();