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

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

Issue 522483003: Add m_pDocument in CPDF_Color and check if page date has been forced clear (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 int m_nComponents; 673 int m_nComponents;
674 674
675 CPDF_Array* m_pArray; 675 CPDF_Array* m_pArray;
676 676
677 FX_DWORD m_dwStdConversion; 677 FX_DWORD m_dwStdConversion;
678 }; 678 };
679 class CPDF_Color : public CFX_Object 679 class CPDF_Color : public CFX_Object
680 { 680 {
681 public: 681 public:
682 682
683 CPDF_Color() 683 CPDF_Color() :m_pCS(NULL), m_pBuffer(NULL), m_pDocument(NULL)
684 { 684 {
685 m_pBuffer = NULL;
686 m_pCS = NULL;
687 } 685 }
688 686
689 CPDF_Color(int family); 687 CPDF_Color(int family);
690 688
691 ~CPDF_Color(); 689 ~CPDF_Color();
692 690
693 FX_BOOL IsNull() const 691 FX_BOOL IsNull() const
694 { 692 {
695 return m_pBuffer == NULL; 693 return m_pBuffer == NULL;
696 } 694 }
(...skipping 16 matching lines...) Expand all
713 FX_BOOL GetRGB(int& R, int& G, int& B) c onst; 711 FX_BOOL GetRGB(int& R, int& G, int& B) c onst;
714 712
715 CPDF_Pattern* GetPattern() const; 713 CPDF_Pattern* GetPattern() const;
716 714
717 CPDF_ColorSpace* GetPatternCS() const; 715 CPDF_ColorSpace* GetPatternCS() const;
718 716
719 FX_FLOAT* GetPatternColor() const; 717 FX_FLOAT* GetPatternColor() const;
720 718
721 CPDF_ColorSpace* m_pCS; 719 CPDF_ColorSpace* m_pCS;
722 720
723 FX_FLOAT* m_pBuffer;
724 protected: 721 protected:
725 void ReleaseBuffer(); 722 void ReleaseBuffer();
726 void ReleaseColorSpace(); 723 void ReleaseColorSpace();
724 FX_FLOAT* m_pBuffer;
725 CPDF_Document* m_pDocument;
727 }; 726 };
728 #define PATTERN_TILING 1 727 #define PATTERN_TILING 1
729 #define PATTERN_SHADING 2 728 #define PATTERN_SHADING 2
730 class CPDF_Pattern : public CFX_Object 729 class CPDF_Pattern : public CFX_Object
731 { 730 {
732 public: 731 public:
733 732
734 virtual ~CPDF_Pattern(); 733 virtual ~CPDF_Pattern();
735 void SaveColor(CPDF_Color* pColor) {m_pColor = pColor;}
736 734
737 CPDF_Object* m_pPatternObj; 735 CPDF_Object* m_pPatternObj;
738 736
739 int m_PatternType; 737 int m_PatternType;
740 738
741 CFX_AffineMatrix m_Pattern2Form; 739 CFX_AffineMatrix m_Pattern2Form;
742 CFX_AffineMatrix m_ParentMatrix; 740 CFX_AffineMatrix m_ParentMatrix;
743 741
744 CPDF_Document* m_pDocument; 742 CPDF_Document* m_pDocument;
745 CPDF_Color* m_pColor;
746 743
747 protected: 744 protected:
748 745
749 CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix); 746 CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix);
750 }; 747 };
751 748
752 class CPDF_TilingPattern : public CPDF_Pattern 749 class CPDF_TilingPattern : public CPDF_Pattern
753 { 750 {
754 public: 751 public:
755 752
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 FX_BOOL m_bIsMask; 946 FX_BOOL m_bIsMask;
950 947
951 FX_BOOL m_bInterpolate; 948 FX_BOOL m_bInterpolate;
952 949
953 CPDF_Document* m_pDocument; 950 CPDF_Document* m_pDocument;
954 951
955 CPDF_Dictionary* m_pOC; 952 CPDF_Dictionary* m_pOC;
956 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size); 953 CPDF_Dictionary* InitJPEG(FX_LPBYTE pData, FX_DWORD size);
957 }; 954 };
958 #endif 955 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698