summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_textout.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-10 10:16:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-10 21:16:19 +0000
commit7ffb59f7f540a67fb808c1e5a2a7edfacf125e3a (patch)
tree7f6fc5563912ce4b6e8878b4b5fe337eac3d40a8 /xfa/fde/cfde_textout.cpp
parentf7520395821090b36a5ad8c658a844c3342dbf66 (diff)
downloadpdfium-7ffb59f7f540a67fb808c1e5a2a7edfacf125e3a.tar.xz
Remove CFDE_Path
This CL removes CFDE_Path. There is only one method, AddLine which is required, the rest can be removed. That method is moved to CFX_PathData which is what CFDE_Path is appending to anyway. Change-Id: If50af8cf856a9f7379791fe1999174db5fd13e38 Reviewed-on: https://pdfium-review.googlesource.com/10454 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_textout.cpp')
-rw-r--r--xfa/fde/cfde_textout.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fde/cfde_textout.cpp b/xfa/fde/cfde_textout.cpp
index 202074bdc4..e796bdcdb3 100644
--- a/xfa/fde/cfde_textout.cpp
+++ b/xfa/fde/cfde_textout.cpp
@@ -11,9 +11,9 @@
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxge/cfx_pathdata.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
-#include "xfa/fde/cfde_path.h"
#include "xfa/fde/cfde_renderdevice.h"
#include "xfa/fgas/layout/cfx_txtbreak.h"
@@ -704,7 +704,7 @@ void CFDE_TextOut::DrawLine(const FDE_TTOPIECE* pPiece, FX_ARGB color) {
if (!bUnderLine && !bStrikeOut && !bHotKey)
return;
- auto pPath = pdfium::MakeUnique<CFDE_Path>();
+ CFX_PathData path;
int32_t iLineCount = 0;
CFX_RectF rtText = pPiece->rtPiece;
CFX_PointF pt1, pt2;
@@ -713,7 +713,7 @@ void CFDE_TextOut::DrawLine(const FDE_TTOPIECE* pPiece, FX_ARGB color) {
pt1.y = rtText.bottom();
pt2.x = rtText.right();
pt2.y = rtText.bottom();
- pPath->AddLine(pt1, pt2);
+ path.AppendLine(pt1, pt2);
iLineCount++;
}
if (bStrikeOut) {
@@ -721,7 +721,7 @@ void CFDE_TextOut::DrawLine(const FDE_TTOPIECE* pPiece, FX_ARGB color) {
pt1.y = rtText.bottom() - rtText.height * 2.0f / 5.0f;
pt2.x = rtText.right();
pt2.y = pt1.y;
- pPath->AddLine(pt1, pt2);
+ path.AppendLine(pt1, pt2);
iLineCount++;
}
if (bHotKey) {
@@ -734,14 +734,14 @@ void CFDE_TextOut::DrawLine(const FDE_TTOPIECE* pPiece, FX_ARGB color) {
pt1.y = rect.bottom();
pt2.x = rect.right();
pt2.y = rect.bottom();
- pPath->AddLine(pt1, pt2);
+ path.AppendLine(pt1, pt2);
iLineCount++;
}
}
}
}
if (iLineCount > 0)
- m_pRenderDevice->DrawPath(color, 1, pPath.get(), &m_Matrix);
+ m_pRenderDevice->DrawPath(color, 1, path, &m_Matrix);
}
CFDE_TTOLine::CFDE_TTOLine() : m_bNewReload(false) {}