xref: /aosp_15_r20/external/pdfium/core/fpdfapi/page/cpdf_expintfunc.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
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_EXPINTFUNC_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_EXPINTFUNC_H_
9 
10 #include "core/fpdfapi/page/cpdf_function.h"
11 #include "core/fxcrt/data_vector.h"
12 
13 #if defined(_SKIA_SUPPORT_)
14 #include "third_party/base/containers/span.h"
15 #endif
16 
17 class CPDF_ExpIntFunc final : public CPDF_Function {
18  public:
19   CPDF_ExpIntFunc();
20   ~CPDF_ExpIntFunc() override;
21 
22   // CPDF_Function:
23   bool v_Init(const CPDF_Object* pObj, VisitedSet* pVisited) override;
24   bool v_Call(pdfium::span<const float> inputs,
25               pdfium::span<float> results) const override;
26 
GetOrigOutputs()27   uint32_t GetOrigOutputs() const { return m_nOrigOutputs; }
GetExponent()28   float GetExponent() const { return m_Exponent; }
29 
30 #if defined(_SKIA_SUPPORT_)
GetBeginValues()31   pdfium::span<const float> GetBeginValues() const { return m_BeginValues; }
GetEndValues()32   pdfium::span<const float> GetEndValues() const { return m_EndValues; }
33 #endif
34 
35  private:
36   uint32_t m_nOrigOutputs = 0;
37   float m_Exponent = 0.0f;
38   DataVector<float> m_BeginValues;
39   DataVector<float> m_EndValues;
40 };
41 
42 #endif  // CORE_FPDFAPI_PAGE_CPDF_EXPINTFUNC_H_
43