diff options
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r-- | core/fpdfapi/page/cpdf_pathobject.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_pathobject.h | 9 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.cpp | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_pathobject.cpp b/core/fpdfapi/page/cpdf_pathobject.cpp index 4fb8f10a6b..eafbe77ca2 100644 --- a/core/fpdfapi/page/cpdf_pathobject.cpp +++ b/core/fpdfapi/page/cpdf_pathobject.cpp @@ -7,11 +7,11 @@ #include "core/fpdfapi/page/cpdf_pathobject.h" CPDF_PathObject::CPDF_PathObject(int32_t content_stream) - : CPDF_PageObject(content_stream), m_FillType(0), m_bStroke(false) {} + : CPDF_PageObject(content_stream) {} CPDF_PathObject::CPDF_PathObject() : CPDF_PathObject(kNoContentStream) {} -CPDF_PathObject::~CPDF_PathObject() {} +CPDF_PathObject::~CPDF_PathObject() = default; CPDF_PageObject::Type CPDF_PathObject::GetType() const { return PATH; diff --git a/core/fpdfapi/page/cpdf_pathobject.h b/core/fpdfapi/page/cpdf_pathobject.h index 0a1e4d01f9..dd4cd55a79 100644 --- a/core/fpdfapi/page/cpdf_pathobject.h +++ b/core/fpdfapi/page/cpdf_pathobject.h @@ -27,9 +27,14 @@ class CPDF_PathObject final : public CPDF_PageObject { void CalcBoundingBox(); + const CFX_Matrix& matrix() const { return m_Matrix; } + void set_matrix(const CFX_Matrix& matrix) { m_Matrix = matrix; } + CPDF_Path m_Path; - int m_FillType; - bool m_bStroke; + int m_FillType = 0; + bool m_bStroke = false; + + private: CFX_Matrix m_Matrix; }; diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 6e930f62bb..03e87ce37d 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -1478,7 +1478,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, bool bStroke) { pPathObj->m_bStroke = bStroke; pPathObj->m_FillType = FillType; pPathObj->m_Path = Path; - pPathObj->m_Matrix = matrix; + pPathObj->set_matrix(matrix); SetGraphicStates(pPathObj.get(), true, false, true); pPathObj->CalcBoundingBox(); m_pObjectHolder->AppendPageObject(std::move(pPathObj)); |