summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_textout.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-21 09:50:55 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-21 15:00:47 +0000
commit8c6dc95678810e3a054744a6a229606ac0d75134 (patch)
tree8aaaeeeb754884f868b66fa9ece3f2ffbe8d7857 /xfa/fde/cfde_textout.h
parent2f7653c0d8fe60f1a4956382dcb3d73822694dda (diff)
downloadpdfium-8c6dc95678810e3a054744a6a229606ac0d75134.tar.xz
Cleanup CFDE_TextOut
This CL cleans up formatting and simplifies logic in CFDE_TextOut. Change-Id: Ib675a35da79df77854f51e86bf24e5dc90b33b06 Reviewed-on: https://pdfium-review.googlesource.com/11334 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_textout.h')
-rw-r--r--xfa/fde/cfde_textout.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/xfa/fde/cfde_textout.h b/xfa/fde/cfde_textout.h
index 421987c3fd..89c8eac28d 100644
--- a/xfa/fde/cfde_textout.h
+++ b/xfa/fde/cfde_textout.h
@@ -20,7 +20,6 @@
class CFDE_RenderDevice;
class CFX_RenderDevice;
class CFX_TxtBreak;
-struct FX_TXTRUN;
enum class FDE_TextAlignment : uint8_t {
kTopLeft = 0,
@@ -79,7 +78,7 @@ class CFDE_TextOut {
static bool DrawString(CFX_RenderDevice* device,
FX_ARGB color,
const CFX_RetainPtr<CFGAS_GEFont>& pFont,
- const FXTEXT_CHARPOS* pCharPos,
+ FXTEXT_CHARPOS* pCharPos,
int32_t iCount,
float fFontSize,
const CFX_Matrix* pMatrix);
@@ -96,11 +95,10 @@ class CFDE_TextOut {
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 CalcLogicSize(const CFX_WideString& str, CFX_SizeF& size);
+ void CalcLogicSize(const CFX_WideString& str, CFX_RectF& rect);
void DrawLogicText(CFX_RenderDevice* device,
- const wchar_t* pwsStr,
- int32_t iLength,
+ const CFX_WideStringC& str,
const CFX_RectF& rect);
int32_t GetTotalLines() const { return m_iTotalLines; }
@@ -109,7 +107,7 @@ class CFDE_TextOut {
float& fStartPos,
float& fWidth,
float& fHeight);
- void LoadText(const wchar_t* pwsStr, int32_t iLength, const CFX_RectF& rect);
+ void LoadText(const CFX_WideString& str, const CFX_RectF& rect);
void Reload(const CFX_RectF& rect);
void ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect);
@@ -122,8 +120,6 @@ class CFDE_TextOut {
void DoAlignment(const CFX_RectF& rect);
int32_t GetDisplayPos(FDE_TTOPIECE* pPiece);
- FX_TXTRUN ToTextRun(const FDE_TTOPIECE* pPiece);
-
std::unique_ptr<CFX_TxtBreak> m_pTxtBreak;
CFX_RetainPtr<CFGAS_GEFont> m_pFont;
float m_fFontSize;