Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h

Issue 1805603002: core/include/fdpfapi cleanup Part I. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
diff --git a/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c5565816313d6d1a6a7bb39d6efadad8c9a8535
--- /dev/null
+++ b/core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h
@@ -0,0 +1,68 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
+#define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
+
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_coordinates.h"
+
+class CPDF_Dictionary;
+class CPDF_Document;
+class CPDF_Page;
+class CPDF_PageObject;
+class CPDF_PageObjectHolder;
+class CPDF_PageRenderCache;
+class CPDF_RenderOptions;
+class CFX_DIBitmap;
+class CFX_Matrix;
+class CFX_RenderDevice;
+
+class CPDF_RenderContext {
+ public:
+ class Layer {
+ public:
+ CPDF_PageObjectHolder* m_pObjectHolder;
+ CFX_Matrix m_Matrix;
+ };
+
+ explicit CPDF_RenderContext(CPDF_Page* pPage);
+ CPDF_RenderContext(CPDF_Document* pDoc, CPDF_PageRenderCache* pPageCache);
+ ~CPDF_RenderContext();
+
+ void AppendLayer(CPDF_PageObjectHolder* pObjectHolder,
+ const CFX_Matrix* pObject2Device);
+
+ void Render(CFX_RenderDevice* pDevice,
+ const CPDF_RenderOptions* pOptions,
+ const CFX_Matrix* pFinalMatrix);
+
+ void Render(CFX_RenderDevice* pDevice,
+ const CPDF_PageObject* pStopObj,
+ const CPDF_RenderOptions* pOptions,
+ const CFX_Matrix* pFinalMatrix);
+
+ void GetBackground(CFX_DIBitmap* pBuffer,
+ const CPDF_PageObject* pObj,
+ const CPDF_RenderOptions* pOptions,
+ CFX_Matrix* pFinalMatrix);
+
+ FX_DWORD CountLayers() const { return m_Layers.GetSize(); }
+ Layer* GetLayer(FX_DWORD index) { return m_Layers.GetDataPtr(index); }
+
+ CPDF_Document* GetDocument() const { return m_pDocument; }
+ CPDF_Dictionary* GetPageResources() const { return m_pPageResources; }
+ CPDF_PageRenderCache* GetPageCache() const { return m_pPageCache; }
+
+ protected:
+ CPDF_Document* const m_pDocument;
+ CPDF_Dictionary* m_pPageResources;
+ CPDF_PageRenderCache* m_pPageCache;
+ FX_BOOL m_bFirstLayer;
+ CFX_ArrayTemplate<Layer> m_Layers;
+};
+
+#endif // CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
« no previous file with comments | « core/fpdfapi/fpdf_render/include/cpdf_progressiverenderer.h ('k') | core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698