7#ifndef CORE_FPDFAPI_PAGE_CPDF_STREAMPARSER_H_
8#define CORE_FPDFAPI_PAGE_CPDF_STREAMPARSER_H_
10#include "core/fxcrt/retain_ptr.h"
11#include "core/fxcrt/string_pool_template.h"
12#include "core/fxcrt/weak_ptr.h"
13#include "third_party/base/containers/span.h"
26 const WeakPtr<ByteStringPool>& pPool);
31 return ByteStringView(m_WordBuffer, m_WordSize);
33 uint32_t
GetPos()
const {
return m_Pos; }
34 void SetPos(uint32_t pos) { m_Pos = pos; }
38 uint32_t dwRecursionLevel);
44 friend class cpdf_streamparser_ReadHexString_Test;
45 static constexpr uint32_t kMaxWordLength = 255;
47 void GetNextWord(
bool& bIsNumber);
48 ByteString ReadString();
49 ByteString ReadHexString();
50 bool PositionIsInBounds()
const;
53 uint32_t m_WordSize = 0;
54 WeakPtr<ByteStringPool> m_pPool;
56 pdfium::span<
const uint8_t> m_pBuf;
57 uint8_t m_WordBuffer[kMaxWordLength + 1] = {};
CFX_FloatRect(const CFX_FloatRect &that)=default
constexpr CFX_FloatRect()=default
void UpdateRect(const CFX_PointF &point)
void Intersect(const CFX_FloatRect &other_rect)
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void Concat(const CFX_Matrix &right)
static RetainPtr< CPDF_ColorSpace > GetStockCS(Family family)
CPDF_DictionaryLocker(const CPDF_Dictionary *pDictionary)
uint32_t ComponentBits() const
bool CanReadCoords() const
void SkipBits(uint32_t nbits)
void AppendRect(float left, float bottom, float right, float top)
void Transform(const CFX_Matrix &matrix)
ShadingType GetShadingType() const
CPDF_StreamContentParser(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Dictionary > pParentResources, const CFX_Matrix *pmtContentToUser, CPDF_PageObjectHolder *pObjHolder, RetainPtr< CPDF_Dictionary > pResources, const CFX_FloatRect &rcBBox, const CPDF_AllStates *pStates, CPDF_Form::RecursionState *parse_state)
uint32_t Parse(pdfium::span< const uint8_t > pData, uint32_t start_offset, uint32_t max_cost, const std::vector< uint32_t > &stream_start_offsets)
~CPDF_StreamContentParser()
static void DestroyGlobals()
static ByteStringView FindValueAbbreviationForTesting(ByteStringView abbr)
RetainPtr< CPDF_Font > FindFont(const ByteString &name)
static ByteStringView FindKeyAbbreviationForTesting(ByteStringView abbr)
static void InitializeGlobals()
void SetPos(uint32_t pos)
ElementType ParseNextElement()
const RetainPtr< CPDF_Object > & GetObject() const
RetainPtr< CPDF_Object > ReadNextObject(bool bAllowNestedArray, bool bInArray, uint32_t dwRecursionLevel)
RetainPtr< CPDF_Stream > ReadInlineStream(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pDict, const CPDF_Object *pCSObj)
CPDF_StreamParser(pdfium::span< const uint8_t > span, const WeakPtr< ByteStringPool > &pPool)
CPDF_StreamParser(pdfium::span< const uint8_t > span)
ByteStringView GetWord() const
bool operator==(const char *ptr) const
bool operator!=(const char *ptr) const
@ kTensorProductPatchMeshShading
@ kLatticeFormGouraudTriangleMeshShading
@ kFreeFormGouraudTriangleMeshShading
bool TextRenderingModeIsStrokeMode(const TextRenderingMode &mode)