summaryrefslogtreecommitdiff
path: root/sdext/source
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2024-08-06 01:18:49 +0100
committerDavid Gilbert <freedesktop@treblig.org>2024-10-18 15:31:42 +0200
commitaf801eafd6b973dcd9e333898782ba43478a41d1 (patch)
tree72e1875c53c7bca20f031c7fb3bcd0746ef6af16 /sdext/source
parent2b9e6cfc8fb63eb621c397a6c53e75ee60a0c2fb (diff)
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 <freedesktop@treblig.org> Tested-by: Jenkins
Diffstat (limited to 'sdext/source')
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx11
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx1
2 files changed, 12 insertions, 0 deletions
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( "\n" );
}
+void PDFOutDev::clipToStrokePath(GfxState *state)
+{
+ if (m_bSkipImages)
+ return;
+ assert(state);
+
+ printf( "clipToStrokePath" );
+ printPath( state->getPath() );
+ printf( "\n" );
+}
+
/** 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)