| OLD | NEW |
| 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_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ | 7 #ifndef XFA_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ |
| 8 #define XFA_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ | 8 #define XFA_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "xfa/fxfa/include/fxfa.h" | 12 #include "xfa/fxfa/include/fxfa.h" |
| 13 | 13 |
| 14 class CXFA_RenderOptions { |
| 15 public: |
| 16 CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {} |
| 17 |
| 18 FX_BOOL m_bPrint; |
| 19 FX_BOOL m_bHighlight; |
| 20 }; |
| 21 |
| 14 class CXFA_RenderContext { | 22 class CXFA_RenderContext { |
| 15 public: | 23 public: |
| 16 CXFA_RenderContext(); | 24 CXFA_RenderContext(); |
| 17 ~CXFA_RenderContext(); | 25 ~CXFA_RenderContext(); |
| 18 | 26 |
| 19 int32_t StartRender(CXFA_FFPageView* pPageView, | 27 int32_t StartRender(CXFA_FFPageView* pPageView, |
| 20 CFX_Graphics* pGS, | 28 CFX_Graphics* pGS, |
| 21 const CFX_Matrix& matrix, | 29 const CFX_Matrix& matrix, |
| 22 const CXFA_RenderOptions& options); | 30 const CXFA_RenderOptions& options); |
| 23 int32_t DoRender(IFX_Pause* pPause = NULL); | 31 int32_t DoRender(IFX_Pause* pPause = NULL); |
| 24 void StopRender(); | 32 void StopRender(); |
| 25 | 33 |
| 26 protected: | 34 protected: |
| 27 std::unique_ptr<IXFA_WidgetIterator> m_pWidgetIterator; | 35 std::unique_ptr<IXFA_WidgetIterator> m_pWidgetIterator; |
| 28 CXFA_FFWidget* m_pWidget; | 36 CXFA_FFWidget* m_pWidget; |
| 29 CXFA_FFPageView* m_pPageView; | 37 CXFA_FFPageView* m_pPageView; |
| 30 CFX_Graphics* m_pGS; | 38 CFX_Graphics* m_pGS; |
| 31 CFX_Matrix m_matrix; | 39 CFX_Matrix m_matrix; |
| 32 CXFA_RenderOptions m_options; | 40 CXFA_RenderOptions m_options; |
| 33 uint32_t m_dwStatus; | 41 uint32_t m_dwStatus; |
| 34 CFX_RectF m_rtClipRect; | 42 CFX_RectF m_rtClipRect; |
| 35 }; | 43 }; |
| 36 | 44 |
| 37 #endif // XFA_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ | 45 #endif // XFA_FXFA_INCLUDE_XFA_RENDERCONTEXT_H_ |
| OLD | NEW |