summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_edit.cpp16
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp4
2 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 042e076ab6..526275313f 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -13,7 +13,7 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
-#include "xfa/fde/cfde_renderdevice.h"
+#include "xfa/fde/cfde_textout.h"
#include "xfa/fde/cfde_txtedtengine.h"
#include "xfa/fde/cfde_txtedtpage.h"
#include "xfa/fde/cfde_txtedttextset.h"
@@ -606,14 +606,13 @@ void CFWL_Edit::RenderText(CFX_RenderDevice* pRenderDev,
if (!pFont)
return;
- CFDE_RenderDevice renderDevice(pRenderDev);
- renderDevice.SetClipRect(clipRect);
+ pRenderDev->SetClip_Rect(clipRect);
- CFX_RectF rtDocClip = renderDevice.GetClipRect();
+ CFX_RectF rtDocClip = clipRect;
if (rtDocClip.IsEmpty()) {
rtDocClip.left = rtDocClip.top = 0;
- rtDocClip.width = static_cast<float>(renderDevice.GetWidth());
- rtDocClip.height = static_cast<float>(renderDevice.GetHeight());
+ rtDocClip.width = static_cast<float>(pRenderDev->GetWidth());
+ rtDocClip.height = static_cast<float>(pRenderDev->GetHeight());
}
mt.GetInverse().TransformRect(rtDocClip);
@@ -631,8 +630,9 @@ void CFWL_Edit::RenderText(CFX_RenderDevice* pRenderDev,
char_pos.resize(iCount, FXTEXT_CHARPOS());
iCount = pTextSet->GetDisplayPos(pText, char_pos.data(), false);
- renderDevice.DrawString(pTextSet->GetFontColor(), pFont, char_pos.data(),
- iCount, pTextSet->GetFontSize(), &mt);
+ CFDE_TextOut::DrawString(pRenderDev, pTextSet->GetFontColor(), pFont,
+ char_pos.data(), iCount, pTextSet->GetFontSize(),
+ &mt);
}
}
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index bf5fd42736..fe63780c39 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -46,14 +46,14 @@ void CFWL_WidgetTP::DrawText(CFWL_ThemeText* pParams) {
return;
CXFA_Graphics* pGraphics = pParams->m_pGraphics;
- m_pTextOut->SetRenderDevice(pGraphics->GetRenderDevice());
m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
CFX_Matrix* pMatrix = &pParams->m_matrix;
pMatrix->Concat(*pGraphics->GetMatrix());
m_pTextOut->SetMatrix(*pMatrix);
- m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), iLen, pParams->m_rtPart);
+ m_pTextOut->DrawLogicText(pGraphics->GetRenderDevice(),
+ pParams->m_wsText.c_str(), iLen, pParams->m_rtPart);
}
void CFWL_WidgetTP::InitializeArrowColorData() {