summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-30 10:32:36 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-30 10:32:36 -0700
commitfbda17d61de1e02799f5d77dceb23df3688b764e (patch)
treead15940f6c9bf31ca390a711636981ecd0e52ff6 /core/fpdfapi/fpdf_render
parentf7252a074ed013e2ad3cc11e08eba90502262ce0 (diff)
downloadpdfium-fbda17d61de1e02799f5d77dceb23df3688b764e.tar.xz
Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one.
Review-Url: https://codereview.chromium.org/2287313004
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 16d1235f4d..e5e28b429c 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -231,8 +231,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
if (textobj->m_nChars == 0)
return TRUE;
- const TextRenderingMode& text_render_mode =
- textobj->m_TextState.GetObject()->m_TextMode;
+ const TextRenderingMode text_render_mode = textobj->m_TextState.GetTextMode();
if (text_render_mode == TextRenderingMode::MODE_INVISIBLE)
return TRUE;
@@ -308,7 +307,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
const CFX_Matrix* pDeviceMatrix = pObj2Device;
CFX_Matrix device_matrix;
if (bStroke) {
- const FX_FLOAT* pCTM = textobj->m_TextState.GetObject()->m_CTM;
+ const FX_FLOAT* pCTM = textobj->m_TextState.GetCTM();
if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) {
CFX_Matrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0);
text_matrix.ConcatInverse(ctm);
@@ -817,8 +816,8 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
path.m_FillType = FXFILL_WINDING;
path.m_ClipPath.AppendTexts(&pCopy);
path.m_ColorState = textobj->m_ColorState;
- path.m_Path.New()->AppendRect(textobj->m_Left, textobj->m_Bottom,
- textobj->m_Right, textobj->m_Top);
+ path.m_Path.Emplace()->AppendRect(textobj->m_Left, textobj->m_Bottom,
+ textobj->m_Right, textobj->m_Top);
path.m_Left = textobj->m_Left;
path.m_Bottom = textobj->m_Bottom;
path.m_Right = textobj->m_Right;
@@ -864,7 +863,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0);
matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX,
charpos.m_OriginY);
- path.m_Path.New()->Append(pPath, &matrix);
+ path.m_Path.Emplace()->Append(pPath, &matrix);
path.m_Matrix = *pTextMatrix;
path.m_bStroke = bStroke;
path.m_FillType = bFill ? FXFILL_WINDING : 0;