• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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 _FDE_RENDER_IMP
8 #define _FDE_RENDER_IMP
9 class CFDE_RenderContext;
10 class CFDE_RenderContext : public IFDE_RenderContext,
11                            public CFX_ThreadLock,
12                            public CFX_Target {
13  public:
14   CFDE_RenderContext();
15   virtual ~CFDE_RenderContext();
Release()16   virtual void Release() { delete this; }
17   virtual FX_BOOL StartRender(IFDE_RenderDevice* pRenderDevice,
18                               IFDE_CanvasSet* pCanvasSet,
19                               const CFX_Matrix& tmDoc2Device);
GetStatus()20   virtual FDE_RENDERSTATUS GetStatus() const { return m_eStatus; }
21   virtual FDE_RENDERSTATUS DoRender(IFX_Pause* pPause = NULL);
22   virtual void StopRender();
23   void RenderPath(IFDE_PathSet* pPathSet, FDE_HVISUALOBJ hPath);
24   void RenderText(IFDE_TextSet* pTextSet, FDE_HVISUALOBJ hText);
25   FX_BOOL ApplyClip(IFDE_VisualSet* pVisualSet,
26                     FDE_HVISUALOBJ hObj,
27                     FDE_HDEVICESTATE& hState);
28   void RestoreClip(FDE_HDEVICESTATE hState);
29 
30  protected:
31   FDE_RENDERSTATUS m_eStatus;
32   IFDE_RenderDevice* m_pRenderDevice;
33   IFDE_SolidBrush* m_pSolidBrush;
34   CFX_Matrix m_Transform;
35   FXTEXT_CHARPOS* m_pCharPos;
36   int32_t m_iCharPosCount;
37   IFDE_VisualSetIterator* m_pIterator;
38 };
39 #endif
40