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