diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-08-09 16:09:51 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-09 20:47:34 +0000 |
commit | 17aa0579f9ce11e5433b62ccb66c59b522b4f51e (patch) | |
tree | 39dce4b38c71a2442ef5dbeea2867af05fca8088 /xfa/fde/cfde_renderdevice.h | |
parent | b6db95b0d55869168ee13e2b8accb0d16dc7ad8b (diff) | |
download | pdfium-17aa0579f9ce11e5433b62ccb66c59b522b4f51e.tar.xz |
Remove CFDE_{Pen|Brush} classes
These classes just hold a color value. Instead of creating the class to
pass the color we just pass the colors.
Change-Id: I7f65ca4100bfbdcb02171c1e7e46150508e338f4
Reviewed-on: https://pdfium-review.googlesource.com/10451
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_renderdevice.h')
-rw-r--r-- | xfa/fde/cfde_renderdevice.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/xfa/fde/cfde_renderdevice.h b/xfa/fde/cfde_renderdevice.h index d9f4ce0d34..a372c23f9d 100644 --- a/xfa/fde/cfde_renderdevice.h +++ b/xfa/fde/cfde_renderdevice.h @@ -12,9 +12,7 @@ #include "core/fxge/cfx_renderdevice.h" #include "xfa/fgas/font/cfgas_gefont.h" -class CFDE_Brush; class CFDE_Path; -class CFDE_Pen; class CFX_GraphStateData; class CFDE_RenderDevice { @@ -39,85 +37,81 @@ class CFDE_RenderDevice { const CFX_RectF& dstRect, const CFX_Matrix* pImgMatrix = nullptr, const CFX_Matrix* pDevMatrix = nullptr); - bool DrawString(CFDE_Brush* pBrush, + bool DrawString(FX_ARGB color, const CFX_RetainPtr<CFGAS_GEFont>& pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, float fFontSize, const CFX_Matrix* pMatrix = nullptr); - bool DrawBezier(CFDE_Pen* pPen, + bool DrawBezier(FX_ARGB color, float fPenWidth, const CFX_PointF& pt1, const CFX_PointF& pt2, const CFX_PointF& pt3, const CFX_PointF& pt4, const CFX_Matrix* pMatrix = nullptr); - bool DrawCurve(CFDE_Pen* pPen, + bool DrawCurve(FX_ARGB color, float fPenWidth, const std::vector<CFX_PointF>& points, bool bClosed, float fTension = 0.5f, const CFX_Matrix* pMatrix = nullptr); - bool DrawEllipse(CFDE_Pen* pPen, + bool DrawEllipse(FX_ARGB color, float fPenWidth, const CFX_RectF& rect, const CFX_Matrix* pMatrix = nullptr); - bool DrawLines(CFDE_Pen* pPen, + bool DrawLines(FX_ARGB color, float fPenWidth, const std::vector<CFX_PointF>& points, const CFX_Matrix* pMatrix = nullptr); - bool DrawLine(CFDE_Pen* pPen, + bool DrawLine(FX_ARGB color, float fPenWidth, const CFX_PointF& pt1, const CFX_PointF& pt2, const CFX_Matrix* pMatrix = nullptr); - bool DrawPath(CFDE_Pen* pPen, + bool DrawPath(FX_ARGB color, float fPenWidth, const CFDE_Path* pPath, const CFX_Matrix* pMatrix = nullptr); - bool DrawPolygon(CFDE_Pen* pPen, + bool DrawPolygon(FX_ARGB color, float fPenWidth, const std::vector<CFX_PointF>& points, const CFX_Matrix* pMatrix = nullptr); - bool DrawRectangle(CFDE_Pen* pPen, + bool DrawRectangle(FX_ARGB color, float fPenWidth, const CFX_RectF& rect, const CFX_Matrix* pMatrix = nullptr); - bool FillClosedCurve(CFDE_Brush* pBrush, + bool FillClosedCurve(FX_ARGB color, const std::vector<CFX_PointF>& points, float fTension = 0.5f, const CFX_Matrix* pMatrix = nullptr); - bool FillEllipse(CFDE_Brush* pBrush, + bool FillEllipse(FX_ARGB color, const CFX_RectF& rect, const CFX_Matrix* pMatrix = nullptr); - bool FillPath(CFDE_Brush* pBrush, + bool FillPath(FX_ARGB color, const CFDE_Path* pPath, const CFX_Matrix* pMatrix = nullptr); - bool FillPolygon(CFDE_Brush* pBrush, + bool FillPolygon(FX_ARGB color, const std::vector<CFX_PointF>& points, const CFX_Matrix* pMatrix = nullptr); - bool FillRectangle(CFDE_Brush* pBrush, + bool FillRectangle(FX_ARGB color, const CFX_RectF& rect, const CFX_Matrix* pMatrix = nullptr); - bool DrawSolidString(CFDE_Brush* pBrush, + bool DrawSolidString(FX_ARGB color, const CFX_RetainPtr<CFGAS_GEFont>& pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, float fFontSize, const CFX_Matrix* pMatrix); - bool DrawStringPath(CFDE_Brush* pBrush, + bool DrawStringPath(FX_ARGB color, const CFX_RetainPtr<CFGAS_GEFont>& pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, float fFontSize, const CFX_Matrix* pMatrix); - protected: - bool CreatePen(CFDE_Pen* pPen, - float fPenWidth, - CFX_GraphStateData& graphState); - + private: CFX_RenderDevice* const m_pDevice; CFX_RectF m_rtClip; int32_t m_iCharCount; |