Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: xfa/fde/fde_renderdevice.h

Issue 1896893003: Cleanup FDE interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fde/fde_render.cpp ('k') | xfa/fde/fde_visualset.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef XFA_FDE_FDE_RENDERDEVICE_H_
8 #define XFA_FDE_FDE_RENDERDEVICE_H_
9
10 #include "core/fxcrt/include/fx_coordinates.h"
11 #include "core/fxge/include/fx_font.h"
12 #include "core/fxge/include/fx_ge.h"
13 #include "xfa/fde/fde_path.h"
14 #include "xfa/fgas/font/fgas_font.h"
15
16 class CFDE_Pen;
17 class CFDE_Brush;
18 class CFX_DIBitmap;
19 class CFX_DIBSource;
20
21 typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE;
22
23 class IFDE_RenderDevice {
24 public:
25 static IFDE_RenderDevice* Create(CFX_DIBitmap* pBitmap,
26 FX_BOOL bRgbByteOrder = FALSE);
27 static IFDE_RenderDevice* Create(CFX_RenderDevice* pDevice);
28 virtual ~IFDE_RenderDevice() {}
29 virtual void Release() = 0;
30
31 virtual int32_t GetWidth() const = 0;
32 virtual int32_t GetHeight() const = 0;
33 virtual FDE_HDEVICESTATE SaveState() = 0;
34 virtual void RestoreState(FDE_HDEVICESTATE hState) = 0;
35 virtual FX_BOOL SetClipPath(const IFDE_Path* pClip) = 0;
36 virtual IFDE_Path* GetClipPath() const = 0;
37 virtual FX_BOOL SetClipRect(const CFX_RectF& rtClip) = 0;
38 virtual const CFX_RectF& GetClipRect() = 0;
39
40 virtual FX_FLOAT GetDpiX() const = 0;
41 virtual FX_FLOAT GetDpiY() const = 0;
42
43 virtual FX_BOOL DrawImage(CFX_DIBSource* pDib,
44 const CFX_RectF* pSrcRect,
45 const CFX_RectF& dstRect,
46 const CFX_Matrix* pImgMatrix = NULL,
47 const CFX_Matrix* pDevMatrix = NULL) = 0;
48 virtual FX_BOOL DrawString(CFDE_Brush* pBrush,
49 IFX_Font* pFont,
50 const FXTEXT_CHARPOS* pCharPos,
51 int32_t iCount,
52 FX_FLOAT fFontSize,
53 const CFX_Matrix* pMatrix = NULL) = 0;
54 virtual FX_BOOL DrawBezier(CFDE_Pen* pPen,
55 FX_FLOAT fPenWidth,
56 const CFX_PointF& pt1,
57 const CFX_PointF& pt2,
58 const CFX_PointF& pt3,
59 const CFX_PointF& pt4,
60 const CFX_Matrix* pMatrix = NULL) = 0;
61 virtual FX_BOOL DrawCurve(CFDE_Pen* pPen,
62 FX_FLOAT fPenWidth,
63 const CFX_PointsF& points,
64 FX_BOOL bClosed,
65 FX_FLOAT fTension = 0.5f,
66 const CFX_Matrix* pMatrix = NULL) = 0;
67 virtual FX_BOOL DrawEllipse(CFDE_Pen* pPen,
68 FX_FLOAT fPenWidth,
69 const CFX_RectF& rect,
70 const CFX_Matrix* pMatrix = NULL) = 0;
71 virtual FX_BOOL DrawLines(CFDE_Pen* pPen,
72 FX_FLOAT fPenWidth,
73 const CFX_PointsF& points,
74 const CFX_Matrix* pMatrix = NULL) = 0;
75 virtual FX_BOOL DrawLine(CFDE_Pen* pPen,
76 FX_FLOAT fPenWidth,
77 const CFX_PointF& pt1,
78 const CFX_PointF& pt2,
79 const CFX_Matrix* pMatrix = NULL) = 0;
80 virtual FX_BOOL DrawPath(CFDE_Pen* pPen,
81 FX_FLOAT fPenWidth,
82 const IFDE_Path* pPath,
83 const CFX_Matrix* pMatrix = NULL) = 0;
84 virtual FX_BOOL DrawPolygon(CFDE_Pen* pPen,
85 FX_FLOAT fPenWidth,
86 const CFX_PointsF& points,
87 const CFX_Matrix* pMatrix = NULL) = 0;
88 virtual FX_BOOL DrawRectangle(CFDE_Pen* pPen,
89 FX_FLOAT fPenWidth,
90 const CFX_RectF& rect,
91 const CFX_Matrix* pMatrix = NULL) = 0;
92 virtual FX_BOOL FillClosedCurve(CFDE_Brush* pBrush,
93 const CFX_PointsF& points,
94 FX_FLOAT fTension = 0.5f,
95 const CFX_Matrix* pMatrix = NULL) = 0;
96 virtual FX_BOOL FillEllipse(CFDE_Brush* pBrush,
97 const CFX_RectF& rect,
98 const CFX_Matrix* pMatrix = NULL) = 0;
99 virtual FX_BOOL FillPath(CFDE_Brush* pBrush,
100 const IFDE_Path* pPath,
101 const CFX_Matrix* pMatrix = NULL) = 0;
102 virtual FX_BOOL FillPolygon(CFDE_Brush* pBrush,
103 const CFX_PointsF& points,
104 const CFX_Matrix* pMatrix = NULL) = 0;
105 virtual FX_BOOL FillRectangle(CFDE_Brush* pBrush,
106 const CFX_RectF& rect,
107 const CFX_Matrix* pMatrix = NULL) = 0;
108 };
109
110 #endif // XFA_FDE_FDE_RENDERDEVICE_H_
OLDNEW
« no previous file with comments | « xfa/fde/fde_render.cpp ('k') | xfa/fde/fde_visualset.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698