summaryrefslogtreecommitdiff
path: root/xfa/fde/fde_gedevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/fde_gedevice.h')
-rw-r--r--xfa/fde/fde_gedevice.h169
1 files changed, 89 insertions, 80 deletions
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index 4d43ea0ef5..3d14a0f8af 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -7,92 +7,101 @@
#ifndef XFA_FDE_FDE_GEDEVICE_H_
#define XFA_FDE_FDE_GEDEVICE_H_
-#include "xfa/fde/fde_renderdevice.h"
+#include "core/fxge/include/fx_ge.h"
#include "xfa/fgas/crt/fgas_memory.h"
-class CFDE_FxgeDevice : public IFDE_RenderDevice, public CFX_Target {
+typedef struct FDE_HDEVICESTATE_ { void* pData; } * FDE_HDEVICESTATE;
+
+class CFDE_Brush;
+class CFDE_Path;
+class CFDE_Pen;
+class CFX_RenderDevice;
+class IFX_Font;
+
+class CFDE_RenderDevice : public CFX_Target {
public:
- CFDE_FxgeDevice(CFX_RenderDevice* pDevice, FX_BOOL bOwnerDevice);
- ~CFDE_FxgeDevice();
- virtual void Release() { delete this; }
+ CFDE_RenderDevice(CFX_RenderDevice* pDevice, FX_BOOL bOwnerDevice);
+ ~CFDE_RenderDevice();
+
+ void Release() { delete this; }
- virtual int32_t GetWidth() const;
- virtual int32_t GetHeight() const;
- virtual FDE_HDEVICESTATE SaveState();
- virtual void RestoreState(FDE_HDEVICESTATE hState);
- virtual FX_BOOL SetClipPath(const IFDE_Path* pClip);
- virtual IFDE_Path* GetClipPath() const;
- virtual FX_BOOL SetClipRect(const CFX_RectF& rtClip);
- virtual const CFX_RectF& GetClipRect();
+ int32_t GetWidth() const;
+ int32_t GetHeight() const;
+ FDE_HDEVICESTATE SaveState();
+ void RestoreState(FDE_HDEVICESTATE hState);
+ FX_BOOL SetClipPath(const CFDE_Path* pClip);
+ CFDE_Path* GetClipPath() const;
+ FX_BOOL SetClipRect(const CFX_RectF& rtClip);
+ const CFX_RectF& GetClipRect();
- virtual FX_FLOAT GetDpiX() const;
- virtual FX_FLOAT GetDpiY() const;
+ FX_FLOAT GetDpiX() const;
+ FX_FLOAT GetDpiY() const;
- virtual FX_BOOL DrawImage(CFX_DIBSource* pDib,
- const CFX_RectF* pSrcRect,
- const CFX_RectF& dstRect,
- const CFX_Matrix* pImgMatrix = NULL,
- const CFX_Matrix* pDevMatrix = NULL);
- virtual FX_BOOL DrawString(CFDE_Brush* pBrush,
- IFX_Font* pFont,
- const FXTEXT_CHARPOS* pCharPos,
- int32_t iCount,
- FX_FLOAT fFontSize,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawBezier(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_PointF& pt1,
- const CFX_PointF& pt2,
- const CFX_PointF& pt3,
- const CFX_PointF& pt4,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawCurve(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_PointsF& points,
- FX_BOOL bClosed,
- FX_FLOAT fTension = 0.5f,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawEllipse(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_RectF& rect,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawLines(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_PointsF& points,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawLine(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_PointF& pt1,
- const CFX_PointF& pt2,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawPath(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const IFDE_Path* pPath,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawPolygon(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_PointsF& points,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL DrawRectangle(CFDE_Pen* pPen,
- FX_FLOAT fPenWidth,
- const CFX_RectF& rect,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL FillClosedCurve(CFDE_Brush* pBrush,
- const CFX_PointsF& points,
- FX_FLOAT fTension = 0.5f,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL FillEllipse(CFDE_Brush* pBrush,
- const CFX_RectF& rect,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL FillPath(CFDE_Brush* pBrush,
- const IFDE_Path* pPath,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL FillPolygon(CFDE_Brush* pBrush,
- const CFX_PointsF& points,
- const CFX_Matrix* pMatrix = NULL);
- virtual FX_BOOL FillRectangle(CFDE_Brush* pBrush,
- const CFX_RectF& rect,
- const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawImage(CFX_DIBSource* pDib,
+ const CFX_RectF* pSrcRect,
+ const CFX_RectF& dstRect,
+ const CFX_Matrix* pImgMatrix = NULL,
+ const CFX_Matrix* pDevMatrix = NULL);
+ FX_BOOL DrawString(CFDE_Brush* pBrush,
+ IFX_Font* pFont,
+ const FXTEXT_CHARPOS* pCharPos,
+ int32_t iCount,
+ FX_FLOAT fFontSize,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawBezier(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_PointF& pt1,
+ const CFX_PointF& pt2,
+ const CFX_PointF& pt3,
+ const CFX_PointF& pt4,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawCurve(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_PointsF& points,
+ FX_BOOL bClosed,
+ FX_FLOAT fTension = 0.5f,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawEllipse(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_RectF& rect,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawLines(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_PointsF& points,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawLine(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_PointF& pt1,
+ const CFX_PointF& pt2,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawPath(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFDE_Path* pPath,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawPolygon(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_PointsF& points,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL DrawRectangle(CFDE_Pen* pPen,
+ FX_FLOAT fPenWidth,
+ const CFX_RectF& rect,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL FillClosedCurve(CFDE_Brush* pBrush,
+ const CFX_PointsF& points,
+ FX_FLOAT fTension = 0.5f,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL FillEllipse(CFDE_Brush* pBrush,
+ const CFX_RectF& rect,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL FillPath(CFDE_Brush* pBrush,
+ const CFDE_Path* pPath,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL FillPolygon(CFDE_Brush* pBrush,
+ const CFX_PointsF& points,
+ const CFX_Matrix* pMatrix = NULL);
+ FX_BOOL FillRectangle(CFDE_Brush* pBrush,
+ const CFX_RectF& rect,
+ const CFX_Matrix* pMatrix = NULL);
FX_BOOL DrawSolidString(CFDE_Brush* pBrush,
IFX_Font* pFont,