diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-07-06 14:08:23 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-08-01 08:30:27 +0200 |
commit | 7cbb10598d6b1a0f5e0d612eb6ffc1df28d086e4 (patch) | |
tree | b9caba4afb341cd71f505716d27f8997af68a466 /include | |
parent | 7e02d0e4f22aa362184a5ac634eb916383f3f3d5 (diff) |
pdf: add PDFiumPathSegment to the wrapper & use in ImpSdrPdfImport
A PageObject of type FPDF_PAGEOBJ_PATH can have a path segment,
that is common in vector graphic objects. The path segment is
wrapped into PDFiumPathSegment which can be used to handle the
path and path properties.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98210
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit bc8016b81c2c609711c26af1f85da327cf30a4ff)
Change-Id: I990d51ba90fa356a6eca137eb4b71947858289aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99879
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index f7dcc4b2c99e..43176f584420 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -73,6 +73,24 @@ public: class PDFiumTextPage; +class VCL_DLLPUBLIC PDFiumPathSegment final +{ +private: + FPDF_PATHSEGMENT mpPathSegment; + + PDFiumPathSegment(const PDFiumPathSegment&) = delete; + PDFiumPathSegment& operator=(const PDFiumPathSegment&) = delete; + +public: + PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment); + ~PDFiumPathSegment(); + + FPDF_PATHSEGMENT getPointer() { return mpPathSegment; } + basegfx::B2DPoint getPoint(); + bool isClosed(); + int getType(); +}; + class VCL_DLLPUBLIC PDFiumPageObject final { private: @@ -100,6 +118,9 @@ public: int getTextRenderMode(); Color getFillColor(); Color getStrokeColor(); + // Path + int getPathSegmentCount(); + std::unique_ptr<PDFiumPathSegment> getPathSegment(int index); }; class VCL_DLLPUBLIC PDFiumTextPage final |