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 <vector> 12 13 #include "core/fpdfapi/page/cpdf_function.h" 14 15 class CPDF_StitchFunc : public CPDF_Function { 16 public: 17 CPDF_StitchFunc(); 18 ~CPDF_StitchFunc() override; 19 20 // CPDF_Function 21 bool v_Init(CPDF_Object* pObj) override; 22 bool v_Call(float* inputs, float* results) const override; 23 GetSubFunctions()24 const std::vector<std::unique_ptr<CPDF_Function>>& GetSubFunctions() const { 25 return m_pSubFunctions; 26 } GetBound(size_t i)27 float GetBound(size_t i) const { return m_pBounds[i]; } 28 29 private: 30 std::vector<std::unique_ptr<CPDF_Function>> m_pSubFunctions; 31 float* m_pBounds; 32 float* m_pEncode; 33 34 static const uint32_t kRequiredNumInputs = 1; 35 }; 36 37 #endif // CORE_FPDFAPI_PAGE_CPDF_STITCHFUNC_H_ 38