| 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_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 class CPDF_PageObjectHolder; | 39 class CPDF_PageObjectHolder; |
| 40 class CPDF_PageRenderCache; | 40 class CPDF_PageRenderCache; |
| 41 class CPDF_PathObject; | 41 class CPDF_PathObject; |
| 42 class CPDF_RenderStatus; | 42 class CPDF_RenderStatus; |
| 43 class CPDF_ShadingObject; | 43 class CPDF_ShadingObject; |
| 44 class CPDF_ShadingPattern; | 44 class CPDF_ShadingPattern; |
| 45 class CPDF_Stream; | 45 class CPDF_Stream; |
| 46 class CPDF_TilingPattern; | 46 class CPDF_TilingPattern; |
| 47 class CPDF_TransferFunc; | 47 class CPDF_TransferFunc; |
| 48 class CPDF_Type3Cache; | 48 class CPDF_Type3Cache; |
| 49 class CPDF_Type3Glyphs; |
| 49 class CPDF_Type3Char; | 50 class CPDF_Type3Char; |
| 50 class CPDF_Type3Font; | 51 class CPDF_Type3Font; |
| 51 | 52 |
| 52 #define TYPE3_MAX_BLUES 16 | |
| 53 | |
| 54 FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix); | 53 FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix); |
| 55 | 54 |
| 56 class CPDF_Type3Glyphs { | |
| 57 public: | |
| 58 CPDF_Type3Glyphs(); | |
| 59 ~CPDF_Type3Glyphs(); | |
| 60 | |
| 61 void AdjustBlue(FX_FLOAT top, | |
| 62 FX_FLOAT bottom, | |
| 63 int& top_line, | |
| 64 int& bottom_line); | |
| 65 | |
| 66 std::map<uint32_t, CFX_GlyphBitmap*> m_GlyphMap; | |
| 67 int m_TopBlue[TYPE3_MAX_BLUES]; | |
| 68 int m_BottomBlue[TYPE3_MAX_BLUES]; | |
| 69 int m_TopBlueCount; | |
| 70 int m_BottomBlueCount; | |
| 71 }; | |
| 72 | |
| 73 class CPDF_Type3Cache { | |
| 74 public: | |
| 75 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); | |
| 76 ~CPDF_Type3Cache(); | |
| 77 | |
| 78 CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, | |
| 79 const CFX_Matrix* pMatrix, | |
| 80 FX_FLOAT retinaScaleX = 1.0f, | |
| 81 FX_FLOAT retinaScaleY = 1.0f); | |
| 82 | |
| 83 protected: | |
| 84 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, | |
| 85 uint32_t charcode, | |
| 86 const CFX_Matrix* pMatrix, | |
| 87 FX_FLOAT retinaScaleX = 1.0f, | |
| 88 FX_FLOAT retinaScaleY = 1.0f); | |
| 89 CPDF_Type3Font* const m_pFont; | |
| 90 std::map<CFX_ByteString, CPDF_Type3Glyphs*> m_SizeMap; | |
| 91 }; | |
| 92 | |
| 93 class CPDF_TransferFunc { | 55 class CPDF_TransferFunc { |
| 94 public: | 56 public: |
| 95 explicit CPDF_TransferFunc(CPDF_Document* pDoc); | 57 explicit CPDF_TransferFunc(CPDF_Document* pDoc); |
| 96 | 58 |
| 97 FX_COLORREF TranslateColor(FX_COLORREF src) const; | 59 FX_COLORREF TranslateColor(FX_COLORREF src) const; |
| 98 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, | 60 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, |
| 99 FX_BOOL bAutoDropSrc); | 61 FX_BOOL bAutoDropSrc); |
| 100 | 62 |
| 101 CPDF_Document* const m_pPDFDoc; | 63 CPDF_Document* const m_pPDFDoc; |
| 102 FX_BOOL m_bIdentity; | 64 FX_BOOL m_bIdentity; |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 const uint8_t* src_buf, | 593 const uint8_t* src_buf, |
| 632 int pixels, | 594 int pixels, |
| 633 int Bpp) const override; | 595 int Bpp) const override; |
| 634 | 596 |
| 635 const uint8_t* m_RampR; | 597 const uint8_t* m_RampR; |
| 636 const uint8_t* m_RampG; | 598 const uint8_t* m_RampG; |
| 637 const uint8_t* m_RampB; | 599 const uint8_t* m_RampB; |
| 638 }; | 600 }; |
| 639 | 601 |
| 640 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ | 602 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ |
| OLD | NEW |