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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 return pFont->m_pDocument->GetRenderData()->GetCachedType3(pFont); | 312 return pFont->m_pDocument->GetRenderData()->GetCachedType3(pFont); |
313 } | 313 } |
314 static void ReleaseCachedType3(CPDF_Type3Font* pFont) { | 314 static void ReleaseCachedType3(CPDF_Type3Font* pFont) { |
315 if (pFont->m_pDocument == NULL) { | 315 if (pFont->m_pDocument == NULL) { |
316 return; | 316 return; |
317 } | 317 } |
318 pFont->m_pDocument->GetRenderData()->ReleaseCachedType3(pFont); | 318 pFont->m_pDocument->GetRenderData()->ReleaseCachedType3(pFont); |
319 pFont->m_pDocument->GetPageData()->ReleaseFont(pFont->GetFontDict()); | 319 pFont->m_pDocument->GetPageData()->ReleaseFont(pFont->GetFontDict()); |
320 } | 320 } |
321 FX_BOOL CPDF_Type3Char::LoadBitmap(CPDF_RenderContext* pContext) { | 321 FX_BOOL CPDF_Type3Char::LoadBitmap(CPDF_RenderContext* pContext) { |
322 if (m_pBitmap != NULL || m_pForm == NULL) { | 322 if (m_pBitmap || m_pForm == NULL) { |
323 return TRUE; | 323 return TRUE; |
324 } | 324 } |
325 if (m_pForm->CountObjects() == 1 && !m_bColored) { | 325 if (m_pForm->CountObjects() == 1 && !m_bColored) { |
326 CPDF_PageObject* pPageObj = | 326 CPDF_PageObject* pPageObj = |
327 m_pForm->GetObjectAt(m_pForm->GetFirstObjectPosition()); | 327 m_pForm->GetObjectAt(m_pForm->GetFirstObjectPosition()); |
328 if (pPageObj->m_Type == PDFPAGE_IMAGE) { | 328 if (pPageObj->m_Type == PDFPAGE_IMAGE) { |
329 CPDF_ImageObject* pImage = (CPDF_ImageObject*)pPageObj; | 329 CPDF_ImageObject* pImage = (CPDF_ImageObject*)pPageObj; |
330 m_ImageMatrix = pImage->m_Matrix; | 330 m_ImageMatrix = pImage->m_Matrix; |
331 const CFX_DIBSource* pSource = pImage->m_pImage->LoadDIBSource(); | 331 const CFX_DIBSource* pSource = pImage->m_pImage->LoadDIBSource(); |
332 if (pSource) { | 332 if (pSource) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 ProcessPath(&path, pObj2Device); | 790 ProcessPath(&path, pObj2Device); |
791 } | 791 } |
792 } | 792 } |
793 | 793 |
794 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) { | 794 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) { |
795 int glyph_index = GlyphFromCharCode(charcode); | 795 int glyph_index = GlyphFromCharCode(charcode); |
796 if (!m_Font.GetFace()) | 796 if (!m_Font.GetFace()) |
797 return nullptr; | 797 return nullptr; |
798 return m_Font.LoadGlyphPath(glyph_index, dest_width); | 798 return m_Font.LoadGlyphPath(glyph_index, dest_width); |
799 } | 799 } |
OLD | NEW |