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_STITCHFUNC_H_ 8 #define CORE_FPDFAPI_PAGE_CPDF_STITCHFUNC_H_ 9 10 #include <memory> 11 #include <vector> 12 13 #include "core/fpdfapi/page/cpdf_function.h" 14 15 class CPDF_StitchFunc final : public CPDF_Function { 16 public: 17 CPDF_StitchFunc(); 18 ~CPDF_StitchFunc() override; 19 20 // CPDF_Function: 21 bool v_Init(const CPDF_Object* pObj, VisitedSet* pVisited) override; 22 bool v_Call(pdfium::span<const float> inputs, 23 pdfium::span<float> results) const override; 24 GetSubFunctions()25 const std::vector<std::unique_ptr<CPDF_Function>>& GetSubFunctions() const { 26 return m_pSubFunctions; 27 } GetBound(size_t i)28 float GetBound(size_t i) const { return m_bounds[i]; } GetEncode(size_t i)29 float GetEncode(size_t i) const { return m_encode[i]; } 30 31 private: 32 std::vector<std::unique_ptr<CPDF_Function>> m_pSubFunctions; 33 std::vector<float> m_bounds; 34 std::vector<float> m_encode; 35 }; 36 37 #endif // CORE_FPDFAPI_PAGE_CPDF_STITCHFUNC_H_ 38