Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fdp / src / fde / fde_render.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FDE_RENDER_IMP\r
8 #define _FDE_RENDER_IMP\r
9 class CFDE_RenderContext;\r
10 class CFDE_RenderContext : public IFDE_RenderContext, public CFX_ThreadLock, public CFX_Target\r
11 {\r
12 public:\r
13     CFDE_RenderContext();\r
14     virtual ~CFDE_RenderContext();\r
15     virtual void                                Release()\r
16     {\r
17         FDE_Delete this;\r
18     }\r
19     virtual FX_BOOL                             StartRender(IFDE_RenderDevice *pRenderDevice,\r
20                                             IFDE_CanvasSet *pCanvasSet,\r
21                                             const CFX_Matrix &tmDoc2Device\r
22                                   );\r
23     virtual FDE_RENDERSTATUS    GetStatus() const\r
24     {\r
25         return m_eStatus;\r
26     }\r
27     virtual FDE_RENDERSTATUS    DoRender(IFX_Pause *pPause = NULL);\r
28     virtual void                                StopRender();\r
29     void                                RenderPath(IFDE_PathSet *pPathSet, FDE_HVISUALOBJ hPath);\r
30     void                                RenderText(IFDE_TextSet *pTextSet, FDE_HVISUALOBJ hText);\r
31     FX_BOOL                             ApplyClip(IFDE_VisualSet *pVisualSet, FDE_HVISUALOBJ hObj, FDE_HDEVICESTATE &hState);\r
32     void                                RestoreClip(FDE_HDEVICESTATE hState);\r
33 protected:\r
34     FDE_RENDERSTATUS            m_eStatus;\r
35     IFDE_RenderDevice           *m_pRenderDevice;\r
36     IFDE_SolidBrush                     *m_pSolidBrush;\r
37     CFX_Matrix                          m_Transform;\r
38     FXTEXT_CHARPOS                      *m_pCharPos;\r
39     FX_INT32                            m_iCharPosCount;\r
40     IFDE_VisualSetIterator      *m_pIterator;\r
41 };\r
42 #endif\r