7#ifndef CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_
8#define CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_
13#include "build/build_config.h"
14#include "core/fxcrt/fx_coordinates.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/unowned_ptr.h"
17#include "core/fxge/dib/fx_dib.h"
22class CFX_DefaultRenderDevice;
24class CPDF_ImageObject;
31class CFX_ImageTransformer;
39 bool Start(CPDF_ImageObject* pImageObject,
62 bool StartBitmapAlpha();
64 bool StartRenderDIBBase();
65 bool StartLoadDIBBase();
68 bool DrawMaskedImage();
69 bool DrawPatternImage();
79 RetainPtr<
const CFX_DIBitmap> CalculateDrawImage(
80 CFX_DefaultRenderDevice& bitmap_device,
86 bool GetDimensionsFromUnitRect(
const FX_RECT& rect,
98 std::unique_ptr<CPDF_ImageLoader>
const m_pLoader;
102 std::unique_ptr<CFX_AggImageRenderer> m_DeviceHandle;
103 Mode m_Mode = Mode::kNone;
104 float m_Alpha = 0.0f;
108 bool m_bPatternColor =
false;
109 bool m_bStdCS =
false;
110 bool m_Result =
true;
bool Attach(RetainPtr< CFX_DIBitmap > pBitmap)
bool Create(int width, int height, FXDIB_Format format)
void Clear(uint32_t color)
FX_RECT GetOuterRect() const
CFX_Matrix & operator=(const CFX_Matrix &other)=default
void Translate(int32_t x, int32_t y)
CFX_FloatRect GetUnitRect() const
void Transform(const CFX_Matrix &matrix)
void AppendRect(float left, float bottom, float right, float top)
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
static CPDF_DocPageData * FromDocument(const CPDF_Document *pDoc)
float GetStrokeAlpha() const
float GetFillAlpha() const
BlendMode GetBlendType() const
CPDF_ImageRenderer(CPDF_RenderStatus *pStatus)
bool Start(RetainPtr< CFX_DIBBase > pDIBBase, FX_ARGB bitmap_argb, const CFX_Matrix &mtImage2Device, const FXDIB_ResampleOptions &options, bool bStdCS)
bool Start(CPDF_ImageObject *pImageObject, const CFX_Matrix &mtObj2Device, bool bStdCS)
bool Continue(PauseIndicatorIface *pPause)
CPDF_Document * GetDocument() const override
const Options & GetOptions() const
bool CheckOCGDictVisible(const CPDF_Dictionary *pOC) const
bool ColorModeIs(Type mode) const
void SetOptions(const CPDF_RenderOptions &options)
void SetStdCS(bool bStdCS)
void Initialize(const CPDF_RenderStatus *pParentStatus, const CPDF_GraphicStates *pInitialStates)
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
pdfium::CheckedNumeric< int32_t > FX_SAFE_INT32
int FXSYS_roundf(float f)
bool bInterpolateBilinear