7#ifndef CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_
8#define CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_
16#include "core/fxcrt/bytestring.h"
17#include "third_party/base/containers/span.h"
85 std::unique_ptr<CPDF_PSProc> m_proc;
100 return m_Operators.back();
104 static constexpr int kMaxDepth = 128;
106 void AddOperator(ByteStringView word);
108 std::vector<std::unique_ptr<CPDF_PSOP>> m_Operators;
116 bool Parse(pdfium::span<
const uint8_t> input);
120 void Push(
float value);
126 static constexpr uint32_t kPSEngineStackSize = 100;
128 uint32_t m_StackCount = 0;
130 float m_Stack[kPSEngineStackSize] = {};
int GetIntegerFor(const ByteString &key) const
bool Init(const CPDF_Object *pObj, VisitedSet *pVisited)
absl::optional< uint32_t > Call(pdfium::span< const float > inputs, pdfium::span< float > results) const
@ kType2ExponentialInterpolation
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
bool v_Init(const CPDF_Object *pObj, VisitedSet *pVisited) override
bool v_Call(pdfium::span< const float > inputs, pdfium::span< float > results) const override
void Execute(CPDF_PSEngine *pEngine)
float GetFloatValue() const
bool Parse(CPDF_SimpleParser *parser, int depth)
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)