7#ifndef CORE_FPDFAPI_PAGE_CPDF_SHADINGPATTERN_H_
8#define CORE_FPDFAPI_PAGE_CPDF_SHADINGPATTERN_H_
15#include "core/fpdfapi/page/cpdf_colorspace.h"
16#include "core/fpdfapi/page/cpdf_pattern.h"
17#include "core/fxcrt/retain_ptr.h"
68 CPDF_ShadingPattern(
const CPDF_ShadingPattern&) =
delete;
69 CPDF_ShadingPattern& operator=(
const CPDF_ShadingPattern&) =
delete;
72 bool Validate()
const;
73 bool ValidateFunctions(uint32_t nExpectedNumFunctions,
74 uint32_t nExpectedNumInputs,
75 uint32_t nExpectedNumOutputs)
const;
78 const bool m_bShading;
80 std::vector<std::unique_ptr<CPDF_Function>> m_pFunctions;
int GetGlyphWidth(uint32_t glyph_index) const
virtual uint32_t GlyphFromCharCode(uint32_t charcode)
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)
~CPDF_DocPageData() override
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
static CPDF_DocPageData * FromDocument(const CPDF_Document *pDoc)
RetainPtr< CPDF_Font > AddStandardFont(const ByteString &fontName, const CPDF_FontEncoding *pEncoding)
CPDF_Document * GetDocument() const
PageDataIface * GetPageData() const
static CPDF_FontGlobals * GetInstance()
void Clear(CPDF_Document *pDoc)
virtual ByteString GetString() const
bool IsMeshShading() const
ShadingType GetShadingType() const
CPDF_ShadingPattern * AsShadingPattern() override
const std::vector< std::unique_ptr< CPDF_Function > > & GetFuncs() const
~CPDF_ShadingPattern() override
RetainPtr< CPDF_ColorSpace > GetCS() const
RetainPtr< const CPDF_Object > GetShadingObject() const
bool IsShadingObject() const
ByteString(const ByteString &other)
ByteString & operator+=(const char *str)
ByteString & operator=(const char *str)
@ kTensorProductPatchMeshShading
@ kLatticeFormGouraudTriangleMeshShading
@ kFreeFormGouraudTriangleMeshShading
const FX_CharsetUnicodes kFX_CharsetUnicodes[8]
bool FX_CharSetIsCJK(FX_Charset uCharset)
#define FXFONT_NONSYMBOLIC
#define FXFONT_FORCE_BOLD
ByteString AdobeNameFromUnicode(wchar_t unicode)
#define FXFONT_FIXED_PITCH
const char kWinAnsiEncoding[]
#define CONSTRUCT_VIA_MAKE_RETAIN
constexpr FX_RECT()=default