| OLD | NEW |
| 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 "render_int.h" | 7 #include "render_int.h" |
| 8 | 8 |
| 9 #include "core/include/fpdfapi/fpdf_pageobj.h" | 9 #include "core/include/fpdfapi/fpdf_pageobj.h" |
| 10 #include "core/include/fpdfapi/fpdf_render.h" | 10 #include "core/include/fpdfapi/fpdf_render.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 ReleaseCachedType3(m_pType3Font); | 351 ReleaseCachedType3(m_pType3Font); |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 FX_DWORD m_dwCount; | 354 FX_DWORD m_dwCount; |
| 355 CPDF_Type3Font* m_pType3Font; | 355 CPDF_Type3Font* m_pType3Font; |
| 356 }; | 356 }; |
| 357 FX_BOOL CPDF_RenderStatus::ProcessType3Text( | 357 FX_BOOL CPDF_RenderStatus::ProcessType3Text( |
| 358 const CPDF_TextObject* textobj, | 358 const CPDF_TextObject* textobj, |
| 359 const CFX_AffineMatrix* pObj2Device) { | 359 const CFX_AffineMatrix* pObj2Device) { |
| 360 CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->GetType3Font(); | 360 CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->GetType3Font(); |
| 361 for (int j = 0; j < m_Type3FontCache.GetSize(); j++) | 361 for (int j = 0; j < m_Type3FontCache.GetSize(); j++) { |
| 362 if ((CPDF_Type3Font*)m_Type3FontCache.GetAt(j) == pType3Font) { | 362 if (m_Type3FontCache.GetAt(j) == pType3Font) |
| 363 return TRUE; | 363 return TRUE; |
| 364 } | 364 } |
| 365 CFX_Matrix dCTM = m_pDevice->GetCTM(); | 365 CFX_Matrix dCTM = m_pDevice->GetCTM(); |
| 366 FX_FLOAT sa = FXSYS_fabs(dCTM.a); | 366 FX_FLOAT sa = FXSYS_fabs(dCTM.a); |
| 367 FX_FLOAT sd = FXSYS_fabs(dCTM.d); | 367 FX_FLOAT sd = FXSYS_fabs(dCTM.d); |
| 368 CFX_AffineMatrix text_matrix; | 368 CFX_AffineMatrix text_matrix; |
| 369 textobj->GetTextMatrix(&text_matrix); | 369 textobj->GetTextMatrix(&text_matrix); |
| 370 CFX_AffineMatrix char_matrix = pType3Font->GetFontMatrix(); | 370 CFX_AffineMatrix char_matrix = pType3Font->GetFontMatrix(); |
| 371 FX_FLOAT font_size = textobj->m_TextState.GetFontSize(); | 371 FX_FLOAT font_size = textobj->m_TextState.GetFontSize(); |
| 372 char_matrix.Scale(font_size, font_size); | 372 char_matrix.Scale(font_size, font_size); |
| 373 FX_ARGB fill_argb = GetFillArgb(textobj, TRUE); | 373 FX_ARGB fill_argb = GetFillArgb(textobj, TRUE); |
| 374 int fill_alpha = FXARGB_A(fill_argb); | 374 int fill_alpha = FXARGB_A(fill_argb); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 ProcessPath(&path, pObj2Device); | 791 ProcessPath(&path, pObj2Device); |
| 792 } | 792 } |
| 793 } | 793 } |
| 794 | 794 |
| 795 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) { | 795 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) { |
| 796 int glyph_index = GlyphFromCharCode(charcode); | 796 int glyph_index = GlyphFromCharCode(charcode); |
| 797 if (!m_Font.GetFace()) | 797 if (!m_Font.GetFace()) |
| 798 return nullptr; | 798 return nullptr; |
| 799 return m_Font.LoadGlyphPath(glyph_index, dest_width); | 799 return m_Font.LoadGlyphPath(glyph_index, dest_width); |
| 800 } | 800 } |
| OLD | NEW |