| 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_FDE_FDE_GEDEVICE_H_ | 7 #ifndef XFA_FDE_FDE_GEDEVICE_H_ |
| 8 #define XFA_FDE_FDE_GEDEVICE_H_ | 8 #define XFA_FDE_FDE_GEDEVICE_H_ |
| 9 | 9 |
| 10 #include "core/fxge/include/fx_ge.h" | 10 #include "core/fxge/include/fx_ge.h" |
| 11 #include "xfa/fgas/crt/fgas_memory.h" | 11 #include "xfa/fgas/crt/fgas_memory.h" |
| 12 | 12 |
| 13 class CFDE_Brush; | 13 class CFDE_Brush; |
| 14 class CFDE_Path; | 14 class CFDE_Path; |
| 15 class CFDE_Pen; | 15 class CFDE_Pen; |
| 16 class IFGAS_Font; | 16 class CFGAS_GEFont; |
| 17 | 17 |
| 18 class CFDE_RenderDevice : public CFX_Target { | 18 class CFDE_RenderDevice : public CFX_Target { |
| 19 public: | 19 public: |
| 20 CFDE_RenderDevice(CFX_RenderDevice* pDevice, FX_BOOL bOwnerDevice); | 20 CFDE_RenderDevice(CFX_RenderDevice* pDevice, FX_BOOL bOwnerDevice); |
| 21 ~CFDE_RenderDevice() override; | 21 ~CFDE_RenderDevice() override; |
| 22 | 22 |
| 23 int32_t GetWidth() const; | 23 int32_t GetWidth() const; |
| 24 int32_t GetHeight() const; | 24 int32_t GetHeight() const; |
| 25 void SaveState(); | 25 void SaveState(); |
| 26 void RestoreState(); | 26 void RestoreState(); |
| 27 FX_BOOL SetClipPath(const CFDE_Path* pClip); | 27 FX_BOOL SetClipPath(const CFDE_Path* pClip); |
| 28 CFDE_Path* GetClipPath() const; | 28 CFDE_Path* GetClipPath() const; |
| 29 FX_BOOL SetClipRect(const CFX_RectF& rtClip); | 29 FX_BOOL SetClipRect(const CFX_RectF& rtClip); |
| 30 const CFX_RectF& GetClipRect(); | 30 const CFX_RectF& GetClipRect(); |
| 31 | 31 |
| 32 FX_FLOAT GetDpiX() const; | 32 FX_FLOAT GetDpiX() const; |
| 33 FX_FLOAT GetDpiY() const; | 33 FX_FLOAT GetDpiY() const; |
| 34 | 34 |
| 35 FX_BOOL DrawImage(CFX_DIBSource* pDib, | 35 FX_BOOL DrawImage(CFX_DIBSource* pDib, |
| 36 const CFX_RectF* pSrcRect, | 36 const CFX_RectF* pSrcRect, |
| 37 const CFX_RectF& dstRect, | 37 const CFX_RectF& dstRect, |
| 38 const CFX_Matrix* pImgMatrix = NULL, | 38 const CFX_Matrix* pImgMatrix = NULL, |
| 39 const CFX_Matrix* pDevMatrix = NULL); | 39 const CFX_Matrix* pDevMatrix = NULL); |
| 40 FX_BOOL DrawString(CFDE_Brush* pBrush, | 40 FX_BOOL DrawString(CFDE_Brush* pBrush, |
| 41 IFGAS_Font* pFont, | 41 CFGAS_GEFont* pFont, |
| 42 const FXTEXT_CHARPOS* pCharPos, | 42 const FXTEXT_CHARPOS* pCharPos, |
| 43 int32_t iCount, | 43 int32_t iCount, |
| 44 FX_FLOAT fFontSize, | 44 FX_FLOAT fFontSize, |
| 45 const CFX_Matrix* pMatrix = NULL); | 45 const CFX_Matrix* pMatrix = NULL); |
| 46 FX_BOOL DrawBezier(CFDE_Pen* pPen, | 46 FX_BOOL DrawBezier(CFDE_Pen* pPen, |
| 47 FX_FLOAT fPenWidth, | 47 FX_FLOAT fPenWidth, |
| 48 const CFX_PointF& pt1, | 48 const CFX_PointF& pt1, |
| 49 const CFX_PointF& pt2, | 49 const CFX_PointF& pt2, |
| 50 const CFX_PointF& pt3, | 50 const CFX_PointF& pt3, |
| 51 const CFX_PointF& pt4, | 51 const CFX_PointF& pt4, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 const CFDE_Path* pPath, | 92 const CFDE_Path* pPath, |
| 93 const CFX_Matrix* pMatrix = NULL); | 93 const CFX_Matrix* pMatrix = NULL); |
| 94 FX_BOOL FillPolygon(CFDE_Brush* pBrush, | 94 FX_BOOL FillPolygon(CFDE_Brush* pBrush, |
| 95 const CFX_PointsF& points, | 95 const CFX_PointsF& points, |
| 96 const CFX_Matrix* pMatrix = NULL); | 96 const CFX_Matrix* pMatrix = NULL); |
| 97 FX_BOOL FillRectangle(CFDE_Brush* pBrush, | 97 FX_BOOL FillRectangle(CFDE_Brush* pBrush, |
| 98 const CFX_RectF& rect, | 98 const CFX_RectF& rect, |
| 99 const CFX_Matrix* pMatrix = NULL); | 99 const CFX_Matrix* pMatrix = NULL); |
| 100 | 100 |
| 101 FX_BOOL DrawSolidString(CFDE_Brush* pBrush, | 101 FX_BOOL DrawSolidString(CFDE_Brush* pBrush, |
| 102 IFGAS_Font* pFont, | 102 CFGAS_GEFont* pFont, |
| 103 const FXTEXT_CHARPOS* pCharPos, | 103 const FXTEXT_CHARPOS* pCharPos, |
| 104 int32_t iCount, | 104 int32_t iCount, |
| 105 FX_FLOAT fFontSize, | 105 FX_FLOAT fFontSize, |
| 106 const CFX_Matrix* pMatrix); | 106 const CFX_Matrix* pMatrix); |
| 107 FX_BOOL DrawStringPath(CFDE_Brush* pBrush, | 107 FX_BOOL DrawStringPath(CFDE_Brush* pBrush, |
| 108 IFGAS_Font* pFont, | 108 CFGAS_GEFont* pFont, |
| 109 const FXTEXT_CHARPOS* pCharPos, | 109 const FXTEXT_CHARPOS* pCharPos, |
| 110 int32_t iCount, | 110 int32_t iCount, |
| 111 FX_FLOAT fFontSize, | 111 FX_FLOAT fFontSize, |
| 112 const CFX_Matrix* pMatrix); | 112 const CFX_Matrix* pMatrix); |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 FX_BOOL CreatePen(CFDE_Pen* pPen, | 115 FX_BOOL CreatePen(CFDE_Pen* pPen, |
| 116 FX_FLOAT fPenWidth, | 116 FX_FLOAT fPenWidth, |
| 117 CFX_GraphStateData& graphState); | 117 CFX_GraphStateData& graphState); |
| 118 | 118 |
| 119 CFX_RenderDevice* m_pDevice; | 119 CFX_RenderDevice* m_pDevice; |
| 120 CFX_RectF m_rtClip; | 120 CFX_RectF m_rtClip; |
| 121 FX_BOOL m_bOwnerDevice; | 121 FX_BOOL m_bOwnerDevice; |
| 122 FXTEXT_CHARPOS* m_pCharPos; | 122 FXTEXT_CHARPOS* m_pCharPos; |
| 123 int32_t m_iCharCount; | 123 int32_t m_iCharCount; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 #endif // XFA_FDE_FDE_GEDEVICE_H_ | 126 #endif // XFA_FDE_FDE_GEDEVICE_H_ |
| OLD | NEW |