| 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_RENDERDEVICE | 7 #ifndef _FDE_RENDERDEVICE |
| 8 #define _FDE_RENDERDEVICE | 8 #define _FDE_RENDERDEVICE |
| 9 class IFDE_Pen; | 9 class IFDE_Pen; |
| 10 class IFDE_Brush; | 10 class IFDE_Brush; |
| 11 class IFDE_Image; | 11 class IFDE_Image; |
| 12 class CFX_DIBitmap; | 12 class CFX_DIBitmap; |
| 13 class CFX_DIBSource; | 13 class CFX_DIBSource; |
| 14 class IFDE_RenderDevice; | 14 class IFDE_RenderDevice; |
| 15 typedef struct _FDE_HDEVICESTATE { | 15 typedef struct _FDE_HDEVICESTATE { |
| 16 FX_LPVOID pData; | 16 FX_LPVOID pData; |
| 17 } * FDE_HDEVICESTATE; | 17 } * FDE_HDEVICESTATE; |
| 18 class IFDE_RenderDevice | 18 class IFDE_RenderDevice |
| 19 { | 19 { |
| 20 public: | 20 public: |
| 21 static IFDE_RenderDevice* Create(CFX_DIBitmap *pBitmap, FX_BOOL bRgbByteOr
der = FALSE); | 21 static IFDE_RenderDevice* Create(CFX_DIBitmap *pBitmap, FX_BOOL bRgbByteOr
der = FALSE); |
| 22 static IFDE_RenderDevice* Create(CFX_RenderDevice *pDevice); | 22 static IFDE_RenderDevice* Create(CFX_RenderDevice *pDevice); |
| 23 virtual void Release() = 0; | 23 virtual void Release() = 0; |
| 24 | 24 |
| 25 virtual FX_INT32» » » GetWidth() const = 0; | 25 virtual int32_t» » » GetWidth() const = 0; |
| 26 virtual FX_INT32» » » GetHeight() const = 0; | 26 virtual int32_t» » » GetHeight() const = 0; |
| 27 virtual FDE_HDEVICESTATE SaveState() = 0; | 27 virtual FDE_HDEVICESTATE SaveState() = 0; |
| 28 virtual void RestoreState(FDE_HDEVICESTATE hS
tate) = 0; | 28 virtual void RestoreState(FDE_HDEVICESTATE hS
tate) = 0; |
| 29 virtual FX_BOOL SetClipPath(const IFDE_Path *pCl
ip) = 0; | 29 virtual FX_BOOL SetClipPath(const IFDE_Path *pCl
ip) = 0; |
| 30 virtual IFDE_Path* GetClipPath() const = 0; | 30 virtual IFDE_Path* GetClipPath() const = 0; |
| 31 virtual FX_BOOL SetClipRect(const CFX_RectF &rtC
lip) = 0; | 31 virtual FX_BOOL SetClipRect(const CFX_RectF &rtC
lip) = 0; |
| 32 virtual const CFX_RectF& GetClipRect() = 0; | 32 virtual const CFX_RectF& GetClipRect() = 0; |
| 33 | 33 |
| 34 virtual FX_FLOAT GetDpiX() const = 0; | 34 virtual FX_FLOAT GetDpiX() const = 0; |
| 35 virtual FX_FLOAT GetDpiY() const = 0; | 35 virtual FX_FLOAT GetDpiY() const = 0; |
| 36 | 36 |
| 37 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) = 0; | 37 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) = 0; |
| 38 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) = 0; | 38 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) = 0; |
| 39 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) = 0; | 39 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) = 0; |
| 40 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) = 0; | 40 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) = 0; |
| 41 virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; | 41 virtual FX_BOOL DrawEllipse(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; |
| 42 virtual FX_BOOL DrawLines(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0; | 42 virtual FX_BOOL DrawLines(IFDE_Pen *pPen, FX_FLO
AT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0; |
| 43 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) = 0; | 43 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) = 0; |
| 44 virtual FX_BOOL DrawPath(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL) = 0; | 44 virtual FX_BOOL DrawPath(IFDE_Pen *pPen, FX_FLOA
T fPenWidth, const IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL) = 0; |
| 45 virtual FX_BOOL DrawPolygon(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0
; | 45 virtual FX_BOOL DrawPolygon(IFDE_Pen *pPen, FX_F
LOAT fPenWidth, const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0
; |
| 46 virtual FX_BOOL DrawRectangle(IFDE_Pen *pPen, FX
_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; | 46 virtual FX_BOOL DrawRectangle(IFDE_Pen *pPen, FX
_FLOAT fPenWidth, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; |
| 47 virtual FX_BOOL FillClosedCurve(IFDE_Brush *pBru
sh, const CFX_PointsF &points, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatr
ix = NULL) = 0; | 47 virtual FX_BOOL FillClosedCurve(IFDE_Brush *pBru
sh, const CFX_PointsF &points, FX_FLOAT fTension = 0.5f, const CFX_Matrix *pMatr
ix = NULL) = 0; |
| 48 virtual FX_BOOL FillEllipse(IFDE_Brush* pBrush,
const CFX_RectF& rect, const CFX_Matrix *pMatrix = NULL) = 0; | 48 virtual FX_BOOL FillEllipse(IFDE_Brush* pBrush,
const CFX_RectF& rect, const CFX_Matrix *pMatrix = NULL) = 0; |
| 49 virtual FX_BOOL FillPath(IFDE_Brush *pBrush, con
st IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL) = 0; | 49 virtual FX_BOOL FillPath(IFDE_Brush *pBrush, con
st IFDE_Path *pPath, const CFX_Matrix *pMatrix = NULL) = 0; |
| 50 virtual FX_BOOL FillPolygon(IFDE_Brush *pBrush,
const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0; | 50 virtual FX_BOOL FillPolygon(IFDE_Brush *pBrush,
const CFX_PointsF &points, const CFX_Matrix *pMatrix = NULL) = 0; |
| 51 virtual FX_BOOL FillRectangle(IFDE_Brush *pBrush
, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; | 51 virtual FX_BOOL FillRectangle(IFDE_Brush *pBrush
, const CFX_RectF &rect, const CFX_Matrix *pMatrix = NULL) = 0; |
| 52 }; | 52 }; |
| 53 #endif | 53 #endif |
| OLD | NEW |