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_RENDERDEVICE_H_ | 7 #ifndef XFA_FDE_FDE_RENDERDEVICE_H_ |
8 #define XFA_FDE_FDE_RENDERDEVICE_H_ | 8 #define XFA_FDE_FDE_RENDERDEVICE_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_coordinates.h" | 10 #include "core/fxcrt/include/fx_coordinates.h" |
11 #include "core/fxge/include/fx_font.h" | 11 #include "core/fxge/include/fx_font.h" |
12 #include "core/fxge/include/fx_ge.h" | 12 #include "core/fxge/include/fx_ge.h" |
13 #include "xfa/fde/fde_path.h" | 13 #include "xfa/fde/fde_path.h" |
14 #include "xfa/fgas/font/fgas_font.h" | 14 #include "xfa/fgas/font/fgas_font.h" |
15 | 15 |
16 class IFDE_Pen; | 16 class CFDE_Pen; |
17 class IFDE_Brush; | 17 class CFDE_Brush; |
18 class CFX_DIBitmap; | 18 class CFX_DIBitmap; |
19 class CFX_DIBSource; | 19 class CFX_DIBSource; |
20 | 20 |
21 typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE; | 21 typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE; |
22 | 22 |
23 class IFDE_RenderDevice { | 23 class IFDE_RenderDevice { |
24 public: | 24 public: |
25 static IFDE_RenderDevice* Create(CFX_DIBitmap* pBitmap, | 25 static IFDE_RenderDevice* Create(CFX_DIBitmap* pBitmap, |
26 FX_BOOL bRgbByteOrder = FALSE); | 26 FX_BOOL bRgbByteOrder = FALSE); |
27 static IFDE_RenderDevice* Create(CFX_RenderDevice* pDevice); | 27 static IFDE_RenderDevice* Create(CFX_RenderDevice* pDevice); |
(...skipping 10 matching lines...) Expand all Loading... |
38 virtual const CFX_RectF& GetClipRect() = 0; | 38 virtual const CFX_RectF& GetClipRect() = 0; |
39 | 39 |
40 virtual FX_FLOAT GetDpiX() const = 0; | 40 virtual FX_FLOAT GetDpiX() const = 0; |
41 virtual FX_FLOAT GetDpiY() const = 0; | 41 virtual FX_FLOAT GetDpiY() const = 0; |
42 | 42 |
43 virtual FX_BOOL DrawImage(CFX_DIBSource* pDib, | 43 virtual FX_BOOL DrawImage(CFX_DIBSource* pDib, |
44 const CFX_RectF* pSrcRect, | 44 const CFX_RectF* pSrcRect, |
45 const CFX_RectF& dstRect, | 45 const CFX_RectF& dstRect, |
46 const CFX_Matrix* pImgMatrix = NULL, | 46 const CFX_Matrix* pImgMatrix = NULL, |
47 const CFX_Matrix* pDevMatrix = NULL) = 0; | 47 const CFX_Matrix* pDevMatrix = NULL) = 0; |
48 virtual FX_BOOL DrawString(IFDE_Brush* pBrush, | 48 virtual FX_BOOL DrawString(CFDE_Brush* pBrush, |
49 IFX_Font* pFont, | 49 IFX_Font* pFont, |
50 const FXTEXT_CHARPOS* pCharPos, | 50 const FXTEXT_CHARPOS* pCharPos, |
51 int32_t iCount, | 51 int32_t iCount, |
52 FX_FLOAT fFontSize, | 52 FX_FLOAT fFontSize, |
53 const CFX_Matrix* pMatrix = NULL) = 0; | 53 const CFX_Matrix* pMatrix = NULL) = 0; |
54 virtual FX_BOOL DrawBezier(IFDE_Pen* pPen, | 54 virtual FX_BOOL DrawBezier(CFDE_Pen* pPen, |
55 FX_FLOAT fPenWidth, | 55 FX_FLOAT fPenWidth, |
56 const CFX_PointF& pt1, | 56 const CFX_PointF& pt1, |
57 const CFX_PointF& pt2, | 57 const CFX_PointF& pt2, |
58 const CFX_PointF& pt3, | 58 const CFX_PointF& pt3, |
59 const CFX_PointF& pt4, | 59 const CFX_PointF& pt4, |
60 const CFX_Matrix* pMatrix = NULL) = 0; | 60 const CFX_Matrix* pMatrix = NULL) = 0; |
61 virtual FX_BOOL DrawCurve(IFDE_Pen* pPen, | 61 virtual FX_BOOL DrawCurve(CFDE_Pen* pPen, |
62 FX_FLOAT fPenWidth, | 62 FX_FLOAT fPenWidth, |
63 const CFX_PointsF& points, | 63 const CFX_PointsF& points, |
64 FX_BOOL bClosed, | 64 FX_BOOL bClosed, |
65 FX_FLOAT fTension = 0.5f, | 65 FX_FLOAT fTension = 0.5f, |
66 const CFX_Matrix* pMatrix = NULL) = 0; | 66 const CFX_Matrix* pMatrix = NULL) = 0; |
67 virtual FX_BOOL DrawEllipse(IFDE_Pen* pPen, | 67 virtual FX_BOOL DrawEllipse(CFDE_Pen* pPen, |
68 FX_FLOAT fPenWidth, | 68 FX_FLOAT fPenWidth, |
69 const CFX_RectF& rect, | 69 const CFX_RectF& rect, |
70 const CFX_Matrix* pMatrix = NULL) = 0; | 70 const CFX_Matrix* pMatrix = NULL) = 0; |
71 virtual FX_BOOL DrawLines(IFDE_Pen* pPen, | 71 virtual FX_BOOL DrawLines(CFDE_Pen* pPen, |
72 FX_FLOAT fPenWidth, | 72 FX_FLOAT fPenWidth, |
73 const CFX_PointsF& points, | 73 const CFX_PointsF& points, |
74 const CFX_Matrix* pMatrix = NULL) = 0; | 74 const CFX_Matrix* pMatrix = NULL) = 0; |
75 virtual FX_BOOL DrawLine(IFDE_Pen* pPen, | 75 virtual FX_BOOL DrawLine(CFDE_Pen* pPen, |
76 FX_FLOAT fPenWidth, | 76 FX_FLOAT fPenWidth, |
77 const CFX_PointF& pt1, | 77 const CFX_PointF& pt1, |
78 const CFX_PointF& pt2, | 78 const CFX_PointF& pt2, |
79 const CFX_Matrix* pMatrix = NULL) = 0; | 79 const CFX_Matrix* pMatrix = NULL) = 0; |
80 virtual FX_BOOL DrawPath(IFDE_Pen* pPen, | 80 virtual FX_BOOL DrawPath(CFDE_Pen* pPen, |
81 FX_FLOAT fPenWidth, | 81 FX_FLOAT fPenWidth, |
82 const IFDE_Path* pPath, | 82 const IFDE_Path* pPath, |
83 const CFX_Matrix* pMatrix = NULL) = 0; | 83 const CFX_Matrix* pMatrix = NULL) = 0; |
84 virtual FX_BOOL DrawPolygon(IFDE_Pen* pPen, | 84 virtual FX_BOOL DrawPolygon(CFDE_Pen* pPen, |
85 FX_FLOAT fPenWidth, | 85 FX_FLOAT fPenWidth, |
86 const CFX_PointsF& points, | 86 const CFX_PointsF& points, |
87 const CFX_Matrix* pMatrix = NULL) = 0; | 87 const CFX_Matrix* pMatrix = NULL) = 0; |
88 virtual FX_BOOL DrawRectangle(IFDE_Pen* pPen, | 88 virtual FX_BOOL DrawRectangle(CFDE_Pen* pPen, |
89 FX_FLOAT fPenWidth, | 89 FX_FLOAT fPenWidth, |
90 const CFX_RectF& rect, | 90 const CFX_RectF& rect, |
91 const CFX_Matrix* pMatrix = NULL) = 0; | 91 const CFX_Matrix* pMatrix = NULL) = 0; |
92 virtual FX_BOOL FillClosedCurve(IFDE_Brush* pBrush, | 92 virtual FX_BOOL FillClosedCurve(CFDE_Brush* pBrush, |
93 const CFX_PointsF& points, | 93 const CFX_PointsF& points, |
94 FX_FLOAT fTension = 0.5f, | 94 FX_FLOAT fTension = 0.5f, |
95 const CFX_Matrix* pMatrix = NULL) = 0; | 95 const CFX_Matrix* pMatrix = NULL) = 0; |
96 virtual FX_BOOL FillEllipse(IFDE_Brush* pBrush, | 96 virtual FX_BOOL FillEllipse(CFDE_Brush* pBrush, |
97 const CFX_RectF& rect, | 97 const CFX_RectF& rect, |
98 const CFX_Matrix* pMatrix = NULL) = 0; | 98 const CFX_Matrix* pMatrix = NULL) = 0; |
99 virtual FX_BOOL FillPath(IFDE_Brush* pBrush, | 99 virtual FX_BOOL FillPath(CFDE_Brush* pBrush, |
100 const IFDE_Path* pPath, | 100 const IFDE_Path* pPath, |
101 const CFX_Matrix* pMatrix = NULL) = 0; | 101 const CFX_Matrix* pMatrix = NULL) = 0; |
102 virtual FX_BOOL FillPolygon(IFDE_Brush* pBrush, | 102 virtual FX_BOOL FillPolygon(CFDE_Brush* pBrush, |
103 const CFX_PointsF& points, | 103 const CFX_PointsF& points, |
104 const CFX_Matrix* pMatrix = NULL) = 0; | 104 const CFX_Matrix* pMatrix = NULL) = 0; |
105 virtual FX_BOOL FillRectangle(IFDE_Brush* pBrush, | 105 virtual FX_BOOL FillRectangle(CFDE_Brush* pBrush, |
106 const CFX_RectF& rect, | 106 const CFX_RectF& rect, |
107 const CFX_Matrix* pMatrix = NULL) = 0; | 107 const CFX_Matrix* pMatrix = NULL) = 0; |
108 }; | 108 }; |
109 | 109 |
110 #endif // XFA_FDE_FDE_RENDERDEVICE_H_ | 110 #endif // XFA_FDE_FDE_RENDERDEVICE_H_ |
OLD | NEW |