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

Side by Side Diff: xfa/fxgraphics/cfx_graphics.cpp

Issue 2158023002: Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix xfa tests. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxgraphics/include/cfx_graphics.h" 7 #include "xfa/fxgraphics/include/cfx_graphics.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 rect.Set(point.x, point.y, 0, 0); 1287 rect.Set(point.x, point.y, 0, 0);
1288 CalcTextInfo(text, charCodes, charPos, rect); 1288 CalcTextInfo(text, charCodes, charPos, rect);
1289 CFX_Matrix m; 1289 CFX_Matrix m;
1290 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, 1290 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e,
1291 m_info.CTM.f); 1291 m_info.CTM.f);
1292 m.Translate(0, m_info.fontSize * m_info.fontHScale); 1292 m.Translate(0, m_info.fontSize * m_info.fontHScale);
1293 if (matrix) { 1293 if (matrix) {
1294 m.Concat(*matrix); 1294 m.Concat(*matrix);
1295 } 1295 }
1296 FX_BOOL result = m_renderDevice->DrawNormalText( 1296 FX_BOOL result = m_renderDevice->DrawNormalText(
1297 length, charPos, m_info.font, CFX_GEModule::Get()->GetFontCache(), 1297 length, charPos, m_info.font, -m_info.fontSize * m_info.fontHScale, &m,
1298 -m_info.fontSize * m_info.fontHScale, &m, m_info.fillColor->m_info.argb, 1298 m_info.fillColor->m_info.argb, FXTEXT_CLEARTYPE);
1299 FXTEXT_CLEARTYPE);
1300 if (!result) 1299 if (!result)
1301 return FWL_Error::Indefinite; 1300 return FWL_Error::Indefinite;
1302 FX_Free(charPos); 1301 FX_Free(charPos);
1303 FX_Free(charCodes); 1302 FX_Free(charCodes);
1304 return FWL_Error::Succeeded; 1303 return FWL_Error::Succeeded;
1305 } 1304 }
1306 1305
1307 FWL_Error CFX_Graphics::StrokePathWithPattern(CFX_Path* path, 1306 FWL_Error CFX_Graphics::StrokePathWithPattern(CFX_Path* path,
1308 CFX_Matrix* matrix) { 1307 CFX_Matrix* matrix) {
1309 return FWL_Error::MethodNotSupported; 1308 return FWL_Error::MethodNotSupported;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 CTM = other.CTM; 1570 CTM = other.CTM;
1572 isActOnDash = other.isActOnDash; 1571 isActOnDash = other.isActOnDash;
1573 strokeColor = other.strokeColor; 1572 strokeColor = other.strokeColor;
1574 fillColor = other.fillColor; 1573 fillColor = other.fillColor;
1575 font = other.font; 1574 font = other.font;
1576 fontSize = other.fontSize; 1575 fontSize = other.fontSize;
1577 fontHScale = other.fontHScale; 1576 fontHScale = other.fontHScale;
1578 fontSpacing = other.fontSpacing; 1577 fontSpacing = other.fontSpacing;
1579 return *this; 1578 return *this;
1580 } 1579 }
OLDNEW
« core/fxge/include/cfx_fontcache.h ('K') | « xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698