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

Side by Side Diff: xfa/fde/fde_render.h

Issue 1896893003: Cleanup FDE interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « xfa/fde/fde_path.h ('k') | xfa/fde/fde_render.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FDE_FDE_RENDER_H_ 7 #ifndef XFA_FDE_FDE_RENDER_H_
8 #define XFA_FDE_FDE_RENDER_H_ 8 #define XFA_FDE_FDE_RENDER_H_
9 9
10 #include "core/fxcrt/include/fx_coordinates.h" 10 #include "core/fxcrt/include/fx_coordinates.h"
11 #include "xfa/fde/fde_gedevice.h"
12 #include "xfa/fde/fde_iterator.h"
11 #include "xfa/fde/fde_visualset.h" 13 #include "xfa/fde/fde_visualset.h"
12 14
13 class IFDE_RenderDevice; 15 class CFDE_RenderDevice;
14 16
15 void FDE_GetPageMatrix(CFX_Matrix& pageMatrix,
16 const CFX_RectF& docPageRect,
17 const CFX_Rect& devicePageRect,
18 int32_t iRotate,
19 uint32_t dwCoordinatesType = 0);
20 enum FDE_RENDERSTATUS { 17 enum FDE_RENDERSTATUS {
21 FDE_RENDERSTATUS_Reset = 0, 18 FDE_RENDERSTATUS_Reset = 0,
22 FDE_RENDERSTATUS_Paused, 19 FDE_RENDERSTATUS_Paused,
23 FDE_RENDERSTATUS_Done, 20 FDE_RENDERSTATUS_Done,
24 FDE_RENDERSTATUS_Failed, 21 FDE_RENDERSTATUS_Failed,
25 }; 22 };
26 23
27 class IFDE_RenderContext { 24 class CFDE_RenderContext : public CFX_Target {
28 public: 25 public:
29 static IFDE_RenderContext* Create(); 26 CFDE_RenderContext();
30 virtual ~IFDE_RenderContext() {} 27 ~CFDE_RenderContext();
31 virtual void Release() = 0; 28
32 virtual FX_BOOL StartRender(IFDE_RenderDevice* pRenderDevice, 29 void Release() { delete this; }
33 IFDE_CanvasSet* pCanvasSet, 30 FX_BOOL StartRender(CFDE_RenderDevice* pRenderDevice,
34 const CFX_Matrix& tmDoc2Device) = 0; 31 IFDE_CanvasSet* pCanvasSet,
35 virtual FDE_RENDERSTATUS GetStatus() const = 0; 32 const CFX_Matrix& tmDoc2Device);
36 virtual FDE_RENDERSTATUS DoRender(IFX_Pause* pPause = NULL) = 0; 33 FDE_RENDERSTATUS GetStatus() const { return m_eStatus; }
37 virtual void StopRender() = 0; 34 FDE_RENDERSTATUS DoRender(IFX_Pause* pPause = nullptr);
35 void StopRender();
36 void RenderText(IFDE_TextSet* pTextSet, FDE_HVISUALOBJ hText);
37 FX_BOOL ApplyClip(IFDE_VisualSet* pVisualSet,
38 FDE_HVISUALOBJ hObj,
39 FDE_HDEVICESTATE& hState);
40 void RestoreClip(FDE_HDEVICESTATE hState);
41
42 protected:
43 FDE_RENDERSTATUS m_eStatus;
44 CFDE_RenderDevice* m_pRenderDevice;
45 CFDE_Brush* m_pBrush;
46 CFX_Matrix m_Transform;
47 FXTEXT_CHARPOS* m_pCharPos;
48 int32_t m_iCharPosCount;
49 CFDE_VisualSetIterator* m_pIterator;
38 }; 50 };
39 51
40 #endif // XFA_FDE_FDE_RENDER_H_ 52 #endif // XFA_FDE_FDE_RENDER_H_
OLDNEW
« no previous file with comments | « xfa/fde/fde_path.h ('k') | xfa/fde/fde_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698