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 _FPDF_RESOURCE_ | 7 #ifndef _FPDF_RESOURCE_ |
8 #define _FPDF_RESOURCE_ | 8 #define _FPDF_RESOURCE_ |
9 #ifndef _FPDF_PARSER_ | 9 #ifndef _FPDF_PARSER_ |
10 #include "fpdf_parser.h" | 10 #include "fpdf_parser.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 class CPDF_ToUnicodeMap; | 31 class CPDF_ToUnicodeMap; |
32 class CFX_SubstFont; | 32 class CFX_SubstFont; |
33 class CFX_Font; | 33 class CFX_Font; |
34 class CPDF_RenderContext; | 34 class CPDF_RenderContext; |
35 class CPDF_Form; | 35 class CPDF_Form; |
36 class CPDF_ImageObject; | 36 class CPDF_ImageObject; |
37 class CFX_DIBitmap; | 37 class CFX_DIBitmap; |
38 typedef struct FT_FaceRec_* FXFT_Face; | 38 typedef struct FT_FaceRec_* FXFT_Face; |
39 class CFX_CTTGSUBTable; | 39 class CFX_CTTGSUBTable; |
40 class CPDF_Page; | 40 class CPDF_Page; |
41 | |
42 template <class ObjClass> class CPDF_CountedObject : public CFX_Object | |
43 { | |
44 public: | |
45 ObjClass m_Obj; | |
46 FX_DWORD m_nCount; | |
47 }; | |
48 typedef CPDF_CountedObject<CPDF_ColorSpace*> CPDF_CountedColorSpace; | |
49 typedef CPDF_CountedObject<CPDF_Pattern*> CPDF_CountedPattern; | |
50 typedef CFX_MapPtrTemplate<CPDF_Dictionary*, CPDF_CountedObject<CPDF_Font*>*> CPDF_FontMap; | |
Tom Sepez
2014/10/14 23:07:44
nit: we might as well make typedefs for all of the
| |
51 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedColorSpace*> CPDF_ColorSpaceMap; | |
52 typedef CFX_MapPtrTemplate<CPDF_Object*, CPDF_CountedPattern*> CPDF_Pat ternMap; | |
53 typedef CFX_MapPtrTemplate<FX_DWORD, CPDF_CountedObject<CPDF_Image*>*> CPDF_ImageMap; | |
54 typedef CFX_MapPtrTemplate<CPDF_Stream*, CPDF_CountedObject<CPDF_IccProfile*>*> CPDF_IccProfileMap; | |
55 typedef CFX_MapPtrTemplate<CPDF_Stream*, CPDF_CountedObject<CPDF_StreamAcc*>*> CPDF_FontFileMap; | |
56 | |
41 #define PDFFONT_TYPE1 1 | 57 #define PDFFONT_TYPE1 1 |
42 #define PDFFONT_TRUETYPE 2 | 58 #define PDFFONT_TRUETYPE 2 |
43 #define PDFFONT_TYPE3 3 | 59 #define PDFFONT_TYPE3 3 |
44 #define PDFFONT_CIDFONT 4 | 60 #define PDFFONT_CIDFONT 4 |
45 #define PDFFONT_FIXEDPITCH 1 | 61 #define PDFFONT_FIXEDPITCH 1 |
46 #define PDFFONT_SERIF 2 | 62 #define PDFFONT_SERIF 2 |
47 #define PDFFONT_SYMBOLIC 4 | 63 #define PDFFONT_SYMBOLIC 4 |
48 #define PDFFONT_SCRIPT 8 | 64 #define PDFFONT_SCRIPT 8 |
49 #define PDFFONT_NONSYMBOLIC 32 | 65 #define PDFFONT_NONSYMBOLIC 32 |
50 #define PDFFONT_ITALIC 64 | 66 #define PDFFONT_ITALIC 64 |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
783 CPDF_Object* m_pShadingObj; | 799 CPDF_Object* m_pShadingObj; |
784 | 800 |
785 FX_BOOL m_bShadingObj; | 801 FX_BOOL m_bShadingObj; |
786 | 802 |
787 FX_BOOL Load(); | 803 FX_BOOL Load(); |
788 | 804 |
789 FX_BOOL Reload(); | 805 FX_BOOL Reload(); |
790 | 806 |
791 int m_ShadingType; | 807 int m_ShadingType; |
792 | 808 |
793 CPDF_ColorSpace*» m_pCS; | 809 CPDF_ColorSpace*» m_pCS; // Still keep m_pCS as some CPDF_ColorSpace (name object) are not managed as counted objects. Refer to CPDF_DocPageData::GetColor Space. |
794 | 810 |
811 CPDF_CountedColorSpace* m_pCountedCS; | |
795 | 812 |
796 CPDF_Function* m_pFunctions[4]; | 813 CPDF_Function* m_pFunctions[4]; |
797 | 814 |
798 int m_nFuncs; | 815 int m_nFuncs; |
799 protected: | 816 protected: |
800 void Clear(); | 817 void Clear(); |
801 }; | 818 }; |
802 struct CPDF_MeshVertex { | 819 struct CPDF_MeshVertex { |
803 FX_FLOAT x, y; | 820 FX_FLOAT x, y; |
804 FX_FLOAT r, g, b; | 821 FX_FLOAT r, g, b; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
948 FX_BOOL m_bIsMask; | 965 FX_BOOL m_bIsMask; |
949 | 966 |
950 FX_BOOL m_bInterpolate; | 967 FX_BOOL m_bInterpolate; |
951 | 968 |
952 CPDF_Document* m_pDocument; | 969 CPDF_Document* m_pDocument; |
953 | 970 |
954 CPDF_Dictionary* m_pOC; | 971 CPDF_Dictionary* m_pOC; |
955 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size); | 972 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size); |
956 }; | 973 }; |
957 #endif | 974 #endif |
OLD | NEW |