summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.h')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h46
1 files changed, 25 insertions, 21 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index 92b96f9bec..b15c1d1482 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -29,6 +29,7 @@ class CPDF_Object;
class CPDF_PageObject;
class CPDF_PageObjectHolder;
class CPDF_PathObject;
+class CPDF_RenderContext;
class CPDF_ShadingObject;
class CPDF_ShadingPattern;
class CPDF_TilingPattern;
@@ -39,24 +40,27 @@ class CPDF_Type3Font;
class CPDF_RenderStatus {
public:
- CPDF_RenderStatus();
+ CPDF_RenderStatus(CPDF_RenderContext* pContext, CFX_RenderDevice* pDevice);
~CPDF_RenderStatus();
- bool Initialize(class CPDF_RenderContext* pContext,
- CFX_RenderDevice* pDevice,
- const CFX_Matrix* pDeviceMatrix,
- const CPDF_PageObject* pStopObj,
- const CPDF_RenderStatus* pParentStatus,
- const CPDF_GraphicStates* pInitialStates,
- const CPDF_RenderOptions* pOptions,
- const CPDF_Transparency& transparency,
- bool bDropObjects,
- const CPDF_Dictionary* pFormResource = nullptr,
- bool bStdCS = false,
- CPDF_Type3Char* pType3Char = nullptr,
- FX_ARGB fill_color = 0,
- uint32_t GroupFamily = 0,
- bool bLoadMask = false);
+ // Called prior to Initialize().
+ void SetOptions(const CPDF_RenderOptions& options) { m_Options = options; }
+ void SetDeviceMatrix(const CFX_Matrix& matrix) { m_DeviceMatrix = matrix; }
+ void SetStopObject(const CPDF_PageObject* pStopObj) { m_pStopObj = pStopObj; }
+ void SetFormResource(const CPDF_Dictionary* pRes) { m_pFormResource = pRes; }
+ void SetType3Char(CPDF_Type3Char* pType3Char) { m_pType3Char = pType3Char; }
+ void SetFillColor(FX_ARGB color) { m_T3FillColor = color; }
+ void SetDropObjects(bool bDropObjects) { m_bDropObjects = bDropObjects; }
+ void SetLoadMask(bool bLoadMask) { m_bLoadMask = bLoadMask; }
+ void SetStdCS(bool bStdCS) { m_bStdCS = bStdCS; }
+ void SetGroupFamily(uint32_t family) { m_GroupFamily = family; }
+ void SetTransparency(const CPDF_Transparency& transparency) {
+ m_Transparency = transparency;
+ }
+
+ void Initialize(const CPDF_RenderStatus* pParentStatus,
+ const CPDF_GraphicStates* pInitialStates);
+
void RenderObjectList(const CPDF_PageObjectHolder* pObjectHolder,
const CFX_Matrix* pObj2Device);
void RenderSingleObject(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device);
@@ -77,7 +81,7 @@ class CPDF_RenderStatus {
}
CPDF_Dictionary* GetPageResource() const { return m_pPageResource.Get(); }
CFX_RenderDevice* GetRenderDevice() const { return m_pDevice; }
- const CPDF_RenderOptions* GetRenderOptions() const { return &m_Options; }
+ const CPDF_RenderOptions& GetRenderOptions() const { return m_Options; }
#if defined _SKIA_SUPPORT_
void DebugVerifyDeviceIsPreMultiplied() const;
@@ -171,21 +175,21 @@ class CPDF_RenderStatus {
UnownedPtr<const CPDF_Dictionary> m_pFormResource;
UnownedPtr<CPDF_Dictionary> m_pPageResource;
std::vector<CPDF_Type3Font*> m_Type3FontCache;
- UnownedPtr<CPDF_RenderContext> m_pContext;
+ UnownedPtr<CPDF_RenderContext> const m_pContext;
bool m_bStopped = false;
- CFX_RenderDevice* m_pDevice = nullptr;
+ CFX_RenderDevice* const m_pDevice;
CFX_Matrix m_DeviceMatrix;
CPDF_ClipPath m_LastClipPath;
const CPDF_PageObject* m_pCurObj = nullptr;
const CPDF_PageObject* m_pStopObj = nullptr;
CPDF_GraphicStates m_InitialStates;
std::unique_ptr<CPDF_ImageRenderer> m_pImageRenderer;
- bool m_bPrint = false;
CPDF_Transparency m_Transparency;
+ bool m_bPrint = false;
bool m_bDropObjects = false;
bool m_bStdCS = false;
- uint32_t m_GroupFamily = 0;
bool m_bLoadMask = false;
+ uint32_t m_GroupFamily = 0;
UnownedPtr<CPDF_Type3Char> m_pType3Char;
FX_ARGB m_T3FillColor = 0;
int m_curBlend = FXDIB_BLEND_NORMAL;