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

Unified Diff: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp

Issue 2350243002: Make CFX_FontCache global (Closed)
Patch Set: Remove fix leaks code. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index e2bbfd57268cccccd6f5ac29aaa4e2cb6b809d07..632738779a37f5cd44c3ab270e6e26b899808a41 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -231,8 +231,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
FX_RECT rect(0, 0, strWidth, iTextHeight);
ge.FillRect(&rect, m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos + 1, m_pFont,
- CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(iLen, pCharPos + 1, m_pFont, (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
@@ -242,9 +241,8 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 1, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 1, m_pFont, (FX_FLOAT)iFontSize,
+ &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(7, 6);
iLen = tempStr.GetLength();
@@ -253,8 +251,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (pOutBitmap) {
FX_RECT rect1(0, 0, strWidth, iTextHeight);
ge.FillRect(&rect1, m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos + 7, m_pFont,
- CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(iLen, pCharPos + 7, m_pFont, (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 47 * multiple,
m_Height - iTextHeight);
@@ -266,9 +263,8 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 7, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 7, m_pFont, (FX_FLOAT)iFontSize,
+ &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
iLen = tempStr.GetLength();
@@ -282,8 +278,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos, m_pFont,
- CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
@@ -292,9 +287,8 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize,
+ &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698