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" |
(...skipping 17 matching lines...) Expand all Loading... |
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 = nullptr, |
39 const CFX_Matrix* pDevMatrix = NULL); | 39 const CFX_Matrix* pDevMatrix = nullptr); |
40 FX_BOOL DrawString(CFDE_Brush* pBrush, | 40 FX_BOOL DrawString(CFDE_Brush* pBrush, |
41 IFGAS_Font* pFont, | 41 IFGAS_Font* 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 = nullptr); |
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, |
52 const CFX_Matrix* pMatrix = NULL); | 52 const CFX_Matrix* pMatrix = nullptr); |
53 FX_BOOL DrawCurve(CFDE_Pen* pPen, | 53 FX_BOOL DrawCurve(CFDE_Pen* pPen, |
54 FX_FLOAT fPenWidth, | 54 FX_FLOAT fPenWidth, |
55 const CFX_PointsF& points, | 55 const CFX_PointsF& points, |
56 FX_BOOL bClosed, | 56 FX_BOOL bClosed, |
57 FX_FLOAT fTension = 0.5f, | 57 FX_FLOAT fTension = 0.5f, |
58 const CFX_Matrix* pMatrix = NULL); | 58 const CFX_Matrix* pMatrix = nullptr); |
59 FX_BOOL DrawEllipse(CFDE_Pen* pPen, | 59 FX_BOOL DrawEllipse(CFDE_Pen* pPen, |
60 FX_FLOAT fPenWidth, | 60 FX_FLOAT fPenWidth, |
61 const CFX_RectF& rect, | 61 const CFX_RectF& rect, |
62 const CFX_Matrix* pMatrix = NULL); | 62 const CFX_Matrix* pMatrix = nullptr); |
63 FX_BOOL DrawLines(CFDE_Pen* pPen, | 63 FX_BOOL DrawLines(CFDE_Pen* pPen, |
64 FX_FLOAT fPenWidth, | 64 FX_FLOAT fPenWidth, |
65 const CFX_PointsF& points, | 65 const CFX_PointsF& points, |
66 const CFX_Matrix* pMatrix = NULL); | 66 const CFX_Matrix* pMatrix = nullptr); |
67 FX_BOOL DrawLine(CFDE_Pen* pPen, | 67 FX_BOOL DrawLine(CFDE_Pen* pPen, |
68 FX_FLOAT fPenWidth, | 68 FX_FLOAT fPenWidth, |
69 const CFX_PointF& pt1, | 69 const CFX_PointF& pt1, |
70 const CFX_PointF& pt2, | 70 const CFX_PointF& pt2, |
71 const CFX_Matrix* pMatrix = NULL); | 71 const CFX_Matrix* pMatrix = nullptr); |
72 FX_BOOL DrawPath(CFDE_Pen* pPen, | 72 FX_BOOL DrawPath(CFDE_Pen* pPen, |
73 FX_FLOAT fPenWidth, | 73 FX_FLOAT fPenWidth, |
74 const CFDE_Path* pPath, | 74 const CFDE_Path* pPath, |
75 const CFX_Matrix* pMatrix = NULL); | 75 const CFX_Matrix* pMatrix = nullptr); |
76 FX_BOOL DrawPolygon(CFDE_Pen* pPen, | 76 FX_BOOL DrawPolygon(CFDE_Pen* pPen, |
77 FX_FLOAT fPenWidth, | 77 FX_FLOAT fPenWidth, |
78 const CFX_PointsF& points, | 78 const CFX_PointsF& points, |
79 const CFX_Matrix* pMatrix = NULL); | 79 const CFX_Matrix* pMatrix = nullptr); |
80 FX_BOOL DrawRectangle(CFDE_Pen* pPen, | 80 FX_BOOL DrawRectangle(CFDE_Pen* pPen, |
81 FX_FLOAT fPenWidth, | 81 FX_FLOAT fPenWidth, |
82 const CFX_RectF& rect, | 82 const CFX_RectF& rect, |
83 const CFX_Matrix* pMatrix = NULL); | 83 const CFX_Matrix* pMatrix = nullptr); |
84 FX_BOOL FillClosedCurve(CFDE_Brush* pBrush, | 84 FX_BOOL FillClosedCurve(CFDE_Brush* pBrush, |
85 const CFX_PointsF& points, | 85 const CFX_PointsF& points, |
86 FX_FLOAT fTension = 0.5f, | 86 FX_FLOAT fTension = 0.5f, |
87 const CFX_Matrix* pMatrix = NULL); | 87 const CFX_Matrix* pMatrix = nullptr); |
88 FX_BOOL FillEllipse(CFDE_Brush* pBrush, | 88 FX_BOOL FillEllipse(CFDE_Brush* pBrush, |
89 const CFX_RectF& rect, | 89 const CFX_RectF& rect, |
90 const CFX_Matrix* pMatrix = NULL); | 90 const CFX_Matrix* pMatrix = nullptr); |
91 FX_BOOL FillPath(CFDE_Brush* pBrush, | 91 FX_BOOL FillPath(CFDE_Brush* pBrush, |
92 const CFDE_Path* pPath, | 92 const CFDE_Path* pPath, |
93 const CFX_Matrix* pMatrix = NULL); | 93 const CFX_Matrix* pMatrix = nullptr); |
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 = nullptr); |
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 = nullptr); |
100 | 100 |
101 FX_BOOL DrawSolidString(CFDE_Brush* pBrush, | 101 FX_BOOL DrawSolidString(CFDE_Brush* pBrush, |
102 IFGAS_Font* pFont, | 102 IFGAS_Font* 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 IFGAS_Font* 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 |