summaryrefslogtreecommitdiff
path: root/xfa/fde/tto/fde_textout.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-12 09:51:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-12 09:51:45 -0700
commit25c223d1c3a662a0e69a5bf95083afbd5fa3cd97 (patch)
treed1b6a27b093b969696c2697dd183deb21d8cb6bd /xfa/fde/tto/fde_textout.cpp
parentf9924422a4cd1d1b6d2d4240c83b5c1082da3629 (diff)
downloadpdfium-25c223d1c3a662a0e69a5bf95083afbd5fa3cd97.tar.xz
Only SolidBrush types are created, remove other brushes.
We only ever create a CFDE_SolidBrush, there is nothing which creates Texture, Hatch or LinearGradient brushes. This Cl removes all the code that isn't used for SolidBrush. A followup Cl will rename SolidBrush to Brush and remove the Brush interface in favour of the concrete class. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1877383002
Diffstat (limited to 'xfa/fde/tto/fde_textout.cpp')
-rw-r--r--xfa/fde/tto/fde_textout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index a0753c450e..49d3abb8ab 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -11,6 +11,7 @@
#include "core/fxcrt/include/fx_coordinates.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fde/fde_brush.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_pen.h"
#include "xfa/fde/fde_renderdevice.h"
#include "xfa/fgas/crt/fgas_memory.h"
@@ -950,8 +951,7 @@ void CFDE_TextOut::OnDraw(const CFX_RectF& rtClip) {
if (iLines < 1) {
return;
}
- IFDE_SolidBrush* pBrush =
- (IFDE_SolidBrush*)IFDE_Brush::Create(FDE_BRUSHTYPE_Solid);
+ IFDE_SolidBrush* pBrush = new CFDE_SolidBrush;
pBrush->SetColor(m_TxtColor);
IFDE_Pen* pPen = NULL;
FDE_HDEVICESTATE hDev = m_pRenderDevice->SaveState();
@@ -1017,7 +1017,7 @@ void CFDE_TextOut::DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen*& pPen) {
return;
}
if (pPen == NULL) {
- pPen = IFDE_Pen::Create();
+ pPen = new CFDE_Pen;
pPen->SetColor(m_TxtColor);
}
IFDE_Path* pPath = IFDE_Path::Create();