Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: xfa/fde/tto/fde_textout.cpp

Issue 1877383002: Only SolidBrush types are created, remove other brushes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/fde_render.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/tto/fde_textout.cpp
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index a0753c450e81305b4f432d2f21f2750d1d6f0daa..49d3abb8ab1883630740c3b3e0e557acd73a0a5d 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();
« no previous file with comments | « xfa/fde/fde_render.cpp ('k') | xfa/fxfa/app/xfa_textlayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698