7#ifndef CORE_FPDFDOC_CPDF_GENERATEAP_H_
8#define CORE_FPDFDOC_CPDF_GENERATEAP_H_
10#include "core/fpdfdoc/cpdf_annot.h"
20 CPDF_Dictionary* pAnnotDict,
26 CPDF_Dictionary* pAnnotDict,
constexpr CFX_FloatRect()=default
void Deflate(float x, float y)
void Union(const CFX_FloatRect &other_rect)
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void MatchRect(const CFX_FloatRect &dest, const CFX_FloatRect &src)
void Rotate(float fRadian)
void Concat(const CFX_Matrix &right)
void AppendFloatRect(const CFX_FloatRect &rect)
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options)
DeviceType GetDeviceType() const
uint32_t GetFlags() const
static CFX_FloatRect RectFromQuadPoints(const CPDF_Dictionary *pAnnotDict, size_t nIndex)
CPDF_Form * GetAPForm(CPDF_Page *pPage, AppearanceMode mode)
bool DrawInContext(CPDF_Page *pPage, CPDF_RenderContext *pContext, const CFX_Matrix &mtUser2Device, AppearanceMode mode)
static ByteString AnnotSubtypeToString(Subtype nSubtype)
static CFX_FloatRect RectFromQuadPointsArray(const CPDF_Array *pArray, size_t nIndex)
static size_t QuadPointCount(const CPDF_Array *pArray)
absl::optional< CFX_FloatRect > GetPopupAnnotRect() const
Subtype GetSubtype() const
const CPDF_Dictionary * GetAnnotDict() const
static Subtype StringToAnnotSubtype(const ByteString &sSubtype)
void SetOpenState(bool bOpenState)
CFX_FloatRect GetRect() const
CPDF_Annot(RetainPtr< CPDF_Dictionary > pDict, CPDF_Document *pDocument)
bool DrawAppearance(CPDF_Page *pPage, CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device, AppearanceMode mode)
RetainPtr< CPDF_Dictionary > GetMutableAnnotDict()
void DrawBorder(CFX_RenderDevice *pDevice, const CFX_Matrix *pUser2Device)
static CFX_FloatRect BoundingRectFromQuadPoints(const CPDF_Dictionary *pAnnotDict)
void SetPopupAnnot(CPDF_Annot *pAnnot)
void SetPopupAnnotOpenState(bool bOpenState)
bool KeyExist(const ByteString &key) const
RetainPtr< CPDF_Stream > GetMutableStreamFor(const ByteString &key)
ByteString GetByteStringFor(const ByteString &key) const
CPDF_GenerateAP & operator=(const CPDF_GenerateAP &)=delete
CPDF_GenerateAP(const CPDF_GenerateAP &)=delete
static bool GenerateAnnotAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict, CPDF_Annot::Subtype subtype)
static void GenerateEmptyAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict)
static void GenerateFormAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict, FormType type)
CPDF_Document * GetDocument() const override
int GetPageRotation() const
CPDF_PageImageCache * GetPageImageCache()
void AppendLayer(CPDF_PageObjectHolder *pObjectHolder, const CFX_Matrix &mtObject2Device)
void Render(CFX_RenderDevice *pDevice, const CPDF_PageObject *pStopObj, const CPDF_RenderOptions *pOptions, const CFX_Matrix *pLastMatrix)
bool operator==(const char *ptr) const
ByteString & operator=(ByteString &&that) noexcept
CharType operator[](const size_t index) const
RetainPtr< CPDF_Stream > GetAnnotAPNoFallback(CPDF_Dictionary *pAnnotDict, CPDF_Annot::AppearanceMode eMode)
RetainPtr< CPDF_Stream > GetAnnotAP(CPDF_Dictionary *pAnnotDict, CPDF_Annot::AppearanceMode eMode)
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
constexpr uint32_t kReadOnly
constexpr uint32_t kNoView
constexpr uint32_t kNoZoom
constexpr uint32_t kHidden
constexpr uint32_t kNoRotate
constexpr uint32_t kPrint
constexpr uint32_t kInvisible
constexpr uint32_t kToggleNoView
constexpr uint32_t kLocked
constexpr uint32_t kLockedContents
constexpr CFX_FillRenderOptions()