summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_textout.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-14 17:23:25 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 13:42:32 +0000
commit73b492a5d775c05d8c186c8478d1003edfffd34c (patch)
tree0815bab5627ae27f5eb2f1a45b90bb9dc10b9e1c /xfa/fde/cfde_textout.h
parent5f0e64435c97755a7d309e80ea0a4dad83e76e73 (diff)
downloadpdfium-73b492a5d775c05d8c186c8478d1003edfffd34c.tar.xz
Remove CFDE_RenderDevice
This CL removes CFDE_RenderDevice. For most of the proxy'd calls we call the CFX_RenderDevice directly now. To set the clip rect an overload was added to accept a CFX_RectF and handle the casting to FX_RECT. The one needed method, DrawString, is move to a static on CFDE_TextOut. Change-Id: I95ea7e1fa1fd4702074b797c06423c9c9cb51db9 Reviewed-on: https://pdfium-review.googlesource.com/10951 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_textout.h')
-rw-r--r--xfa/fde/cfde_textout.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/xfa/fde/cfde_textout.h b/xfa/fde/cfde_textout.h
index f2541bb11b..421987c3fd 100644
--- a/xfa/fde/cfde_textout.h
+++ b/xfa/fde/cfde_textout.h
@@ -76,6 +76,14 @@ class CFDE_TTOLine {
class CFDE_TextOut {
public:
+ static bool DrawString(CFX_RenderDevice* device,
+ FX_ARGB color,
+ const CFX_RetainPtr<CFGAS_GEFont>& pFont,
+ const FXTEXT_CHARPOS* pCharPos,
+ int32_t iCount,
+ float fFontSize,
+ const CFX_Matrix* pMatrix);
+
CFDE_TextOut();
~CFDE_TextOut();
@@ -85,13 +93,13 @@ class CFDE_TextOut {
void SetStyles(const FDE_TextStyle& dwStyles);
void SetAlignment(FDE_TextAlignment iAlignment);
void SetLineSpace(float fLineSpace);
- void SetRenderDevice(CFX_RenderDevice* pDevice);
void SetMatrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
void SetLineBreakTolerance(float fTolerance);
void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_SizeF& size);
void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_RectF& rect);
- void DrawLogicText(const wchar_t* pwsStr,
+ void DrawLogicText(CFX_RenderDevice* device,
+ const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect);
int32_t GetTotalLines() const { return m_iTotalLines; }
@@ -134,7 +142,6 @@ class CFDE_TextOut {
int32_t m_iCurPiece;
int32_t m_iTotalLines;
std::vector<FXTEXT_CHARPOS> m_CharPos;
- std::unique_ptr<CFDE_RenderDevice> m_pRenderDevice;
};
#endif // XFA_FDE_CFDE_TEXTOUT_H_