Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ |
| 8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ |
| 9 | 9 |
| 10 #include "core/fpdfapi/fpdf_page/cpdf_clippathdata.h" | 10 #include "core/fpdfapi/fpdf_page/cpdf_clippathdata.h" |
| 11 #include "core/fpdfapi/fpdf_page/include/cpdf_path.h" | 11 #include "core/fpdfapi/fpdf_page/include/cpdf_path.h" |
| 12 #include "core/fxcrt/include/fx_basic.h" | 12 #include "core/fxcrt/include/fx_basic.h" |
| 13 #include "core/fxcrt/include/fx_coordinates.h" | 13 #include "core/fxcrt/include/fx_coordinates.h" |
| 14 #include "core/fxcrt/include/fx_system.h" | 14 #include "core/fxcrt/include/fx_system.h" |
| 15 | 15 |
| 16 class CPDF_TextObject; | 16 class CPDF_TextObject; |
| 17 | 17 |
| 18 class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> { | 18 class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> { |
| 19 public: | 19 public: |
| 20 uint32_t GetPathCount() const { return m_pObject->m_PathCount; } | 20 uint32_t GetPathCount() const { return m_pObject->m_PathList.size(); } |
|
Tom Sepez
2016/05/19 18:32:03
pdfium::CollectionSize<uint32_t>() if we worry abo
Lei Zhang
2016/05/19 20:44:26
Done.
| |
| 21 CPDF_Path GetPath(int i) const { return m_pObject->m_pPathList[i]; } | 21 CPDF_Path GetPath(size_t i) const { return m_pObject->m_PathList[i]; } |
| 22 int GetClipType(int i) const { return m_pObject->m_pTypeList[i]; } | 22 uint8_t GetClipType(size_t i) const { return m_pObject->m_TypeList[i]; } |
| 23 uint32_t GetTextCount() const { return m_pObject->m_TextCount; } | 23 uint32_t GetTextCount() const { return m_pObject->m_TextList.size(); } |
| 24 CPDF_TextObject* GetText(int i) const { return m_pObject->m_pTextList[i]; } | 24 CPDF_TextObject* GetText(size_t i) const { |
| 25 return m_pObject->m_TextList[i].get(); | |
| 26 } | |
| 25 CFX_FloatRect GetClipBox() const; | 27 CFX_FloatRect GetClipBox() const; |
| 26 | 28 |
| 27 void AppendPath(CPDF_Path path, int type, FX_BOOL bAutoMerge); | 29 void AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge); |
| 28 void DeletePath(int layer_index); | 30 void AppendTexts(std::vector<std::unique_ptr<CPDF_TextObject>>* pTexts); |
| 29 | |
| 30 void AppendTexts(CPDF_TextObject** pTexts, int count); | |
| 31 void Transform(const CFX_Matrix& matrix); | 31 void Transform(const CFX_Matrix& matrix); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ | 34 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_CLIPPATH_H_ |
| OLD | NEW |