Home | History | Annotate | Download | only in page
      1 // Copyright 2017 PDFium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
      6 
      7 #ifndef CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
      8 #define CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
      9 
     10 #include <set>
     11 
     12 #include "core/fpdfapi/page/cpdf_colorspace.h"
     13 
     14 class CPDF_Document;
     15 
     16 class CPDF_PatternCS : public CPDF_ColorSpace {
     17  public:
     18   explicit CPDF_PatternCS(CPDF_Document* pDoc);
     19   ~CPDF_PatternCS() override;
     20 
     21   // Called for the stock pattern, since it is initialized via Load().
     22   void InitializeStockPattern();
     23 
     24   // CPDF_ColorSpace:
     25   uint32_t v_Load(CPDF_Document* pDoc,
     26                   CPDF_Array* pArray,
     27                   std::set<CPDF_Object*>* pVisited) override;
     28   bool GetRGB(float* pBuf, float* R, float* G, float* B) const override;
     29 
     30  private:
     31   CPDF_ColorSpace* m_pBaseCS;
     32   CPDF_CountedColorSpace* m_pCountedBaseCS;
     33 };
     34 
     35 #endif  // CORE_FPDFAPI_PAGE_CPDF_PATTERNCS_H_
     36