diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-08-10 10:16:06 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-10 21:16:19 +0000 |
commit | 7ffb59f7f540a67fb808c1e5a2a7edfacf125e3a (patch) | |
tree | 7f6fc5563912ce4b6e8878b4b5fe337eac3d40a8 /xfa/fxfa/cxfa_textlayout.cpp | |
parent | f7520395821090b36a5ad8c658a844c3342dbf66 (diff) | |
download | pdfium-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/fxfa/cxfa_textlayout.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index 05cc165d52..d22bee2a79 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp @@ -14,9 +14,9 @@ #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxcrt/xml/cfx_xmltext.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/fxfa/cxfa_linkuserdata.h" #include "xfa/fxfa/cxfa_loadercontext.h" @@ -1162,7 +1162,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, if (bNoUnderline && bNoLineThrough) return; - auto pPath = pdfium::MakeUnique<CFDE_Path>(); + CFX_PathData path; int32_t iChars = GetDisplayPos(pPiece, pCharPos); if (iChars > 0) { CFX_PointF pt1, pt2; @@ -1174,7 +1174,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, pt2.x = pt1.x + pCharPos[j].m_FontCharWidth * pPiece->fFontSize / 1000.0f; pt1.y = pt2.y = fEndY; - pPath->AddLine(pt1, pt2); + path.AppendLine(pt1, pt2); } fEndY += 2.0f; } @@ -1185,7 +1185,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f; for (int32_t i = 0; i < pPiece->iUnderline; i++) { pt1.y = pt2.y = fEndY; - pPath->AddLine(pt1, pt2); + path.AppendLine(pt1, pt2); fEndY += 2.0f; } } @@ -1195,7 +1195,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f; for (int32_t i = 0; i < pPiece->iLineThrough; i++) { pt1.y = pt2.y = fEndY; - pPath->AddLine(pt1, pt2); + path.AppendLine(pt1, pt2); fEndY += 2.0f; } } else { @@ -1249,18 +1249,18 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, for (int32_t i = 0; i < pPiece->iUnderline; i++) { pt1.y = fEndY; pt2.y = fEndY; - pPath->AddLine(pt1, pt2); + path.AppendLine(pt1, pt2); fEndY += 2.0f; } fEndY = pCharPos[0].m_Origin.y - pPiece->rtPiece.height * 0.25f; for (int32_t i = 0; i < pPiece->iLineThrough; i++) { pt1.y = fEndY; pt2.y = fEndY; - pPath->AddLine(pt1, pt2); + path.AppendLine(pt1, pt2); fEndY += 2.0f; } } - pDevice->DrawPath(pPiece->dwColor, 1, pPath.get(), &tmDoc2Device); + pDevice->DrawPath(pPiece->dwColor, 1, path, &tmDoc2Device); } int32_t CXFA_TextLayout::GetDisplayPos(const CXFA_TextPiece* pPiece, |