diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-24 18:44:55 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-24 18:44:55 +0000 |
commit | 877e1e212794c6a43f6661198ac1b369fab975be (patch) | |
tree | 0aea008c19f8633dc19e91138667d49576f7523e /core/fpdfapi/edit | |
parent | 1313ca08f7156898acf09e893e3f0e20d2d85424 (diff) | |
download | pdfium-877e1e212794c6a43f6661198ac1b369fab975be.tar.xz |
Make CPDF_PathObject::m_FillType private.
Change-Id: I69436316dd4a12ebdc3f09e7db3bf25c7495a4ce
Reviewed-on: https://pdfium-review.googlesource.com/c/44512
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index a6a9412de4..cfc8c5159a 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -394,11 +394,11 @@ void CPDF_PageContentGenerator::ProcessPath(std::ostringstream* buf, *buf << " h"; } } - if (pPathObj->m_FillType == 0) + if (pPathObj->filltype() == 0) *buf << (pPathObj->stroke() ? " S" : " n"); - else if (pPathObj->m_FillType == FXFILL_WINDING) + else if (pPathObj->filltype() == FXFILL_WINDING) *buf << (pPathObj->stroke() ? " B" : " f"); - else if (pPathObj->m_FillType == FXFILL_ALTERNATE) + else if (pPathObj->filltype() == FXFILL_ALTERNATE) *buf << (pPathObj->stroke() ? " B*" : " f*"); *buf << " Q\n"; } diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp index 75fd0f62ff..f4555287d7 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp @@ -52,7 +52,7 @@ class CPDF_PageContentGeneratorTest : public testing::Test { TEST_F(CPDF_PageContentGeneratorTest, ProcessRect) { auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(); pPathObj->m_Path.AppendRect(10, 5, 13, 30); - pPathObj->m_FillType = FXFILL_ALTERNATE; + pPathObj->set_filltype(FXFILL_ALTERNATE); pPathObj->set_stroke(true); auto pTestPage = pdfium::MakeRetain<CPDF_Page>(nullptr, nullptr, false); @@ -67,7 +67,6 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessRect) { pPathObj->m_Path.AppendPoint(CFX_PointF(5.2f, 3.78f), FXPT_TYPE::LineTo, false); pPathObj->m_Path.AppendPoint(CFX_PointF(0, 3.78f), FXPT_TYPE::LineTo, true); - pPathObj->m_FillType = 0; buf.str(""); TestProcessPath(&generator, &buf, pPathObj.get()); @@ -95,7 +94,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessPath) { false); pPathObj->m_Path.AppendPoint(CFX_PointF(12, 13.64f), FXPT_TYPE::BezierTo, true); - pPathObj->m_FillType = FXFILL_WINDING; + pPathObj->set_filltype(FXFILL_WINDING); auto pTestPage = pdfium::MakeRetain<CPDF_Page>(nullptr, nullptr, false); CPDF_PageContentGenerator generator(pTestPage.Get()); @@ -113,7 +112,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessGraphics) { pPathObj->m_Path.AppendPoint(CFX_PointF(1, 2), FXPT_TYPE::MoveTo, false); pPathObj->m_Path.AppendPoint(CFX_PointF(3, 4), FXPT_TYPE::LineTo, false); pPathObj->m_Path.AppendPoint(CFX_PointF(5, 6), FXPT_TYPE::LineTo, true); - pPathObj->m_FillType = FXFILL_WINDING; + pPathObj->set_filltype(FXFILL_WINDING); pPathObj->set_stroke(true); static const std::vector<float> rgb = {0.5f, 0.7f, 0.35f}; |