• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
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_DEVICECS_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_DEVICECS_H_
9 
10 #include <set>
11 
12 #include "core/fpdfapi/page/cpdf_colorspace.h"
13 #include "core/fxcrt/retain_ptr.h"
14 
15 class CPDF_DeviceCS final : public CPDF_ColorSpace {
16  public:
17   CONSTRUCT_VIA_MAKE_RETAIN;
18   ~CPDF_DeviceCS() override;
19 
20   // CPDF_ColorSpace:
21   std::optional<FX_RGB_STRUCT<float>> GetRGB(
22       pdfium::span<const float> pBuf) const override;
23   void TranslateImageLine(pdfium::span<uint8_t> dest_span,
24                           pdfium::span<const uint8_t> src_span,
25                           int pixels,
26                           int image_width,
27                           int image_height,
28                           bool bTransMask) const override;
29   uint32_t v_Load(CPDF_Document* pDoc,
30                   const CPDF_Array* pArray,
31                   std::set<const CPDF_Object*>* pVisited) override;
32 
33  private:
34   explicit CPDF_DeviceCS(Family family);
35 };
36 
37 #endif  // CORE_FPDFAPI_PAGE_CPDF_DEVICECS_H_
38