diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-08-09 16:09:51 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-09 20:47:34 +0000 |
commit | 17aa0579f9ce11e5433b62ccb66c59b522b4f51e (patch) | |
tree | 39dce4b38c71a2442ef5dbeea2867af05fca8088 /xfa/fde/cfde_rendercontext.cpp | |
parent | b6db95b0d55869168ee13e2b8accb0d16dc7ad8b (diff) | |
download | pdfium-17aa0579f9ce11e5433b62ccb66c59b522b4f51e.tar.xz |
Remove CFDE_{Pen|Brush} classes
These classes just hold a color value. Instead of creating the class to
pass the color we just pass the colors.
Change-Id: I7f65ca4100bfbdcb02171c1e7e46150508e338f4
Reviewed-on: https://pdfium-review.googlesource.com/10451
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_rendercontext.cpp')
-rw-r--r-- | xfa/fde/cfde_rendercontext.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xfa/fde/cfde_rendercontext.cpp b/xfa/fde/cfde_rendercontext.cpp index dc2a628c23..7e7baebee2 100644 --- a/xfa/fde/cfde_rendercontext.cpp +++ b/xfa/fde/cfde_rendercontext.cpp @@ -8,7 +8,6 @@ #include "third_party/base/logging.h" #include "third_party/base/ptr_util.h" -#include "xfa/fde/cfde_brush.h" #include "xfa/fde/cfde_renderdevice.h" #include "xfa/fde/cfde_txtedttextset.h" @@ -83,15 +82,10 @@ void CFDE_RenderContext::RenderText(CFDE_TxtEdtTextSet* pTextSet, int32_t iCount = pTextSet->GetDisplayPos(*pText, nullptr, false); if (iCount < 1) return; - if (!m_pBrush) - m_pBrush = pdfium::MakeUnique<CFDE_Brush>(); if (m_CharPos.size() < static_cast<size_t>(iCount)) m_CharPos.resize(iCount, FXTEXT_CHARPOS()); iCount = pTextSet->GetDisplayPos(*pText, m_CharPos.data(), false); - float fFontSize = pTextSet->GetFontSize(); - FX_ARGB dwColor = pTextSet->GetFontColor(); - m_pBrush->SetColor(dwColor); - m_pRenderDevice->DrawString(m_pBrush.get(), pFont, m_CharPos.data(), iCount, - fFontSize, &m_Transform); + m_pRenderDevice->DrawString(pTextSet->GetFontColor(), pFont, m_CharPos.data(), + iCount, pTextSet->GetFontSize(), &m_Transform); } |