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

Side by Side Diff: core/fpdfapi/fpdf_render/include/cpdf_rendercontext.h

Issue 2382763002: Move core/fpdfapi/fpdf_render/include to core/fpdfapi/fpdf_render (Closed)
Patch Set: Rebase to master Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
8 #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
9
10 #include "core/fxcrt/include/fx_basic.h"
11 #include "core/fxcrt/include/fx_coordinates.h"
12
13 class CPDF_Dictionary;
14 class CPDF_Document;
15 class CPDF_Page;
16 class CPDF_PageObject;
17 class CPDF_PageObjectHolder;
18 class CPDF_PageRenderCache;
19 class CPDF_RenderOptions;
20 class CFX_DIBitmap;
21 class CFX_Matrix;
22 class CFX_RenderDevice;
23
24 class CPDF_RenderContext {
25 public:
26 class Layer {
27 public:
28 CPDF_PageObjectHolder* m_pObjectHolder;
29 CFX_Matrix m_Matrix;
30 };
31
32 explicit CPDF_RenderContext(CPDF_Page* pPage);
33 CPDF_RenderContext(CPDF_Document* pDoc, CPDF_PageRenderCache* pPageCache);
34 ~CPDF_RenderContext();
35
36 void AppendLayer(CPDF_PageObjectHolder* pObjectHolder,
37 const CFX_Matrix* pObject2Device);
38
39 void Render(CFX_RenderDevice* pDevice,
40 const CPDF_RenderOptions* pOptions,
41 const CFX_Matrix* pFinalMatrix);
42
43 void Render(CFX_RenderDevice* pDevice,
44 const CPDF_PageObject* pStopObj,
45 const CPDF_RenderOptions* pOptions,
46 const CFX_Matrix* pFinalMatrix);
47
48 void GetBackground(CFX_DIBitmap* pBuffer,
49 const CPDF_PageObject* pObj,
50 const CPDF_RenderOptions* pOptions,
51 CFX_Matrix* pFinalMatrix);
52
53 uint32_t CountLayers() const { return m_Layers.GetSize(); }
54 Layer* GetLayer(uint32_t index) { return m_Layers.GetDataPtr(index); }
55
56 CPDF_Document* GetDocument() const { return m_pDocument; }
57 CPDF_Dictionary* GetPageResources() const { return m_pPageResources; }
58 CPDF_PageRenderCache* GetPageCache() const { return m_pPageCache; }
59
60 protected:
61 CPDF_Document* const m_pDocument;
62 CPDF_Dictionary* m_pPageResources;
63 CPDF_PageRenderCache* m_pPageCache;
64 CFX_ArrayTemplate<Layer> m_Layers;
65 };
66
67 #endif // CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_RENDERCONTEXT_H_
OLDNEW
« 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