Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_sampledfunc.h
Go to the documentation of this file.
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_SAMPLEDFUNC_H_
8#define CORE_FPDFAPI_PAGE_CPDF_SAMPLEDFUNC_H_
9
10#include <vector>
11
12#include "core/fpdfapi/page/cpdf_function.h"
13#include "core/fxcrt/retain_ptr.h"
14
15class CPDF_StreamAcc;
16
17class CPDF_SampledFunc final : public CPDF_Function {
18 public:
22 uint32_t sizes;
23 };
24
28 };
29
31 ~CPDF_SampledFunc() override;
32
33 // CPDF_Function:
34 bool v_Init(const CPDF_Object* pObj, VisitedSet* pVisited) override;
35 bool v_Call(pdfium::span<const float> inputs,
36 pdfium::span<float> results) const override;
37
39 return m_EncodeInfo;
40 }
41 uint32_t GetBitsPerSample() const { return m_nBitsPerSample; }
42
43#if defined(PDF_USE_SKIA)
44 RetainPtr<CPDF_StreamAcc> GetSampleStream() const;
45#endif
46
47 private:
48 std::vector<SampleEncodeInfo> m_EncodeInfo;
49 std::vector<SampleDecodeInfo> m_DecodeInfo;
50 uint32_t m_nBitsPerSample = 0;
51 uint32_t m_SampleMax = 0;
52 RetainPtr<CPDF_StreamAcc> m_pSampleStream;
53};
54
55#endif // CORE_FPDFAPI_PAGE_CPDF_SAMPLEDFUNC_H_
int GetIntegerFor(const ByteString &key) const
uint32_t m_nOutputs
uint32_t m_nInputs
virtual ~CPDF_Function()
bool Init(const CPDF_Object *pObj, VisitedSet *pVisited)
CPDF_Function(Type type)
const Type m_Type
absl::optional< uint32_t > Call(pdfium::span< const float > inputs, pdfium::span< float > results) const
float Interpolate(float x, float xmin, float xmax, float ymin, float ymax) const
RetainPtr< const CPDF_Dictionary > GetDict() const
const CPDF_Stream * AsStream() const
bool DoOperator(PDF_PSOP op)
bool Parse(pdfium::span< const uint8_t > input)
uint32_t GetStackSize() const
void Push(float value)
bool v_Init(const CPDF_Object *pObj, VisitedSet *pVisited) override
~CPDF_PSFunc() override
bool v_Call(pdfium::span< const float > inputs, pdfium::span< float > results) const override
void Execute(CPDF_PSEngine *pEngine)
PDF_PSOP GetOp() const
float GetFloatValue() const
bool Parse(CPDF_SimpleParser *parser, int depth)
CPDF_PSOP(float value)
CPDF_PSOP(PDF_PSOP op)
bool Execute(CPDF_PSEngine *pEngine)
size_t num_operators() const
const std::unique_ptr< CPDF_PSOP > & last_operator()
bool Parse(CPDF_SimpleParser *parser, int depth)
void AddOperatorForTesting(ByteStringView word)
uint32_t GetBitsPerSample() const
const std::vector< SampleEncodeInfo > & GetEncodeInfo() const
bool v_Call(pdfium::span< const float > inputs, pdfium::span< float > results) const override
~CPDF_SampledFunc() override
bool v_Init(const CPDF_Object *pObj, VisitedSet *pVisited) override
PDF_PSOP
@ PSOP_COS
@ PSOP_FLOOR
@ PSOP_LT
@ PSOP_LOG
@ PSOP_DIV
@ PSOP_DUP
@ PSOP_GE
@ PSOP_NEG
@ PSOP_LN
@ PSOP_OR
@ PSOP_EQ
@ PSOP_MOD
@ PSOP_IDIV
@ PSOP_ATAN
@ PSOP_CVR
@ PSOP_SUB
@ PSOP_EXP
@ PSOP_ADD
@ PSOP_ROUND
@ PSOP_CONST
@ PSOP_IF
@ PSOP_NE
@ PSOP_PROC
@ PSOP_FALSE
@ PSOP_TRUE
@ PSOP_MUL
@ PSOP_ROLL
@ PSOP_AND
@ PSOP_GT
@ PSOP_CEILING
@ PSOP_POP
@ PSOP_EXCH
@ PSOP_BITSHIFT
@ PSOP_SQRT
@ PSOP_COPY
@ PSOP_IFELSE
@ PSOP_NOT
@ PSOP_ABS
@ PSOP_CVI
@ PSOP_SIN
@ PSOP_TRUNCATE
@ PSOP_XOR
@ PSOP_LE
@ PSOP_INDEX