summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_pathobject.h12
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp4
2 files changed, 9 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_pathobject.h b/core/fpdfapi/page/cpdf_pathobject.h
index e6e0d19de8..c2166b3277 100644
--- a/core/fpdfapi/page/cpdf_pathobject.h
+++ b/core/fpdfapi/page/cpdf_pathobject.h
@@ -27,20 +27,22 @@ class CPDF_PathObject final : public CPDF_PageObject {
void CalcBoundingBox();
+ bool stroke() const { return m_bStroke; }
+ void set_stroke(bool stroke) { m_bStroke = stroke; }
+
int filltype() const { return m_FillType; }
void set_filltype(int filltype) { m_FillType = filltype; }
- bool stroke() const { return m_bStroke; }
- void set_stroke(bool stroke) { m_bStroke = stroke; }
+ CPDF_Path& path() { return m_Path; }
+ const CPDF_Path& path() const { return m_Path; }
const CFX_Matrix& matrix() const { return m_Matrix; }
void set_matrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
- CPDF_Path m_Path;
-
private:
- int m_FillType = 0;
bool m_bStroke = false;
+ int m_FillType = 0;
+ CPDF_Path m_Path;
CFX_Matrix m_Matrix;
};
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 245a2852bc..5a9d6b6ea2 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1475,9 +1475,9 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, bool bStroke) {
if (bStroke || FillType) {
auto pPathObj =
pdfium::MakeUnique<CPDF_PathObject>(GetCurrentStreamIndex());
- pPathObj->m_Path = Path;
- pPathObj->set_filltype(FillType);
pPathObj->set_stroke(bStroke);
+ pPathObj->set_filltype(FillType);
+ pPathObj->path() = Path;
pPathObj->set_matrix(matrix);
SetGraphicStates(pPathObj.get(), true, false, true);
pPathObj->CalcBoundingBox();