sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 11 +++++++++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 1 + 2 files changed, 12 insertions(+)
New commits: commit af801eafd6b973dcd9e333898782ba43478a41d1 Author: Dr. David Alan Gilbert <[email protected]> AuthorDate: Tue Aug 6 01:18:49 2024 +0100 Commit: David Gilbert <[email protected]> CommitDate: Fri Oct 18 15:31:42 2024 +0200 tdf#148526 sdext,pdfimport: Write clipToStrokePath 'clipToStrokePath' is a variant of 'clip' it sets up a clip to a path that's been stroked with whatever width the current pen is. Now that we have all the rest of the code in, we can start using it. This fixes the white blobs on page 3 of tdf#148526 which are clipped radial fills. It has a separate problem with text corruption which this doesn't fix. It also fixes the geometry of the top left square in: https://gitlab.freedesktop.org/poppler/poppler/-/issues/178 (although it still has colour problems with that test case) Change-Id: Ibe2c56927b45d44e90cfa2934fc905034a50e9c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172927 Reviewed-by: David Gilbert <[email protected]> Tested-by: Jenkins diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index e656df393b53..4d915ce73be1 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -962,6 +962,17 @@ void PDFOutDev::eoClip(GfxState *state) printf( " " ); } +void PDFOutDev::clipToStrokePath(GfxState *state) +{ + if (m_bSkipImages) + return; + assert(state); + + printf( "clipToStrokePath" ); + printPath( state->getPath() ); + printf( " " ); +} + /** Output one glyph diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index 6a35d119314b..eb0e3e29f5f5 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -227,6 +227,7 @@ namespace pdfi //----- path clipping virtual void clip(GfxState *state) override; virtual void eoClip(GfxState *state) override; + virtual void clipToStrokePath(GfxState *state) override; //----- text drawing #if POPPLER_CHECK_VERSION(0, 82, 0)
