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 _FDE_FXGEDEVICE_IMP | 7 #ifndef _FDE_FXGEDEVICE_IMP |
8 #define _FDE_FXGEDEVICE_IMP | 8 #define _FDE_FXGEDEVICE_IMP |
9 #ifndef _FDEPLUS | 9 #ifndef _FDEPLUS |
10 class CFDE_FxgeDevice : public IFDE_RenderDevice, public CFX_Target | 10 class CFDE_FxgeDevice : public IFDE_RenderDevice, public CFX_Target |
11 { | 11 { |
12 public: | 12 public: |
13 CFDE_FxgeDevice(CFX_RenderDevice *pDevice, FX_BOOL bOwnerDevice); | 13 CFDE_FxgeDevice(CFX_RenderDevice *pDevice, FX_BOOL bOwnerDevice); |
14 ~CFDE_FxgeDevice(); | 14 ~CFDE_FxgeDevice(); |
15 virtual void Release() | 15 virtual void Release() |
16 { | 16 { |
17 FDE_Delete this; | 17 FDE_Delete this; |
18 } | 18 } |
19 | 19 |
20 virtual FX_INT32» » » GetWidth() const; | 20 virtual int32_t» » » GetWidth() const; |
21 virtual FX_INT32» » » GetHeight() const; | 21 virtual int32_t» » » GetHeight() const; |
22 virtual FDE_HDEVICESTATE SaveState(); | 22 virtual FDE_HDEVICESTATE SaveState(); |
23 virtual void RestoreState(FDE_HDEVICESTATE hS
tate); | 23 virtual void RestoreState(FDE_HDEVICESTATE hS
tate); |
24 virtual FX_BOOL SetClipPath(const IFDE_Path *pCl
ip); | 24 virtual FX_BOOL SetClipPath(const IFDE_Path *pCl
ip); |
25 virtual IFDE_Path* GetClipPath() const; | 25 virtual IFDE_Path* GetClipPath() const; |
26 virtual FX_BOOL SetClipRect(const CFX_RectF &rtC
lip); | 26 virtual FX_BOOL SetClipRect(const CFX_RectF &rtC
lip); |
27 virtual const CFX_RectF& GetClipRect(); | 27 virtual const CFX_RectF& GetClipRect(); |
28 | 28 |
29 virtual FX_FLOAT GetDpiX() const; | 29 virtual FX_FLOAT GetDpiX() const; |
30 virtual FX_FLOAT GetDpiY() const; | 30 virtual FX_FLOAT GetDpiY() const; |
31 | 31 |
32 virtual FX_BOOL DrawImage(CFX_DIBSource *pDib, c
onst CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix
= NULL, const CFX_Matrix *pDevMatrix = NULL); | 32 virtual FX_BOOL DrawImage(CFX_DIBSource *pDib, c
onst CFX_RectF *pSrcRect, const CFX_RectF &dstRect, const CFX_Matrix *pImgMatrix
= NULL, const CFX_Matrix *pDevMatrix = NULL); |
33 virtual FX_BOOL» » » » DrawString(IFDE_Brush *pBrush, I
FX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_FLOAT fFontS
ize, const CFX_Matrix *pMatrix = NULL); | 33 virtual FX_BOOL» » » » DrawString(IFDE_Brush *pBrush, I
FX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_FLOAT fFontSi
ze, const CFX_Matrix *pMatrix = NULL); |
34 virtual FX_BOOL DrawBezier(IFDE_Pen *pPen, FX_FL
OAT fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_PointF &p
t3, const CFX_PointF &pt4, const CFX_Matrix *pMatrix = NULL); | 34 virtual FX_BOOL DrawBezier(IFDE_Pen *pPen, FX_FL
OAT fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_PointF &p
t3, const CFX_PointF &pt4, const CFX_Matrix *pMatrix = NULL); |
35 virtual FX_BOOL DrawCurve(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension = 0.
5f, const CFX_Matrix *pMatrix = NULL); | 35 virtual FX_BOOL DrawCurve(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, FX_BOOL bClosed, FX_FLOAT fTension = 0.
5f, const CFX_Matrix *pMatrix = NULL); |
36 virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); | 36 virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); |
37 virtual FX_BOOL DrawLines(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); | 37 virtual FX_BOOL DrawLines(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); |
38 virtual FX_BOOL DrawLine(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_Matrix *pMa
trix = NULL); | 38 virtual FX_BOOL DrawLine(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const CFX_PointF &pt1, const CFX_PointF &pt2, const CFX_Matrix *pMa
trix = NULL); |
39 virtual FX_BOOL DrawPath(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL); | 39 virtual FX_BOOL DrawPath(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL); |
40 virtual FX_BOOL DrawPolygon(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); | 40 virtual FX_BOOL DrawPolygon(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); |
41 virtual FX_BOOL DrawRectangle(IFDE_Pen *pPen, FX
_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); | 41 virtual FX_BOOL DrawRectangle(IFDE_Pen *pPen, FX
_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); |
42 virtual FX_BOOL FillClosedCurve(IFDE_Brush *pBru
sh, const CFX_PointsF &points, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatr
ix = NULL); | 42 virtual FX_BOOL FillClosedCurve(IFDE_Brush *pBru
sh, const CFX_PointsF &points, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatr
ix = NULL); |
43 virtual FX_BOOL FillEllipse(IFDE_Brush* pBrush,
const CFX_RectF& rect, const CFX_Matrix *pMatrix = NULL); | 43 virtual FX_BOOL FillEllipse(IFDE_Brush* pBrush,
const CFX_RectF& rect, const CFX_Matrix *pMatrix = NULL); |
44 virtual FX_BOOL FillPath(IFDE_Brush *pBrush, con
st IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL); | 44 virtual FX_BOOL FillPath(IFDE_Brush *pBrush, con
st IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL); |
45 virtual FX_BOOL FillPolygon(IFDE_Brush *pBrush,
const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); | 45 virtual FX_BOOL FillPolygon(IFDE_Brush *pBrush,
const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL); |
46 virtual FX_BOOL FillRectangle(IFDE_Brush *pBrush
, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); | 46 virtual FX_BOOL FillRectangle(IFDE_Brush *pBrush
, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL); |
47 FX_BOOL FillSolidPath(IFDE_Brush
*pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); | 47 FX_BOOL FillSolidPath(IFDE_Brush
*pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); |
48 FX_BOOL FillHatchPath(IFDE_Brush
*pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); | 48 FX_BOOL FillHatchPath(IFDE_Brush
*pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); |
49 FX_BOOL FillTexturePath(IFDE_Bru
sh *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); | 49 FX_BOOL FillTexturePath(IFDE_Bru
sh *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); |
50 FX_BOOL FillLinearGradientPath(I
FDE_Brush *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); | 50 FX_BOOL FillLinearGradientPath(I
FDE_Brush *pBrush, const CFX_PathData *pPath, const CFX_Matrix *pMatrix); |
51 FX_BOOL» » » » » » DrawSolidString(IFDE_Bru
sh *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX
_FLOAT fFontSize, const CFX_Matrix *pMatrix); | 51 FX_BOOL» » » » » » DrawSolidString(IFDE_Bru
sh *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_
FLOAT fFontSize, const CFX_Matrix *pMatrix); |
52 FX_BOOL» » » » » » DrawStringPath(IFDE_Brus
h *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, FX_INT32 iCount, FX_
FLOAT fFontSize, const CFX_Matrix *pMatrix); | 52 FX_BOOL» » » » » » DrawStringPath(IFDE_Brus
h *pBrush, IFX_Font *pFont, const FXTEXT_CHARPOS *pCharPos, int32_t iCount, FX_F
LOAT fFontSize, const CFX_Matrix *pMatrix); |
53 protected: | 53 protected: |
54 FX_BOOL CreatePen(IFDE_Pen *pPen
, FX_FLOAT fPenWidth, CFX_GraphStateData &graphState); | 54 FX_BOOL CreatePen(IFDE_Pen *pPen
, FX_FLOAT fPenWidth, CFX_GraphStateData &graphState); |
55 FX_BOOL» » » » » » WrapTexture(FX_INT32 iWr
apMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix
*pMatrix); | 55 FX_BOOL» » » » » » WrapTexture(int32_t iWra
pMode, const CFX_DIBitmap *pBitmap, const CFX_PathData *pPath, const CFX_Matrix
*pMatrix); |
56 CFX_RenderDevice *m_pDevice; | 56 CFX_RenderDevice *m_pDevice; |
57 CFX_RectF m_rtClip; | 57 CFX_RectF m_rtClip; |
58 FX_BOOL m_bOwnerDevice; | 58 FX_BOOL m_bOwnerDevice; |
59 FXTEXT_CHARPOS *m_pCharPos; | 59 FXTEXT_CHARPOS *m_pCharPos; |
60 FX_INT32» » » » » m_iCharCount; | 60 int32_t» » » » » m_iCharCount; |
61 }; | 61 }; |
62 #endif | 62 #endif |
63 #endif | 63 #endif |
OLD | NEW |