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_RENDER_CPDF_TYPE3CACHE_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_CPDF_TYPE3CACHE_H_ |
8 #define CORE_FPDFAPI_FPDF_RENDER_CPDF_TYPE3CACHE_H_ | 8 #define CORE_FPDFAPI_FPDF_RENDER_CPDF_TYPE3CACHE_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 | 11 |
12 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" | 12 #include "core/fpdfapi/font/cpdf_type3font.h" |
13 #include "core/fxcrt/fx_coordinates.h" | 13 #include "core/fxcrt/fx_coordinates.h" |
14 #include "core/fxcrt/fx_string.h" | 14 #include "core/fxcrt/fx_string.h" |
15 #include "core/fxcrt/fx_system.h" | 15 #include "core/fxcrt/fx_system.h" |
16 | 16 |
17 class CPDF_Type3Glyphs; | 17 class CPDF_Type3Glyphs; |
18 | 18 |
19 class CPDF_Type3Cache { | 19 class CPDF_Type3Cache { |
20 public: | 20 public: |
21 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); | 21 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); |
22 ~CPDF_Type3Cache(); | 22 ~CPDF_Type3Cache(); |
23 | 23 |
24 CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, | 24 CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, |
25 const CFX_Matrix* pMatrix, | 25 const CFX_Matrix* pMatrix, |
26 FX_FLOAT retinaScaleX, | 26 FX_FLOAT retinaScaleX, |
27 FX_FLOAT retinaScaleY); | 27 FX_FLOAT retinaScaleY); |
28 | 28 |
29 private: | 29 private: |
30 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, | 30 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, |
31 uint32_t charcode, | 31 uint32_t charcode, |
32 const CFX_Matrix* pMatrix, | 32 const CFX_Matrix* pMatrix, |
33 FX_FLOAT retinaScaleX, | 33 FX_FLOAT retinaScaleX, |
34 FX_FLOAT retinaScaleY); | 34 FX_FLOAT retinaScaleY); |
35 | 35 |
36 CPDF_Type3Font* const m_pFont; | 36 CPDF_Type3Font* const m_pFont; |
37 std::map<CFX_ByteString, CPDF_Type3Glyphs*> m_SizeMap; | 37 std::map<CFX_ByteString, CPDF_Type3Glyphs*> m_SizeMap; |
38 }; | 38 }; |
39 | 39 |
40 #endif // CORE_FPDFAPI_FPDF_RENDER_CPDF_TYPE3CACHE_H_ | 40 #endif // CORE_FPDFAPI_FPDF_RENDER_CPDF_TYPE3CACHE_H_ |
OLD | NEW |