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 bool GetRGB(pdfium::span<const float> pBuf, 22 float* R, 23 float* G, 24 float* B) const override; 25 void TranslateImageLine(pdfium::span<uint8_t> dest_span, 26 pdfium::span<const uint8_t> src_span, 27 int pixels, 28 int image_width, 29 int image_height, 30 bool bTransMask) const override; 31 uint32_t v_Load(CPDF_Document* pDoc, 32 const CPDF_Array* pArray, 33 std::set<const CPDF_Object*>* pVisited) override; 34 35 private: 36 explicit CPDF_DeviceCS(Family family); 37 }; 38 39 #endif // CORE_FPDFAPI_PAGE_CPDF_DEVICECS_H_ 40