| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "core/include/fpdfapi/fpdf_pageobj.h" | 12 #include "core/include/fpdfapi/fpdf_pageobj.h" |
| 13 #include "core/include/fpdfapi/fpdf_render.h" | 13 #include "core/include/fpdfapi/fpdf_render.h" |
| 14 #include "third_party/base/nonstd_unique_ptr.h" | 14 #include "third_party/base/nonstd_unique_ptr.h" |
| 15 | 15 |
| 16 class CFX_GlyphBitmap; | 16 class CFX_GlyphBitmap; |
| 17 class CPDF_ImageCache; | 17 class CPDF_ImageCache; |
| 18 class CPDF_QuickStretcher; | 18 class CPDF_QuickStretcher; |
| 19 | 19 |
| 20 #define TYPE3_MAX_BLUES 16 | 20 #define TYPE3_MAX_BLUES 16 |
| 21 | 21 |
| 22 class CPDF_Type3Glyphs { | 22 class CPDF_Type3Glyphs { |
| 23 public: | 23 public: |
| 24 CPDF_Type3Glyphs() { | 24 CPDF_Type3Glyphs() : m_TopBlueCount(0), m_BottomBlueCount(0) {} |
| 25 m_GlyphMap.InitHashTable(253); | |
| 26 m_TopBlueCount = m_BottomBlueCount = 0; | |
| 27 } | |
| 28 ~CPDF_Type3Glyphs(); | 25 ~CPDF_Type3Glyphs(); |
| 29 CFX_MapPtrToPtr m_GlyphMap; | |
| 30 void AdjustBlue(FX_FLOAT top, | 26 void AdjustBlue(FX_FLOAT top, |
| 31 FX_FLOAT bottom, | 27 FX_FLOAT bottom, |
| 32 int& top_line, | 28 int& top_line, |
| 33 int& bottom_line); | 29 int& bottom_line); |
| 34 | 30 |
| 35 int m_TopBlue[TYPE3_MAX_BLUES], m_BottomBlue[TYPE3_MAX_BLUES]; | 31 std::map<FX_DWORD, CFX_GlyphBitmap*> m_GlyphMap; |
| 36 int m_TopBlueCount, m_BottomBlueCount; | 32 int m_TopBlue[TYPE3_MAX_BLUES]; |
| 33 int m_BottomBlue[TYPE3_MAX_BLUES]; |
| 34 int m_TopBlueCount; |
| 35 int m_BottomBlueCount; |
| 37 }; | 36 }; |
| 38 class CPDF_Type3Cache { | 37 class CPDF_Type3Cache { |
| 39 public: | 38 public: |
| 40 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} | 39 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} |
| 41 ~CPDF_Type3Cache(); | 40 ~CPDF_Type3Cache(); |
| 42 | 41 |
| 43 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, | 42 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, |
| 44 const CFX_Matrix* pMatrix, | 43 const CFX_Matrix* pMatrix, |
| 45 FX_FLOAT retinaScaleX = 1.0f, | 44 FX_FLOAT retinaScaleX = 1.0f, |
| 46 FX_FLOAT retinaScaleY = 1.0f); | 45 FX_FLOAT retinaScaleY = 1.0f); |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 const uint8_t* m_RampB; | 640 const uint8_t* m_RampB; |
| 642 }; | 641 }; |
| 643 | 642 |
| 644 struct _CPDF_UniqueKeyGen { | 643 struct _CPDF_UniqueKeyGen { |
| 645 void Generate(int count, ...); | 644 void Generate(int count, ...); |
| 646 FX_CHAR m_Key[128]; | 645 FX_CHAR m_Key[128]; |
| 647 int m_KeyLen; | 646 int m_KeyLen; |
| 648 }; | 647 }; |
| 649 | 648 |
| 650 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 649 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| OLD | NEW |