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_reference.h
Go to the documentation of this file.
1// Copyright 2016 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_PARSER_CPDF_REFERENCE_H_
8#define CORE_FPDFAPI_PARSER_CPDF_REFERENCE_H_
9
10#include <set>
11
12#include "core/fpdfapi/parser/cpdf_object.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "core/fxcrt/unowned_ptr.h"
15
17
18class CPDF_Reference final : public CPDF_Object {
19 public:
21
22 // CPDF_Object:
23 Type GetType() const override;
24 RetainPtr<CPDF_Object> Clone() const override;
25 ByteString GetString() const override;
26 float GetNumber() const override;
27 int GetInteger() const override;
28 CPDF_Reference* AsMutableReference() override;
29 bool WriteTo(IFX_ArchiveStream* archive,
30 const CPDF_Encryptor* encryptor) const override;
31 RetainPtr<CPDF_Reference> MakeReference(
32 CPDF_IndirectObjectHolder* holder) const override;
33
34 uint32_t GetRefObjNum() const { return m_RefObjNum; }
35 bool HasIndirectObjectHolder() const { return !!m_pObjList; }
36 void SetRef(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
37
38 private:
39 friend class CPDF_Dictionary;
40
41 CPDF_Reference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
42 ~CPDF_Reference() override;
43
44 const CPDF_Object* GetDirectInternal() const override;
45 const CPDF_Dictionary* GetDictInternal() const override;
47 bool bDirect,
48 std::set<const CPDF_Object*>* pVisited) const override;
49
50 const CPDF_Object* FastGetDirect() const;
51
53 uint32_t m_RefObjNum;
54};
55
56inline CPDF_Reference* ToReference(CPDF_Object* obj) {
57 return obj ? obj->AsMutableReference() : nullptr;
58}
59
60inline const CPDF_Reference* ToReference(const CPDF_Object* obj) {
61 return obj ? obj->AsReference() : nullptr;
62}
63
64inline RetainPtr<CPDF_Reference> ToReference(RetainPtr<CPDF_Object> obj) {
65 return RetainPtr<CPDF_Reference>(ToReference(obj.Get()));
66}
67
68inline RetainPtr<const CPDF_Reference> ToReference(
69 RetainPtr<const CPDF_Object> obj) {
70 return RetainPtr<const CPDF_Reference>(ToReference(obj.Get()));
71}
72
73#endif // CORE_FPDFAPI_PARSER_CPDF_REFERENCE_H_
ByteString GetStyleName() const
Definition cfx_face.cpp:339
absl::optional< std::array< uint8_t, 2 > > GetOs2Panose()
Definition cfx_face.cpp:424
FX_RECT GetBBox() const
Definition cfx_face.cpp:343
size_t GetCharMapCount() const
Definition cfx_face.cpp:702
bool IsTtOt() const
Definition cfx_face.cpp:305
int GetCharMapEncodingIdByIndex(size_t index) const
Definition cfx_face.cpp:692
bool IsFixedWidth() const
Definition cfx_face.cpp:313
bool SelectCharMap(fxge::FontEncoding encoding)
Definition cfx_face.cpp:717
bool HasGlyphNames() const
Definition cfx_face.cpp:301
absl::optional< std::array< uint32_t, 2 > > GetOs2CodePageRange()
Definition cfx_face.cpp:415
int16_t GetAscender() const
Definition cfx_face.cpp:354
std::unique_ptr< CFX_Path > LoadGlyphPath(uint32_t glyph_index, int dest_width, bool is_vertical, const CFX_SubstFont *subst_font)
Definition cfx_face.cpp:557
fxge::FontEncoding GetCharMapEncodingByIndex(size_t index) const
Definition cfx_face.cpp:697
int GetGlyphWidth(uint32_t glyph_index, int dest_width, int weight, const CFX_SubstFont *subst_font)
Definition cfx_face.cpp:623
~CFX_Face() override
bool IsTricky() const
Definition cfx_face.cpp:309
int GetAdjustedDescender() const
Definition cfx_face.cpp:369
std::unique_ptr< CFX_GlyphBitmap > RenderGlyph(const CFX_Font *pFont, uint32_t glyph_index, bool bFontStyle, const CFX_Matrix &matrix, int dest_width, int anti_alias)
Definition cfx_face.cpp:436
int GetGlyphCount() const
Definition cfx_face.cpp:432
void SetCharMap(CharMap map)
Definition cfx_face.cpp:708
absl::optional< std::array< uint32_t, 4 > > GetOs2UnicodeRange()
Definition cfx_face.cpp:404
FXFT_FaceRec * GetRec()
Definition cfx_face.h:121
static RetainPtr< CFX_Face > New(FT_Library library, RetainPtr< Retainable > pDesc, pdfium::span< const FT_Byte > data, FT_Long face_index)
Definition cfx_face.cpp:275
int16_t GetDescender() const
Definition cfx_face.cpp:358
void SetCharMapByIndex(size_t index)
Definition cfx_face.cpp:712
pdfium::span< uint8_t > GetData() const
Definition cfx_face.cpp:382
int GetCharMapPlatformIdByIndex(size_t index) const
Definition cfx_face.cpp:687
static RetainPtr< CFX_Face > Open(FT_Library library, const FT_Open_Args *args, FT_Long face_index)
Definition cfx_face.cpp:290
int GetNameIndex(const char *name)
Definition cfx_face.cpp:651
const FXFT_FaceRec * GetRec() const
Definition cfx_face.h:122
CharMap GetCurrentCharMap() const
Definition cfx_face.cpp:676
absl::optional< fxge::FontEncoding > GetCurrentCharMapEncoding() const
Definition cfx_face.cpp:680
int GetCharIndex(uint32_t code)
Definition cfx_face.cpp:647
bool IsItalic() const
Definition cfx_face.cpp:327
std::vector< CharCodeAndIndex > GetCharCodesAndIndices(char32_t max_char)
Definition cfx_face.cpp:656
int GetAdjustedAscender() const
Definition cfx_face.cpp:362
ByteString GetFamilyName() const
Definition cfx_face.cpp:335
uint16_t GetUnitsPerEm() const
Definition cfx_face.cpp:350
size_t GetSfntTable(uint32_t table, pdfium::span< uint8_t > buffer)
Definition cfx_face.cpp:386
bool IsBold() const
Definition cfx_face.cpp:331
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
static absl::optional< StandardFont > GetStandardFontName(ByteString *name)
void AddInstalledFont(const ByteString &name, FX_Charset charset)
void SetSystemFontInfo(std::unique_ptr< SystemFontInfoIface > pFontInfo)
bool HasLocalizedFont(ByteStringView name) const
static constexpr uint32_t MakeTag(char c1, char c2, char c3, char c4)
static bool IsFixedFont(StandardFont font)
static constexpr int kNumStandardFonts
bool HasInstalledFont(ByteStringView name) const
CFX_FontMapper(CFX_FontMgr *mgr)
size_t GetFaceSize() const
static bool IsStandardFontName(const ByteString &name)
ByteString GetFaceName(size_t index) const
static bool IsSymbolicFont(StandardFont font)
RetainPtr< CFX_Face > FindSubstFont(const ByteString &face_name, bool is_truetype, uint32_t flags, int weight, int italic_angle, FX_CodePage code_page, CFX_SubstFont *subst_font)
std::unique_ptr< SystemFontInfoIface > TakeSystemFontInfo()
static ByteString GetDefaultFontNameByCharset(FX_Charset nCharset)
Definition cfx_font.cpp:103
int GetSubstFontItalicAngle() const
Definition cfx_font.cpp:164
int GetGlyphWidth(uint32_t glyph_index, int dest_width, int weight) const
Definition cfx_font.cpp:243
const CFX_GlyphBitmap * LoadGlyphBitmap(uint32_t glyph_index, bool bFontStyle, const CFX_Matrix &matrix, int dest_width, int anti_alias, CFX_TextRenderOptions *text_options) const
Definition cfx_font.cpp:453
const CFX_Path * LoadGlyphPath(uint32_t glyph_index, int dest_width) const
Definition cfx_font.cpp:465
absl::optional< FX_RECT > GetBBox() const
Definition cfx_font.cpp:418
int GetGlyphWidth(uint32_t glyph_index) const
Definition cfx_font.cpp:239
static const CharsetFontMap kDefaultTTFMap[]
Definition cfx_font.h:78
std::unique_ptr< CFX_Path > LoadGlyphPathImpl(uint32_t glyph_index, int dest_width) const
Definition cfx_font.cpp:444
absl::optional< FX_RECT > GetRawBBox() const
Definition cfx_font.cpp:412
ByteString GetPsName() const
Definition cfx_font.cpp:358
void SetFontType(FontType type)
Definition cfx_font.h:126
int GetDescent() const
Definition cfx_font.cpp:281
ByteString GetBaseFontName() const
Definition cfx_font.cpp:394
bool IsEmbedded() const
Definition cfx_font.h:124
bool IsItalic() const
Definition cfx_font.cpp:331
bool IsTTFont() const
Definition cfx_font.cpp:273
absl::optional< FX_RECT > GetGlyphBBox(uint32_t glyph_index)
Definition cfx_font.cpp:285
bool IsFixedWidth() const
Definition cfx_font.cpp:347
bool LoadEmbedded(pdfium::span< const uint8_t > src_span, bool force_vertical, uint64_t object_tag)
Definition cfx_font.cpp:260
pdfium::span< uint8_t > GetFontSpan() const
Definition cfx_font.h:128
int GetGlyphWidthImpl(uint32_t glyph_index, int dest_width, int weight) const
Definition cfx_font.cpp:250
static const char kDefaultAnsiFontName[]
Definition cfx_font.h:58
ByteString GetFaceName() const
Definition cfx_font.cpp:381
static const char kUniversalDefaultFontName[]
Definition cfx_font.h:59
static FX_Charset GetCharSetFromUnicode(uint16_t word)
Definition cfx_font.cpp:112
static const char kUntitledFontName[]
Definition cfx_font.h:56
FXFT_FaceRec * GetFaceRec() const
Definition cfx_font.h:79
bool IsVertical() const
Definition cfx_font.h:111
int GetAscent() const
Definition cfx_font.cpp:277
void LoadSubst(const ByteString &face_name, bool bTrueType, uint32_t flags, int weight, int italic_angle, FX_CodePage code_page, bool bVertical)
Definition cfx_font.cpp:220
CFX_SubstFont * GetSubstFont() const
Definition cfx_font.h:82
uint64_t GetObjectTag() const
Definition cfx_font.h:127
RetainPtr< CFX_Face > GetFace() const
Definition cfx_font.h:78
bool IsBold() const
Definition cfx_font.cpp:343
FontType GetFontType() const
Definition cfx_font.h:125
ByteString GetFamilyName() const
Definition cfx_font.cpp:368
CFX_GraphStateData & operator=(const CFX_GraphStateData &that)
std::vector< float > m_DashArray
CFX_GraphStateData(CFX_GraphStateData &&src) noexcept
CFX_GraphStateData(const CFX_GraphStateData &src)
CFX_GraphStateData & operator=(CFX_GraphStateData &&that) noexcept
float GetLineDashPhase() const
void SetLineWidth(float width)
CFX_GraphState(const CFX_GraphState &that)
std::vector< float > GetLineDashArray() const
void SetMiterLimit(float limit)
void SetLineJoin(CFX_GraphStateData::LineJoin join)
float GetMiterLimit() const
const CFX_GraphStateData * GetObject() const
void SetLineDashPhase(float phase)
void SetLineDash(std::vector< float > dashes, float phase, float scale)
float GetLineWidth() const
CFX_GraphStateData::LineCap GetLineCap() const
size_t GetLineDashSize() const
CFX_GraphStateData::LineJoin GetLineJoin() const
void SetLineCap(CFX_GraphStateData::LineCap cap)
Point(const CFX_PointF &point, Type type, bool close)
Definition cfx_path.cpp:250
CFX_PointF m_Point
Definition cfx_path.h:33
bool m_CloseFigure
Definition cfx_path.h:35
Point(const Point &other)
bool IsTypeAndOpen(Type type) const
Definition cfx_path.h:29
CFX_FloatRect GetBoundingBox() const
Definition cfx_path.cpp:322
void Transform(const CFX_Matrix &matrix)
Definition cfx_path.cpp:392
CFX_PointF GetPoint(size_t index) const
Definition cfx_path.h:49
void Clear()
Definition cfx_path.cpp:265
Point::Type GetType(size_t index) const
Definition cfx_path.h:45
void AppendRect(float left, float bottom, float right, float top)
Definition cfx_path.cpp:309
std::vector< Point > & GetPoints()
Definition cfx_path.h:51
CFX_Path(CFX_Path &&src) noexcept
void Append(const CFX_Path &src, const CFX_Matrix *matrix)
Definition cfx_path.cpp:275
absl::optional< CFX_FloatRect > GetRect(const CFX_Matrix *matrix) const
Definition cfx_path.cpp:403
CFX_FloatRect GetBoundingBoxForStrokePath(float line_width, float miter_limit) const
Definition cfx_path.cpp:332
void AppendFloatRect(const CFX_FloatRect &rect)
Definition cfx_path.cpp:305
bool IsClosingFigure(size_t index) const
Definition cfx_path.h:46
void AppendPointAndClose(const CFX_PointF &point, Point::Type type)
Definition cfx_path.cpp:293
void AppendLine(const CFX_PointF &pt1, const CFX_PointF &pt2)
Definition cfx_path.cpp:297
CFX_Path(const CFX_Path &src)
void ClosePath()
Definition cfx_path.cpp:269
const std::vector< Point > & GetPoints() const
Definition cfx_path.h:50
void AppendPoint(const CFX_PointF &point, Point::Type type)
Definition cfx_path.cpp:289
bool IsRect() const
Definition cfx_path.cpp:397
~CFX_RetainableGraphStateData() override
RetainPtr< CFX_RetainableGraphStateData > Clone() const
~CFX_RetainablePath() override
RetainPtr< CFX_RetainablePath > Clone() const
Definition cfx_path.cpp:449
CFX_FloatRect GetClipBox() const
CPDF_TextObject * GetText(size_t i) const
CPDF_ClipPath & operator=(const CPDF_ClipPath &that)
CPDF_ClipPath(const CPDF_ClipPath &that)
void CopyClipPath(const CPDF_ClipPath &that)
void AppendPathWithAutoMerge(CPDF_Path path, CFX_FillRenderOptions::FillType type)
bool operator!=(const CPDF_ClipPath &that) const
CFX_FillRenderOptions::FillType GetClipType(size_t i) const
size_t GetTextCount() const
void Transform(const CFX_Matrix &matrix)
bool operator==(const CPDF_ClipPath &that) const
void AppendTexts(std::vector< std::unique_ptr< CPDF_TextObject > > *pTexts)
CPDF_Path GetPath(size_t i) const
size_t GetPathCount() const
void AppendPath(CPDF_Path path, CFX_FillRenderOptions::FillType type)
bool HasRef() const
virtual const CPDF_IndexedCS * AsIndexedCS() const
static RetainPtr< CPDF_ColorSpace > Load(CPDF_Document *pDoc, const CPDF_Object *pObj, std::set< const CPDF_Object * > *pVisited)
static void InitializeGlobals()
Family GetFamily() const
~CPDF_ColorSpace() override
virtual uint32_t v_Load(CPDF_Document *pDoc, const CPDF_Array *pArray, std::set< const CPDF_Object * > *pVisited)=0
static void DestroyGlobals()
virtual const CPDF_PatternCS * AsPatternCS() const
virtual bool IsNormal() const
virtual void EnableStdConversion(bool bEnabled)
bool IsSpecial() const
std::vector< float > CreateBufAndSetDefaultColor() const
CPDF_ColorSpace(Family family)
virtual bool GetRGB(pdfium::span< const float > pBuf, float *R, float *G, float *B) const =0
static uint32_t ComponentsForFamily(Family family)
static RetainPtr< CPDF_ColorSpace > AllocateColorSpaceForID(CPDF_Document *pDocument, uint32_t family_id)
virtual void TranslateImageLine(pdfium::span< uint8_t > dest_span, pdfium::span< const uint8_t > src_span, int pixels, int image_width, int image_height, bool bTransMask) const
static RetainPtr< CPDF_ColorSpace > GetStockCSForName(const ByteString &name)
bool HasSameArray(const CPDF_Object *pObj) const
bool IsStdConversionEnabled() const
void SetComponentsForStockCS(uint32_t nComponents)
static RetainPtr< CPDF_ColorSpace > GetStockCS(Family family)
uint32_t CountComponents() const
virtual void GetDefaultValue(int iComponent, float *value, float *min, float *max) const
CPDF_Color * GetMutableFillColor()
FX_COLORREF GetStrokeColorRef() const
FX_COLORREF GetFillColorRef() const
void SetFillColor(RetainPtr< CPDF_ColorSpace > colorspace, std::vector< float > values)
void SetStrokeColor(RetainPtr< CPDF_ColorSpace > colorspace, std::vector< float > values)
CPDF_ColorState(const CPDF_ColorState &that)
CPDF_Color * GetMutableStrokeColor()
void SetStrokeColorRef(FX_COLORREF colorref)
void SetFillPattern(RetainPtr< CPDF_Pattern > pattern, pdfium::span< float > values)
const CPDF_Color * GetStrokeColor() const
void SetStrokePattern(RetainPtr< CPDF_Pattern > pattern, pdfium::span< float > values)
bool HasRef() const
const CPDF_Color * GetFillColor() const
bool HasFillColor() const
bool HasStrokeColor() const
void SetFillColorRef(FX_COLORREF colorref)
void SetValueForPattern(RetainPtr< CPDF_Pattern > pattern, pdfium::span< float > values)
bool IsPatternInternal() const
CPDF_Color(const CPDF_Color &that)
RetainPtr< CPDF_ColorSpace > m_pCS
Definition cpdf_color.h:50
std::unique_ptr< PatternValue > m_pValue
Definition cpdf_color.h:49
CPDF_Color & operator=(const CPDF_Color &that)
std::vector< float > m_Buffer
Definition cpdf_color.h:48
void SetValueForNonPattern(std::vector< float > values)
RetainPtr< CPDF_Pattern > GetPattern() const
bool IsPattern() const
void SetColorSpace(RetainPtr< CPDF_ColorSpace > colorspace)
bool GetRGB(int *R, int *G, int *B) const
bool IsNull() const
Definition cpdf_color.h:31
uint32_t CountComponents() const
bool IsColorSpaceRGB() const
void SetPropertiesHolder(RetainPtr< CPDF_Dictionary > pHolder, const ByteString &property_name)
~CPDF_ContentMarkItem() override
const ByteString & GetName() const
RetainPtr< CPDF_Dictionary > GetParam()
const ByteString & GetPropertyName() const
ParamType GetParamType() const
RetainPtr< const CPDF_Dictionary > GetParam() const
void SetDirectDict(RetainPtr< CPDF_Dictionary > pDict)
void AddMarkWithDirectDict(ByteString name, RetainPtr< CPDF_Dictionary > pDict)
bool RemoveMark(CPDF_ContentMarkItem *pMarkItem)
void AddMarkWithPropertiesHolder(const ByteString &name, RetainPtr< CPDF_Dictionary > pDict, const ByteString &property_name)
bool ContainsItem(const CPDF_ContentMarkItem *pItem) const
const CPDF_ContentMarkItem * GetItem(size_t index) const
size_t CountItems() const
CPDF_ContentMarkItem * GetItem(size_t index)
std::unique_ptr< CPDF_ContentMarks > Clone()
int GetMarkedContentID() const
size_t FindFirstDifference(const CPDF_ContentMarks *other) const
void AddMark(ByteString name)
void MaybePurgeFontFileStreamAcc(RetainPtr< CPDF_StreamAcc > &&pStreamAcc) override
RetainPtr< CPDF_ColorSpace > GetColorSpace(const CPDF_Object *pCSObj, const CPDF_Dictionary *pResources)
void ClearStockFont() override
RetainPtr< CPDF_IccProfile > GetIccProfile(RetainPtr< const CPDF_Stream > pProfileStream)
RetainPtr< CPDF_Pattern > GetPattern(RetainPtr< CPDF_Object > pPatternObj, const CFX_Matrix &matrix)
std::unique_ptr< CPDF_Font::FormIface > CreateForm(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Stream > pFormStream) override
RetainPtr< CPDF_Font > AddFont(std::unique_ptr< CFX_Font > pFont, FX_Charset charset)
RetainPtr< CPDF_Font > GetStandardFont(const ByteString &fontName, const CPDF_FontEncoding *pEncoding)
RetainPtr< CPDF_Font > GetFont(RetainPtr< CPDF_Dictionary > pFontDict)
RetainPtr< CPDF_ShadingPattern > GetShading(RetainPtr< CPDF_Object > pPatternObj, const CFX_Matrix &matrix)
void MaybePurgeImage(uint32_t dwStreamObjNum) override
RetainPtr< CPDF_Image > GetImage(uint32_t dwStreamObjNum)
RetainPtr< CPDF_ColorSpace > GetColorSpaceGuarded(const CPDF_Object *pCSObj, const CPDF_Dictionary *pResources, std::set< const CPDF_Object * > *pVisited)
RetainPtr< CPDF_StreamAcc > GetFontFileStreamAcc(RetainPtr< const CPDF_Stream > pFontStream) override
bool IsForceClear() const
static CPDF_DocPageData * FromDocument(const CPDF_Document *pDoc)
RetainPtr< CPDF_Font > AddStandardFont(const ByteString &fontName, const CPDF_FontEncoding *pEncoding)
static constexpr size_t kEncodingTableSize
bool IsIdentical(const CPDF_FontEncoding *pAnother) const
CPDF_FontEncoding(FontEncoding predefined_encoding)
wchar_t UnicodeFromCharCode(uint8_t charcode) const
void SetUnicode(uint8_t charcode, wchar_t unicode)
int CharCodeFromUnicode(wchar_t unicode) const
RetainPtr< CPDF_Object > Realize(WeakPtr< ByteStringPool > pPool) const
virtual ~FormFactoryIface()=default
virtual std::unique_ptr< FormIface > CreateForm(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Stream > pFormStream)=0
virtual ~FormIface()=default
virtual CFX_FloatRect CalcBoundingBox() const =0
virtual void ParseContentForType3Char(CPDF_Type3Char *pChar)=0
virtual absl::optional< std::pair< RetainPtr< CFX_DIBitmap >, CFX_Matrix > > GetBitmapAndMatrixFromSoleImageOfForm() const =0
virtual bool HasPageObjects() const =0
int GetItalicAngle() const
Definition cpdf_font.h:120
virtual FX_RECT GetCharBBox(uint32_t charcode)=0
virtual bool IsTrueTypeFont() const
Definition cpdf_font.cpp:67
virtual const CPDF_CIDFont * AsCIDFont() const
UnownedPtr< CPDF_Document > const m_pDocument
Definition cpdf_font.h:169
int m_ItalicAngle
Definition cpdf_font.h:182
virtual int GetCharWidthF(uint32_t charcode)=0
const FX_RECT & GetFontBBox() const
Definition cpdf_font.h:113
virtual void WillBeDestroyed()
int GetTypeDescent() const
Definition cpdf_font.h:115
static bool UseTTCharmapMSSymbol(const RetainPtr< CFX_Face > &face)
Definition cpdf_font.h:149
int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode)
void LoadFontDescriptor(const CPDF_Dictionary *pFontDesc)
virtual CPDF_CIDFont * AsCIDFont()
RetainPtr< CPDF_Dictionary > m_pFontDict
Definition cpdf_font.h:174
static constexpr uint32_t kInvalidCharCode
Definition cpdf_font.h:63
static int TT2PDF(FT_Pos m, const RetainPtr< CFX_Face > &face)
void ClearFontDict()
Definition cpdf_font.h:108
absl::optional< FX_Charset > GetSubstFontCharset() const
virtual bool IsType1Font() const
Definition cpdf_font.cpp:63
virtual bool IsVertWriting() const
RetainPtr< CPDF_StreamAcc > m_pFontFile
Definition cpdf_font.h:173
CPDF_Font(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pFontDict)
Definition cpdf_font.cpp:52
~CPDF_Font() override
Definition cpdf_font.cpp:58
void LoadUnicodeMap() const
static RetainPtr< CPDF_Font > Create(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pFontDict, FormFactoryIface *pFactory)
virtual uint32_t CharCodeFromUnicode(wchar_t Unicode) const
virtual int GlyphFromCharCode(uint32_t charcode, bool *pVertGlyph)=0
static bool UseTTCharmapMacRoman(const RetainPtr< CFX_Face > &face)
Definition cpdf_font.h:152
const CFX_Font * GetFont() const
Definition cpdf_font.h:131
static bool UseTTCharmapMSUnicode(const RetainPtr< CFX_Face > &face)
Definition cpdf_font.h:146
virtual const CPDF_TrueTypeFont * AsTrueTypeFont() const
Definition cpdf_font.cpp:87
virtual const CPDF_Type1Font * AsType1Font() const
Definition cpdf_font.cpp:79
std::unique_ptr< CPDF_ToUnicodeMap > m_pToUnicodeMap
Definition cpdf_font.h:176
int m_Flags
Definition cpdf_font.h:178
RetainPtr< const CPDF_Dictionary > GetFontDict() const
Definition cpdf_font.h:103
void SetResourceName(const ByteString &name)
Definition cpdf_font.h:136
virtual bool IsCIDFont() const
Definition cpdf_font.cpp:75
std::vector< std::unique_ptr< CFX_Font > > m_FontFallbacks
Definition cpdf_font.h:172
int m_StemV
Definition cpdf_font.h:179
virtual WideString UnicodeFromCharCode(uint32_t charcode) const
CFX_Font * GetFont()
Definition cpdf_font.h:130
virtual const CPDF_Type3Font * AsType3Font() const
Definition cpdf_font.cpp:95
static RetainPtr< CPDF_Font > GetStockFont(CPDF_Document *pDoc, ByteStringView fontname)
static bool UseTTCharmap(const RetainPtr< CFX_Face > &face, int platform_id, int encoding_id)
virtual size_t CountChar(ByteStringView pString) const
void AppendChar(ByteString *str, uint32_t charcode) const
int GetStringWidth(ByteStringView pString)
RetainPtr< CPDF_Dictionary > GetMutableFontDict()
Definition cpdf_font.h:102
virtual CPDF_Type1Font * AsType1Font()
Definition cpdf_font.cpp:83
ByteString m_BaseFontName
Definition cpdf_font.h:175
ByteString GetBaseFontName() const
Definition cpdf_font.h:99
virtual bool HasFontWidths() const
virtual bool IsType3Font() const
Definition cpdf_font.cpp:71
virtual CPDF_Type3Font * AsType3Font()
Definition cpdf_font.cpp:99
bool FontDictIs(const CPDF_Dictionary *pThat) const
Definition cpdf_font.h:105
static const char * GetAdobeCharName(FontEncoding base_encoding, const std::vector< ByteString > &charnames, uint32_t charcode)
ByteString m_ResourceName
Definition cpdf_font.h:170
virtual CPDF_TrueTypeFont * AsTrueTypeFont()
Definition cpdf_font.cpp:91
const ByteString & GetResourceName() const
Definition cpdf_font.h:135
FX_RECT m_FontBBox
Definition cpdf_font.h:183
int GetFontWeight() const
bool HasFace() const
Definition cpdf_font.h:110
virtual int AppendChar(char *buf, uint32_t charcode) const
int m_Ascent
Definition cpdf_font.h:180
int m_Descent
Definition cpdf_font.h:181
uint32_t GetFontDictObjNum() const
Definition cpdf_font.h:104
virtual uint32_t GetNextChar(ByteStringView pString, size_t *pOffset) const
virtual bool Load()=0
bool m_bToUnicodeLoaded
Definition cpdf_font.h:177
uint32_t FallbackFontFromCharcode(uint32_t charcode)
virtual bool IsUnicodeCompatible() const =0
bool IsStandardFont() const
static FX_RECT GetCharBBoxForFace(const RetainPtr< CFX_Face > &face)
CPDF_Document * GetDocument() const
Definition cpdf_font.h:128
void CheckFontMetrics()
CFX_Font m_Font
Definition cpdf_font.h:171
bool IsEmbedded() const
Definition cpdf_font.h:101
int GetTypeAscent() const
Definition cpdf_font.h:114
int GetFontFlags() const
Definition cpdf_font.h:119
CFX_Font * GetFontFallback(int position)
bool IsForm() const override
Type GetType() const override
void Transform(const CFX_Matrix &matrix) override
CPDF_FormObject(int32_t content_stream, std::unique_ptr< CPDF_Form > pForm, const CFX_Matrix &matrix)
~CPDF_FormObject() override
void SetFormMatrix(const CFX_Matrix &matrix)
const CPDF_Form * form() const
const CFX_Matrix & form_matrix() const
CPDF_FormObject * AsForm() override
const CPDF_FormObject * AsForm() const override
absl::optional< std::pair< RetainPtr< CFX_DIBitmap >, CFX_Matrix > > GetBitmapAndMatrixFromSoleImageOfForm() const override
bool HasPageObjects() const override
Definition cpdf_form.cpp:92
void ParseContentForType3Char(CPDF_Type3Char *pType3Char) override
Definition cpdf_form.cpp:72
RetainPtr< const CPDF_Stream > GetStream() const
void ParseContent(const CPDF_AllStates *pGraphicStates, const CFX_Matrix *pParentMatrix, RecursionState *recursion_state)
Definition cpdf_form.cpp:66
CPDF_Form(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Stream > pFormStream)
Definition cpdf_form.cpp:35
void ParseContent()
Definition cpdf_form.cpp:62
CPDF_Form(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Stream > pFormStream, CPDF_Dictionary *pParentResources)
Definition cpdf_form.cpp:43
CFX_FloatRect CalcBoundingBox() const override
Definition cpdf_form.cpp:96
~CPDF_Form() override
static CPDF_Dictionary * ChooseResourcesDict(CPDF_Dictionary *pResources, CPDF_Dictionary *pParentResources, CPDF_Dictionary *pPageResources)
Definition cpdf_form.cpp:26
void AppendGraphicsResourceName(ByteString name)
void SetRenderIntent(const ByteString &ri)
void SetHT(RetainPtr< const CPDF_Object > pObject)
void SetBlendType(BlendMode type)
void SetUCR(RetainPtr< const CPDF_Object > pObject)
float GetStrokeAlpha() const
CPDF_GeneralState(const CPDF_GeneralState &that)
void SetTransferFunc(RetainPtr< CPDF_TransferFunc > pFunc)
RetainPtr< CPDF_TransferFunc > GetTransferFunc() const
void SetFillAlpha(float alpha)
void SetStrokeAlpha(float alpha)
void SetSmoothness(float smoothness)
void SetTR(RetainPtr< const CPDF_Object > pObject)
BlendMode GetBlendType() const
void SetStrokeAdjust(bool adjust)
RetainPtr< const CPDF_Object > GetTR() const
void SetBlendMode(const ByteString &mode)
pdfium::span< const ByteString > GetGraphicsResourceNames() const
void SetSMaskMatrix(const CFX_Matrix &matrix)
void SetGraphicsResourceNames(std::vector< ByteString > names)
const CFX_Matrix * GetSMaskMatrix() const
void SetSoftMask(RetainPtr< CPDF_Dictionary > pDict)
void SetBG(RetainPtr< const CPDF_Object > pObject)
ByteString GetBlendMode() const
CFX_Matrix * GetMutableMatrix()
void SetAlphaSource(bool source)
void SetTextKnockout(bool knockout)
RetainPtr< CPDF_Dictionary > GetMutableSoftMask()
RetainPtr< const CPDF_Dictionary > GetSoftMask() const
void SetFlatness(float flatness)
void SetMatrix(const CFX_Matrix &matrix)
CPDF_TextState & mutable_text_state()
CPDF_ClipPath & mutable_clip_path()
const CFX_GraphState & graph_state() const
CFX_GraphState & mutable_graph_state()
const CPDF_TextState & text_state() const
CPDF_GeneralState & mutable_general_state()
const CPDF_ColorState & color_state() const
CPDF_GraphicStates & operator=(const CPDF_GraphicStates &that)
const CPDF_ClipPath & clip_path() const
const CPDF_GeneralState & general_state() const
CPDF_ColorState & mutable_color_state()
CPDF_GraphicStates(const CPDF_GraphicStates &that)
void Transform(const CFX_Matrix &matrix) override
bool IsImage() const override
CPDF_ImageObject * AsImage() override
const CPDF_ImageObject * AsImage() const override
RetainPtr< CPDF_Image > GetImage() const
CPDF_ImageObject(int32_t content_stream)
void SetImage(RetainPtr< CPDF_Image > pImage)
~CPDF_ImageObject() override
RetainPtr< CFX_DIBitmap > GetIndependentBitmap() const
Type GetType() const override
void SetImageMatrix(const CFX_Matrix &matrix)
const CFX_Matrix & matrix() const
void SetJpegImage(RetainPtr< IFX_SeekableReadStream > pFile)
bool Continue(PauseIndicatorIface *pPause)
RetainPtr< CFX_DIBBase > LoadDIBBase() const
void ResetCache(CPDF_Page *pPage)
bool IsInterpol() const
Definition cpdf_image.h:48
RetainPtr< const CPDF_Dictionary > GetOC() const
RetainPtr< const CPDF_Stream > GetStream() const
bool IsMask() const
Definition cpdf_image.h:47
bool IsInline() const
Definition cpdf_image.h:46
~CPDF_Image() override
int32_t GetPixelWidth() const
Definition cpdf_image.h:44
bool StartLoadDIBBase(const CPDF_Dictionary *pFormResource, const CPDF_Dictionary *pPageResource, bool bStdCS, CPDF_ColorSpace::Family GroupFamily, bool bLoadMask, const CFX_Size &max_size_required)
int32_t GetPixelHeight() const
Definition cpdf_image.h:43
RetainPtr< const CPDF_Dictionary > GetDict() const
CPDF_Document * GetDocument() const
Definition cpdf_image.h:41
void SetJpegImageInline(RetainPtr< IFX_SeekableReadStream > pFile)
RetainPtr< CFX_DIBBase > DetachBitmap()
static bool IsValidJpegBitsPerComponent(int32_t bpc)
void SetImage(const RetainPtr< CFX_DIBitmap > &pBitmap)
RetainPtr< CPDF_DIB > CreateNewDIB() const
static bool IsValidJpegComponent(int32_t comps)
uint32_t GetMatteColor() const
Definition cpdf_image.h:45
RetainPtr< CFX_DIBBase > DetachMask()
void ConvertStreamToIndirectObject()
WideString GetUnicodeText() const override
Definition cpdf_name.cpp:41
CPDF_Name * AsMutableName() override
Definition cpdf_name.cpp:37
Type GetType() const override
Definition cpdf_name.cpp:21
~CPDF_Name() override
void SetString(const ByteString &str) override
Definition cpdf_name.cpp:33
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
Definition cpdf_name.cpp:45
RetainPtr< CPDF_Object > Clone() const override
Definition cpdf_name.cpp:25
ByteString GetString() const override
Definition cpdf_name.cpp:29
const CPDF_Name * AsName() const
virtual CPDF_Reference * AsMutableReference()
virtual CPDF_Name * AsMutableName()
const CPDF_Reference * AsReference() const
bool ProcessPageObjects(fxcrt::ostringstream *buf)
CPDF_PageContentGenerator(CPDF_PageObjectHolder *pObjHolder)
void UpdateStream(size_t stream_index, fxcrt::ostringstream *buf)
size_t AddStream(fxcrt::ostringstream *buf)
CPDF_PageContentManager(CPDF_PageObjectHolder *page_obj_holder, CPDF_Document *document)
void SetBackgroundAlphaNeeded(bool needed)
absl::optional< ByteString > GraphicsMapSearch(const GraphicsData &gd)
void StartParse(std::unique_ptr< CPDF_ContentParser > pParser)
RetainPtr< const CPDF_Dictionary > GetDict() const
std::map< FontData, ByteString > m_FontsMap
RetainPtr< CPDF_Dictionary > m_pPageResources
RetainPtr< const CPDF_Dictionary > GetResources() const
virtual bool IsPage() const
void SetResources(RetainPtr< CPDF_Dictionary > pDict)
const_iterator end() const
virtual ~CPDF_PageObjectHolder()
const CFX_Matrix & GetLastCTM() const
const_iterator begin() const
const std::vector< CFX_FloatRect > & GetMaskBoundingBoxes() const
void GraphicsMapInsert(const GraphicsData &gd, const ByteString &str)
void AddImageMaskBoundingBox(const CFX_FloatRect &box)
CPDF_Document * GetDocument() const
std::map< GraphicsData, ByteString > m_GraphicsMap
void AppendPageObject(std::unique_ptr< CPDF_PageObject > pPageObj)
void FontsMapInsert(const FontData &fd, const ByteString &str)
absl::optional< ByteString > FontsMapSearch(const FontData &fd)
bool ErasePageObjectAtIndex(size_t index)
CPDF_PageObjectHolder(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pDict, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Dictionary > pResources)
ParseState GetParseState() const
RetainPtr< CPDF_Dictionary > GetMutableDict()
void ContinueParse(PauseIndicatorIface *pPause)
RetainPtr< CPDF_Dictionary > m_pResources
CPDF_PageObject * GetPageObjectByIndex(size_t index) const
std::unique_ptr< CPDF_PageObject > RemovePageObject(CPDF_PageObject *pPageObj)
const CPDF_Transparency & GetTransparency() const
RetainPtr< CPDF_Dictionary > GetMutableResources()
RetainPtr< const CPDF_Dictionary > GetPageResources() const
RetainPtr< CPDF_Dictionary > GetMutablePageResources()
CPDF_Transparency m_Transparency
const CFX_FloatRect & GetBBox() const
std::set< int32_t > TakeDirtyStreams()
void SetContentMarks(const CPDF_ContentMarks &marks)
CPDF_PageObject(const CPDF_PageObject &src)=delete
const CPDF_GraphicStates & graphic_states() const
pdfium::span< const ByteString > GetGraphicsResourceNames() const
virtual const CPDF_PathObject * AsPath() const
virtual void Transform(const CFX_Matrix &matrix)=0
void SetRect(const CFX_FloatRect &rect)
const CFX_FloatRect & GetOriginalRect() const
virtual bool IsText() const
virtual const CPDF_ImageObject * AsImage() const
const CPDF_ColorState & color_state() const
void SetDirty(bool value)
const CPDF_GeneralState & general_state() const
CPDF_PageObject(int32_t content_stream)
virtual bool IsImage() const
void SetContentStream(int32_t new_content_stream)
virtual const CPDF_ShadingObject * AsShading() const
virtual const CPDF_TextObject * AsText() const
void SetOriginalRect(const CFX_FloatRect &rect)
static constexpr int32_t kNoContentStream
const ByteString & GetResourceName() const
void TransformClipPath(const CFX_Matrix &matrix)
const CPDF_ClipPath & clip_path() const
virtual Type GetType() const =0
CPDF_GeneralState & mutable_general_state()
virtual const CPDF_FormObject * AsForm() const
CPDF_TextState & mutable_text_state()
FX_RECT GetTransformedBBox(const CFX_Matrix &matrix) const
CPDF_PageObject & operator=(const CPDF_PageObject &src)=delete
virtual CPDF_ShadingObject * AsShading()
const CFX_FloatRect & GetRect() const
virtual ~CPDF_PageObject()
virtual CPDF_ImageObject * AsImage()
const CPDF_ContentMarks * GetContentMarks() const
CPDF_ContentMarks * GetContentMarks()
void TransformGeneralState(const CFX_Matrix &matrix)
FX_RECT GetBBox() const
void CopyData(const CPDF_PageObject *pSrcObject)
virtual CPDF_FormObject * AsForm()
void SetResourceName(const ByteString &resource_name)
virtual CPDF_TextObject * AsText()
const CPDF_TextState & text_state() const
virtual CPDF_PathObject * AsPath()
const CFX_GraphState & graph_state() const
virtual bool IsForm() const
int32_t GetContentStream() const
CFX_GraphState & mutable_graph_state()
CPDF_ClipPath & mutable_clip_path()
virtual bool IsPath() const
bool IsDirty() const
virtual bool IsShading() const
CPDF_ColorState & mutable_color_state()
RenderContextClearer(CPDF_Page *pPage)
virtual ~RenderContextIface()=default
virtual void ClearPage(CPDF_Page *pPage)=0
RetainPtr< const CPDF_Array > GetAnnotsArray() const
RetainPtr< CPDF_Array > GetOrCreateAnnotsArray()
absl::optional< CFX_PointF > DeviceToPage(const FX_RECT &rect, int rotate, const CFX_PointF &device_point) const override
CPDF_Document * GetDocument() const override
Definition cpdf_page.cpp:51
float GetPageHeight() const override
Definition cpdf_page.cpp:59
void UpdateDimensions()
~CPDF_Page() override
bool IsPage() const override
Definition cpdf_page.cpp:63
float GetPageWidth() const override
Definition cpdf_page.cpp:55
CPDFXFA_Page * AsXFAPage() override
Definition cpdf_page.cpp:47
const CFX_Matrix & GetPageMatrix() const
Definition cpdf_page.h:75
RenderContextIface * GetRenderContext()
Definition cpdf_page.h:84
void ParseContent()
Definition cpdf_page.cpp:67
const CFX_SizeF & GetPageSize() const
Definition cpdf_page.h:74
void SetView(View *pView)
Definition cpdf_page.h:92
RetainPtr< CPDF_Array > GetMutableAnnotsArray()
void ClearView()
absl::optional< CFX_PointF > PageToDevice(const FX_RECT &rect, int rotate, const CFX_PointF &page_point) const override
void SetRenderContext(std::unique_ptr< RenderContextIface > pContext)
CPDF_Page * AsPDFPage() override
Definition cpdf_page.cpp:43
void AddPageImageCache()
CFX_Matrix GetDisplayMatrix(const FX_RECT &rect, int iRotate) const override
int GetPageRotation() const
CPDF_PageImageCache * GetPageImageCache()
Definition cpdf_page.h:83
void ClearRenderContext()
void set_alternate_filltype()
bool IsPath() const override
~CPDF_PathObject() override
void set_winding_filltype()
bool has_winding_filltype() const
bool stroke() const
const CPDF_Path & path() const
void set_filltype(CFX_FillRenderOptions::FillType fill_type)
CPDF_PathObject * AsPath() override
void SetPathMatrix(const CFX_Matrix &matrix)
void Transform(const CFX_Matrix &matrix) override
CPDF_Path & path()
const CFX_Matrix & matrix() const
const CPDF_PathObject * AsPath() const override
Type GetType() const override
CFX_FillRenderOptions::FillType filltype() const
CPDF_PathObject(int32_t content_stream)
void set_stroke(bool stroke)
bool has_alternate_filltype() const
bool has_no_filltype() const
void AppendRect(float left, float bottom, float right, float top)
Definition cpdf_path.cpp:53
bool HasRef() const
Definition cpdf_path.h:22
void Append(const CFX_Path &path, const CFX_Matrix *pMatrix)
Definition cpdf_path.cpp:45
void AppendPoint(const CFX_PointF &point, CFX_Path::Point::Type type)
Definition cpdf_path.cpp:57
void AppendFloatRect(const CFX_FloatRect &rect)
Definition cpdf_path.cpp:49
const CFX_Path * GetObject() const
Definition cpdf_path.h:42
CFX_FloatRect GetBoundingBoxForStrokePath(float line_width, float miter_limit) const
Definition cpdf_path.cpp:31
CFX_FloatRect GetBoundingBox() const
Definition cpdf_path.cpp:27
void Emplace()
Definition cpdf_path.h:21
const std::vector< CFX_Path::Point > & GetPoints() const
Definition cpdf_path.cpp:15
void ClosePath()
Definition cpdf_path.cpp:19
bool IsRect() const
Definition cpdf_path.cpp:37
void AppendPointAndClose(const CFX_PointF &point, CFX_Path::Point::Type type)
Definition cpdf_path.cpp:64
CFX_PointF GetPoint(int index) const
Definition cpdf_path.cpp:23
void Transform(const CFX_Matrix &matrix)
Definition cpdf_path.cpp:41
CPDF_Path(const CPDF_Path &that)
const CFX_Matrix & parent_matrix() const
~CPDF_Pattern() override
void SetPatternToFormMatrix()
virtual CPDF_ShadingPattern * AsShadingPattern()
const CFX_Matrix & pattern_to_form() const
RetainPtr< CPDF_Object > pattern_obj() const
virtual CPDF_TilingPattern * AsTilingPattern()
CPDF_Pattern(CPDF_Document *pDoc, RetainPtr< CPDF_Object > pObj, const CFX_Matrix &parentMatrix)
CPDF_Document * document() const
RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const override
void SetRef(CPDF_IndirectObjectHolder *pDoc, uint32_t objnum)
~CPDF_Reference() override
float GetNumber() const override
int GetInteger() const override
bool HasIndirectObjectHolder() const
const CPDF_Dictionary * GetDictInternal() const override
const CPDF_Object * GetDirectInternal() const override
RetainPtr< CPDF_Reference > MakeReference(CPDF_IndirectObjectHolder *holder) const override
uint32_t GetRefObjNum() const
CPDF_Reference * AsMutableReference() override
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
ByteString GetString() const override
Type GetType() const override
RetainPtr< CPDF_Object > Clone() const override
CPDF_SimpleFont(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pFontDict)
std::vector< ByteString > m_CharNames
~CPDF_SimpleFont() override
uint16_t m_GlyphIndex[kInternalTableSize]
int GlyphFromCharCode(uint32_t charcode, bool *pVertGlyph) override
static constexpr size_t kInternalTableSize
int GetCharWidthF(uint32_t charcode) override
void LoadCharMetrics(int charcode)
CPDF_FontEncoding m_Encoding
uint32_t CharCodeFromUnicode(wchar_t Unicode) const override
bool IsUnicodeCompatible() const override
void LoadCharWidths(const CPDF_Dictionary *font_desc)
FX_RECT m_CharBBox[kInternalTableSize]
FX_RECT GetCharBBox(uint32_t charcode) override
void LoadPDFEncoding(bool bEmbedded, bool bTrueType)
uint16_t m_CharWidth[kInternalTableSize]
FontEncoding m_BaseEncoding
bool HasFontWidths() const override
void LoadDifferences(const CPDF_Dictionary *encoding)
const CPDF_FontEncoding * GetEncoding() const
WideString UnicodeFromCharCode(uint32_t charcode) const override
virtual void LoadGlyphMap()=0
ByteString GetImageDecoder() const
ByteString ComputeDigest() const
void LoadAllDataFilteredWithEstimatedSize(uint32_t estimated_size)
CPDF_StreamAcc & operator=(const CPDF_StreamAcc &)=delete
pdfium::span< const uint8_t > GetSpan() const
CPDF_StreamAcc(const CPDF_StreamAcc &)=delete
uint64_t KeyForCache() const
int GetLength1ForTest() const
uint32_t GetSize() const
~CPDF_StreamAcc() override
void LoadAllDataImageAcc(uint32_t estimated_size)
RetainPtr< const CPDF_Dictionary > GetImageParam() const
RetainPtr< const CPDF_Stream > GetStream() const
DataVector< uint8_t > DetachData()
~CPDF_StringArchiveStream() override
CPDF_StringArchiveStream(fxcrt::ostringstream *stream)
FX_FILESIZE CurrentOffset() const override
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
RetainPtr< CPDF_Font > GetFont() const
void SetPosition(const CFX_PointF &pos)
void SetText(const ByteString &str)
CPDF_TextObject * AsText() override
Item GetItemInfo(size_t index) const
void SetTextRenderMode(TextRenderingMode mode)
CPDF_TextObject(int32_t content_stream)
CFX_Matrix GetTextMatrix() const
WideString GetWordString(int nWordIndex) const
std::unique_ptr< CPDF_TextObject > Clone() const
Type GetType() const override
bool IsText() const override
uint32_t GetCharCode(size_t index) const
Item GetCharInfo(size_t index) const
float GetCharWidth(uint32_t charcode) const
float GetFontSize() const
TextRenderingMode GetTextRenderMode() const
~CPDF_TextObject() override
size_t CountChars() const
const CPDF_TextObject * AsText() const override
size_t CountItems() const
void Transform(const CFX_Matrix &matrix) override
CFX_PointF CalcPositionData(float horz_scale)
void SetSegments(const ByteString *pStrs, const std::vector< float > &kernings, size_t nSegs)
CFX_PointF GetPos() const
const std::vector< uint32_t > & GetCharCodes() const
const std::vector< float > & GetCharPositions() const
void SetTextMatrix(const CFX_Matrix &matrix)
pdfium::span< float > GetMutableMatrix()
TextRenderingMode GetTextMode() const
CPDF_TextState(const CPDF_TextState &that)
RetainPtr< CPDF_Font > GetFont() const
float GetWordSpace() const
float GetFontSize() const
float GetCharSpace() const
void SetTextMode(TextRenderingMode mode)
void SetWordSpace(float sp)
void SetFont(RetainPtr< CPDF_Font > pFont)
float GetFontSizeH() const
void SetFontSize(float size)
void SetCharSpace(float sp)
pdfium::span< float > GetMutableCTM()
CPDF_TextState & operator=(const CPDF_TextState &that)
pdfium::span< const float > GetMatrix() const
pdfium::span< const float > GetCTM() const
bool IsIsolated() const
CPDF_Transparency(const CPDF_Transparency &other)
CPDF_Transparency & operator=(const CPDF_Transparency &other)
bool IsTrueTypeFont() const override
void LoadGlyphMap() override
CPDF_TrueTypeFont * AsTrueTypeFont() override
const CPDF_TrueTypeFont * AsTrueTypeFont() const override
~CPDF_TrueTypeFont() override
void LoadGlyphMap() override
CPDF_Type1Font * AsType1Font() override
const CPDF_Type1Font * AsType1Font() const override
bool IsBase14Font() const
~CPDF_Type1Font() override
bool Load() override
bool IsType1Font() const override
virtual absl::optional< CFX_PointF > PageToDevice(const FX_RECT &rect, int rotate, const CFX_PointF &page_point) const =0
virtual CPDF_Page * AsPDFPage()=0
virtual CPDF_Document * GetDocument() const =0
virtual CPDFXFA_Page * AsXFAPage()=0
virtual absl::optional< CFX_PointF > DeviceToPage(const FX_RECT &rect, int rotate, const CFX_PointF &device_point) const =0
virtual float GetPageWidth() const =0
virtual CFX_Matrix GetDisplayMatrix(const FX_RECT &rect, int iRotate) const =0
virtual float GetPageHeight() const =0
void SetPattern(RetainPtr< CPDF_Pattern > pPattern)
void SetComps(pdfium::span< const float > comps)
RetainPtr< CPDF_Pattern > GetPattern() const
pdfium::span< const float > GetComps() const
PatternValue(const PatternValue &that)
FT_Long GetAxisMax(size_t index) const
operator bool() const
Definition fx_freetype.h:46
ScopedFXFTMMVar(FXFT_FaceRec *face)
FT_Pos GetAxisDefault(size_t index) const
FT_Long GetAxisMin(size_t index) const
static ByteString Format(const char *pFormat,...)
ByteString & operator=(ByteString &&that) noexcept
bool IsEmpty() const
Definition bytestring.h:119
CharType operator[](const size_t index) const
Definition bytestring.h:150
bool operator!=(const SharedCopyOnWrite &that) const
bool operator==(const SharedCopyOnWrite &that) const
ObjClass * GetPrivateCopy(Args... params)
SharedCopyOnWrite(const SharedCopyOnWrite &other)
const ObjClass * GetObject() const
ObjClass * Emplace(Args... params)
SharedCopyOnWrite & operator=(const SharedCopyOnWrite &that)
constexpr size_t kMaxPatternColorComps
pdfium::span< const uint16_t > UnicodesForPredefinedCharSet(FontEncoding encoding)
wchar_t UnicodeFromAppleRomanCharCode(uint8_t charcode)
const char * CharNameFromPredefinedCharSet(FontEncoding encoding, uint8_t charcode)
uint32_t CharCodeFromUnicodeForEncoding(fxge::FontEncoding encoding, wchar_t unicode)
FontEncoding
CPDF_Name * ToName(CPDF_Object *obj)
Definition cpdf_name.h:36
const CPDF_Name * ToName(const CPDF_Object *obj)
Definition cpdf_name.h:40
RetainPtr< const CPDF_Name > ToName(RetainPtr< CPDF_Object > obj)
Definition cpdf_name.h:44
CPDF_Reference * ToReference(CPDF_Object *obj)
const CPDF_Reference * ToReference(const CPDF_Object *obj)
RetainPtr< CPDF_Reference > ToReference(RetainPtr< CPDF_Object > obj)
bool TextRenderingModeIsStrokeMode(const TextRenderingMode &mode)
bool SetTextRenderingModeFromInt(int iMode, TextRenderingMode *mode)
bool TextRenderingModeIsClipMode(const TextRenderingMode &mode)
TextRenderingMode
ByteString PDF_NameEncode(const ByteString &orig)
FX_Charset
Definition fx_codepage.h:70
FX_CodePage
Definition fx_codepage.h:18
bool GetIsMaskFromFormat(FXDIB_Format format)
Definition fx_dib.h:99
BlendMode
Definition fx_dib.h:49
constexpr FX_CMYK CmykEncode(uint32_t c, uint32_t m, uint32_t y, uint32_t k)
Definition fx_dib.h:105
constexpr uint32_t FXSYS_BGR(uint8_t b, uint8_t g, uint8_t r)
Definition fx_dib.h:69
FXDIB_Format MakeRGBFormat(int bpp)
Definition fx_dib.cpp:23
void ReverseCopy3Bytes(uint8_t *dest, const uint8_t *src)
Definition fx_dib.h:154
std::pair< int, FX_COLORREF > ArgbToAlphaAndColorRef(FX_ARGB argb)
Definition fx_dib.cpp:49
FX_ARGB AlphaAndColorRefToArgb(int a, FX_COLORREF colorref)
Definition fx_dib.cpp:57
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118
int GetBppFromFormat(FXDIB_Format format)
Definition fx_dib.h:90
int GetCompsFromFormat(FXDIB_Format format)
Definition fx_dib.h:95
constexpr uint8_t FXSYS_GetRValue(uint32_t bgr)
Definition fx_dib.h:73
std::tuple< int, int, int, int > ArgbDecode(FX_ARGB argb)
Definition fx_dib.cpp:44
FX_COLORREF ArgbToColorRef(FX_ARGB argb)
Definition fx_dib.cpp:53
constexpr unsigned int FXSYS_GetUnsignedAlpha(float alpha)
Definition fx_dib.h:85
FXDIB_Format
Definition fx_dib.h:19
constexpr uint8_t FXSYS_GetGValue(uint32_t bgr)
Definition fx_dib.h:77
constexpr uint8_t FXSYS_GetBValue(uint32_t bgr)
Definition fx_dib.h:81
void FXFT_adobe_name_from_unicode(char *name, wchar_t unicode)
int FXFT_unicode_from_adobe_name(const char *glyph_name)
#define FX_FILESIZE
Definition fx_types.h:19
CPDFXFA_Page * ToXFAPage(IPDF_Page *pBase)
Definition ipdf_page.h:53
CPDF_Page * ToPDFPage(IPDF_Page *pBase)
Definition ipdf_page.h:49
#define CHECK(cvref)
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224
bool operator!=(const CFX_FillRenderOptions &other) const
static constexpr CFX_FillRenderOptions EvenOddOptions()
bool operator==(const CFX_FillRenderOptions &other) const
constexpr CFX_FillRenderOptions(FillType fill_type)
static constexpr CFX_FillRenderOptions WindingOptions()
const char * fontname
Definition cfx_font.h:42
std::set< const uint8_t * > parsed_set
Definition cpdf_form.h:31
Item(const Item &that)
bool HasAnyOptions() const
Definition fx_dib.cpp:40
bool bInterpolateBilinear
Definition fx_dib.h:41
void operator()(FXFT_FaceRec *pRec)
Definition fx_freetype.h:26
void operator()(FXFT_LibraryRec *pRec)
Definition fx_freetype.h:30
void operator()(FT_MM_Var *variation_desc)
bool operator<(const FontData &other) const
ByteString baseFont
bool operator<(const GraphicsData &other) const