Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: core/include/fpdfapi/fpdf_resource.h

Issue 1088733002: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_render.h ('k') | core/include/fpdfapi/fpdf_serial.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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 41
42 template <class ObjClass> class CPDF_CountedObject : public CFX_Object 42 template <class ObjClass> class CPDF_CountedObject
43 { 43 {
44 public: 44 public:
45 ObjClass m_Obj; 45 ObjClass m_Obj;
46 FX_DWORD m_nCount; 46 FX_DWORD m_nCount;
47 }; 47 };
48 typedef CPDF_CountedObject<CPDF_Font*> CPDF_CountedFont; 48 typedef CPDF_CountedObject<CPDF_Font*> CPDF_CountedFont;
49 typedef CPDF_CountedObject<CPDF_ColorSpace*> CPDF_CountedColorSpace; 49 typedef CPDF_CountedObject<CPDF_ColorSpace*> CPDF_CountedColorSpace;
50 typedef CPDF_CountedObject<CPDF_Pattern*> CPDF_CountedPattern; 50 typedef CPDF_CountedObject<CPDF_Pattern*> CPDF_CountedPattern;
51 typedef CPDF_CountedObject<CPDF_Image*> CPDF_CountedImage; 51 typedef CPDF_CountedObject<CPDF_Image*> CPDF_CountedImage;
52 typedef CPDF_CountedObject<CPDF_IccProfile*> CPDF_CountedICCProfile; 52 typedef CPDF_CountedObject<CPDF_IccProfile*> CPDF_CountedICCProfile;
(...skipping 16 matching lines...) Expand all
69 #define PDFFONT_SYMBOLIC 4 69 #define PDFFONT_SYMBOLIC 4
70 #define PDFFONT_SCRIPT 8 70 #define PDFFONT_SCRIPT 8
71 #define PDFFONT_NONSYMBOLIC 32 71 #define PDFFONT_NONSYMBOLIC 32
72 #define PDFFONT_ITALIC 64 72 #define PDFFONT_ITALIC 64
73 #define PDFFONT_ALLCAP 0x10000 73 #define PDFFONT_ALLCAP 0x10000
74 #define PDFFONT_SMALLCAP 0x20000 74 #define PDFFONT_SMALLCAP 0x20000
75 #define PDFFONT_FORCEBOLD 0x40000 75 #define PDFFONT_FORCEBOLD 0x40000
76 #define PDFFONT_USEEXTERNATTR 0x80000 76 #define PDFFONT_USEEXTERNATTR 0x80000
77 FX_WCHAR PDF_UnicodeFromAdobeName(const FX_CHAR* name); 77 FX_WCHAR PDF_UnicodeFromAdobeName(const FX_CHAR* name);
78 CFX_ByteString PDF_AdobeNameFromUnicode(FX_WCHAR unicode); 78 CFX_ByteString PDF_AdobeNameFromUnicode(FX_WCHAR unicode);
79 class CPDF_Font : public CFX_Object 79 class CPDF_Font
80 { 80 {
81 public: 81 public:
82 82
83 static CPDF_Font* CreateFontF(CPDF_Document* pDoc, CPDF_Dictionary * pFontDict); 83 static CPDF_Font* CreateFontF(CPDF_Document* pDoc, CPDF_Dictionary * pFontDict);
84 84
85 static CPDF_Font* GetStockFont(CPDF_Document* pDoc, FX_BSTR fontna me); 85 static CPDF_Font* GetStockFont(CPDF_Document* pDoc, FX_BSTR fontna me);
86 86
87 virtual ~CPDF_Font(); 87 virtual ~CPDF_Font();
88 88
89 89
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 #define PDFFONT_ENCODING_BUILTIN 0 316 #define PDFFONT_ENCODING_BUILTIN 0
317 #define PDFFONT_ENCODING_WINANSI 1 317 #define PDFFONT_ENCODING_WINANSI 1
318 #define PDFFONT_ENCODING_MACROMAN 2 318 #define PDFFONT_ENCODING_MACROMAN 2
319 #define PDFFONT_ENCODING_MACEXPERT 3 319 #define PDFFONT_ENCODING_MACEXPERT 3
320 #define PDFFONT_ENCODING_STANDARD 4 320 #define PDFFONT_ENCODING_STANDARD 4
321 #define PDFFONT_ENCODING_ADOBE_SYMBOL 5 321 #define PDFFONT_ENCODING_ADOBE_SYMBOL 5
322 #define PDFFONT_ENCODING_ZAPFDINGBATS 6 322 #define PDFFONT_ENCODING_ZAPFDINGBATS 6
323 #define PDFFONT_ENCODING_PDFDOC 7 323 #define PDFFONT_ENCODING_PDFDOC 7
324 #define PDFFONT_ENCODING_MS_SYMBOL 8 324 #define PDFFONT_ENCODING_MS_SYMBOL 8
325 #define PDFFONT_ENCODING_UNICODE 9 325 #define PDFFONT_ENCODING_UNICODE 9
326 class CPDF_FontEncoding : public CFX_Object 326 class CPDF_FontEncoding
327 { 327 {
328 public: 328 public:
329 329
330 CPDF_FontEncoding(); 330 CPDF_FontEncoding();
331 331
332 CPDF_FontEncoding(int PredefinedEncoding); 332 CPDF_FontEncoding(int PredefinedEncoding);
333 333
334 void LoadEncoding(CPDF_Object* pEncod ing); 334 void LoadEncoding(CPDF_Object* pEncod ing);
335 335
336 FX_BOOL IsIdentical(CPDF_FontEncoding* p Another) const; 336 FX_BOOL IsIdentical(CPDF_FontEncoding* p Another) const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 }; 431 };
432 class CPDF_TrueTypeFont : public CPDF_SimpleFont 432 class CPDF_TrueTypeFont : public CPDF_SimpleFont
433 { 433 {
434 public: 434 public:
435 435
436 CPDF_TrueTypeFont(); 436 CPDF_TrueTypeFont();
437 protected: 437 protected:
438 virtual FX_BOOL _Load(); 438 virtual FX_BOOL _Load();
439 virtual void LoadGlyphMap(); 439 virtual void LoadGlyphMap();
440 }; 440 };
441 class CPDF_Type3Char : public CFX_Object 441 class CPDF_Type3Char
442 { 442 {
443 public: 443 public:
444 444
445 CPDF_Type3Char(); 445 CPDF_Type3Char();
446 446
447 ~CPDF_Type3Char(); 447 ~CPDF_Type3Char();
448 448
449 FX_BOOL LoadBitmap(CPDF_RenderContext* pContext); 449 FX_BOOL LoadBitmap(CPDF_RenderContext* pContext);
450 450
451 FX_BOOL m_bColored; 451 FX_BOOL m_bColored;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 #define PDFCS_DEVICERGB 2 575 #define PDFCS_DEVICERGB 2
576 #define PDFCS_DEVICECMYK 3 576 #define PDFCS_DEVICECMYK 3
577 #define PDFCS_CALGRAY 4 577 #define PDFCS_CALGRAY 4
578 #define PDFCS_CALRGB 5 578 #define PDFCS_CALRGB 5
579 #define PDFCS_LAB 6 579 #define PDFCS_LAB 6
580 #define PDFCS_ICCBASED 7 580 #define PDFCS_ICCBASED 7
581 #define PDFCS_SEPARATION 8 581 #define PDFCS_SEPARATION 8
582 #define PDFCS_DEVICEN 9 582 #define PDFCS_DEVICEN 9
583 #define PDFCS_INDEXED 10 583 #define PDFCS_INDEXED 10
584 #define PDFCS_PATTERN 11 584 #define PDFCS_PATTERN 11
585 class CPDF_ColorSpace : public CFX_Object 585
586 class CPDF_ColorSpace
586 { 587 {
587 public: 588 public:
588 589
589 static CPDF_ColorSpace* GetStockCS(int Family); 590 static CPDF_ColorSpace* GetStockCS(int Family);
590 591
591 static CPDF_ColorSpace* Load(CPDF_Document* pDoc, CPDF_Object* pCSObj); 592 static CPDF_ColorSpace* Load(CPDF_Document* pDoc, CPDF_Object* pCSObj);
592 593
593 void ReleaseCS(); 594 void ReleaseCS();
594 595
595 int GetBufSize() const; 596 int GetBufSize() const;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 } 671 }
671 672
672 int m_Family; 673 int m_Family;
673 674
674 int m_nComponents; 675 int m_nComponents;
675 676
676 CPDF_Array* m_pArray; 677 CPDF_Array* m_pArray;
677 678
678 FX_DWORD m_dwStdConversion; 679 FX_DWORD m_dwStdConversion;
679 }; 680 };
680 class CPDF_Color : public CFX_Object 681 class CPDF_Color
681 { 682 {
682 public: 683 public:
683 684
684 CPDF_Color() :m_pCS(NULL), m_pBuffer(NULL) 685 CPDF_Color() :m_pCS(NULL), m_pBuffer(NULL)
685 { 686 {
686 } 687 }
687 688
688 CPDF_Color(int family); 689 CPDF_Color(int family);
689 690
690 ~CPDF_Color(); 691 ~CPDF_Color();
(...skipping 28 matching lines...) Expand all
719 720
720 CPDF_ColorSpace* m_pCS; 721 CPDF_ColorSpace* m_pCS;
721 722
722 protected: 723 protected:
723 void ReleaseBuffer(); 724 void ReleaseBuffer();
724 void ReleaseColorSpace(); 725 void ReleaseColorSpace();
725 FX_FLOAT* m_pBuffer; 726 FX_FLOAT* m_pBuffer;
726 }; 727 };
727 #define PATTERN_TILING 1 728 #define PATTERN_TILING 1
728 #define PATTERN_SHADING 2 729 #define PATTERN_SHADING 2
729 class CPDF_Pattern : public CFX_Object 730 class CPDF_Pattern
730 { 731 {
731 public: 732 public:
732 733
733 virtual ~CPDF_Pattern(); 734 virtual ~CPDF_Pattern();
734 void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; } 735 void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; }
735 736
736 CPDF_Object* m_pPatternObj; 737 CPDF_Object* m_pPatternObj;
737 738
738 int m_PatternType; 739 int m_PatternType;
739 740
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 CPDF_Function* m_pFunctions[4]; 797 CPDF_Function* m_pFunctions[4];
797 798
798 int m_nFuncs; 799 int m_nFuncs;
799 protected: 800 protected:
800 void Clear(); 801 void Clear();
801 }; 802 };
802 struct CPDF_MeshVertex { 803 struct CPDF_MeshVertex {
803 FX_FLOAT x, y; 804 FX_FLOAT x, y;
804 FX_FLOAT r, g, b; 805 FX_FLOAT r, g, b;
805 }; 806 };
806 class CPDF_MeshStream : public CFX_Object 807 class CPDF_MeshStream
807 { 808 {
808 public: 809 public:
809 810
810 FX_BOOL Load(CPDF_Stream* pShadingStream, CPDF_F unction** pFuncs, int nFuncs, CPDF_ColorSpace* pCS); 811 FX_BOOL Load(CPDF_Stream* pShadingStream, CPDF_F unction** pFuncs, int nFuncs, CPDF_ColorSpace* pCS);
811 812
812 FX_DWORD GetFlag(); 813 FX_DWORD GetFlag();
813 814
814 void GetCoords(FX_FLOAT& x, FX_FLOAT& y); 815 void GetCoords(FX_FLOAT& x, FX_FLOAT& y);
815 816
816 void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FL OAT& b); 817 void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FL OAT& b);
(...skipping 19 matching lines...) Expand all
836 { 837 {
837 public: 838 public:
838 CPDF_ImageSetParam() 839 CPDF_ImageSetParam()
839 : pMatteColor(NULL) 840 : pMatteColor(NULL)
840 , nQuality(80) 841 , nQuality(80)
841 { 842 {
842 } 843 }
843 FX_ARGB* pMatteColor; 844 FX_ARGB* pMatteColor;
844 FX_INT32 nQuality; 845 FX_INT32 nQuality;
845 }; 846 };
846 class CPDF_Image : public CFX_Object 847 class CPDF_Image
847 { 848 {
848 public: 849 public:
849 850
850 CPDF_Image(CPDF_Document* pDoc); 851 CPDF_Image(CPDF_Document* pDoc);
851 852
852 ~CPDF_Image(); 853 ~CPDF_Image();
853 854
854 FX_BOOL LoadImageF(CPDF_Stream* pImageSt ream, FX_BOOL bInline); 855 FX_BOOL LoadImageF(CPDF_Stream* pImageSt ream, FX_BOOL bInline);
855 856
856 void Release(); 857 void Release();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 FX_BOOL m_bIsMask; 949 FX_BOOL m_bIsMask;
949 950
950 FX_BOOL m_bInterpolate; 951 FX_BOOL m_bInterpolate;
951 952
952 CPDF_Document* m_pDocument; 953 CPDF_Document* m_pDocument;
953 954
954 CPDF_Dictionary* m_pOC; 955 CPDF_Dictionary* m_pOC;
955 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size); 956 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size);
956 }; 957 };
957 #endif 958 #endif
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_render.h ('k') | core/include/fpdfapi/fpdf_serial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698