summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_textlayout.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-21 11:06:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-21 11:06:27 -0700
commitacd0d59e3c09f04bffd178aecd3638d3e189faba (patch)
tree39e30a37353f74aeb775834967eb86779c0bbdcd /xfa/fxfa/app/xfa_textlayout.cpp
parent4f70b53efb39e9b9b868d99999582282be57fe50 (diff)
downloadpdfium-acd0d59e3c09f04bffd178aecd3638d3e189faba.tar.xz
Cleanup FDE interfaces.
This CL removes IFDE_TextOut, IFDE_Path, IFDE_RenderContext, IFDE_RenderDevice, and IFDE_VisualSetIterator in favour of the concrete classes. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1896893003
Diffstat (limited to 'xfa/fxfa/app/xfa_textlayout.cpp')
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 532d6f54ce..c0a8895bc7 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -9,7 +9,9 @@
#include <algorithm>
#include "core/fxcrt/include/fx_ext.h"
+#include "xfa/fde/cfde_path.h"
#include "xfa/fde/css/fde_csscache.h"
+#include "xfa/fde/fde_gedevice.h"
#include "xfa/fde/fde_object.h"
#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fgas/crt/fgas_algorithm.h"
@@ -1216,10 +1218,10 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
const CFX_Matrix& tmDoc2Device,
const CFX_RectF& rtClip,
int32_t iBlock) {
- IFDE_RenderDevice* pDevice = IFDE_RenderDevice::Create(pFxDevice);
- if (pDevice == NULL) {
+ if (!pFxDevice)
return FALSE;
- }
+
+ CFDE_RenderDevice* pDevice = new CFDE_RenderDevice(pFxDevice, FALSE);
FDE_HDEVICESTATE state = pDevice->SaveState();
pDevice->SetClipRect(rtClip);
CFDE_Brush* pSolidBrush = new CFDE_Brush;
@@ -1838,7 +1840,7 @@ void CXFA_TextLayout::AppendTextLine(uint32_t dwStatus,
}
m_iLines++;
}
-void CXFA_TextLayout::RenderString(IFDE_RenderDevice* pDevice,
+void CXFA_TextLayout::RenderString(CFDE_RenderDevice* pDevice,
CFDE_Brush* pBrush,
CXFA_PieceLine* pPieceLine,
int32_t iPiece,
@@ -1853,7 +1855,7 @@ void CXFA_TextLayout::RenderString(IFDE_RenderDevice* pDevice,
}
pPieceLine->m_charCounts.Add(iCount);
}
-void CXFA_TextLayout::RenderPath(IFDE_RenderDevice* pDevice,
+void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
CFDE_Pen* pPen,
CXFA_PieceLine* pPieceLine,
int32_t iPiece,
@@ -1866,7 +1868,7 @@ void CXFA_TextLayout::RenderPath(IFDE_RenderDevice* pDevice,
return;
}
pPen->SetColor(pPiece->dwColor);
- IFDE_Path* pPath = IFDE_Path::Create();
+ CFDE_Path* pPath = new CFDE_Path;
int32_t iChars = GetDisplayPos(pPiece, pCharPos);
if (iChars > 0) {
CFX_PointF pt1, pt2;