| 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 "core/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/fpdfapi/fpdf_render/render_int.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 const CFX_GraphStateData* pGraphState, | 622 const CFX_GraphStateData* pGraphState, |
| 623 FX_ARGB fill_argb, | 623 FX_ARGB fill_argb, |
| 624 FX_ARGB stroke_argb, | 624 FX_ARGB stroke_argb, |
| 625 CFX_PathData* pClippingPath, | 625 CFX_PathData* pClippingPath, |
| 626 int nFlag) { | 626 int nFlag) { |
| 627 CFX_FontCache* pCache = | 627 CFX_FontCache* pCache = |
| 628 pFont->m_pDocument ? pFont->m_pDocument->GetRenderData()->GetFontCache() | 628 pFont->m_pDocument ? pFont->m_pDocument->GetRenderData()->GetFontCache() |
| 629 : nullptr; | 629 : nullptr; |
| 630 CPDF_CharPosList CharPosList; | 630 CPDF_CharPosList CharPosList; |
| 631 CharPosList.Load(nChars, pCharCodes, pCharPos, pFont, font_size); | 631 CharPosList.Load(nChars, pCharCodes, pCharPos, pFont, font_size); |
| 632 return pDevice->DrawTextPathWithFlags( | 632 return pDevice->DrawTextPath(CharPosList.m_nChars, CharPosList.m_pCharPos, |
| 633 CharPosList.m_nChars, CharPosList.m_pCharPos, &pFont->m_Font, pCache, | 633 &pFont->m_Font, pCache, font_size, pText2User, |
| 634 font_size, pText2User, pUser2Device, pGraphState, fill_argb, stroke_argb, | 634 pUser2Device, pGraphState, fill_argb, |
| 635 pClippingPath, nFlag); | 635 stroke_argb, pClippingPath, nFlag); |
| 636 } | 636 } |
| 637 | 637 |
| 638 // static | 638 // static |
| 639 void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice, | 639 void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice, |
| 640 FX_FLOAT origin_x, | 640 FX_FLOAT origin_x, |
| 641 FX_FLOAT origin_y, | 641 FX_FLOAT origin_y, |
| 642 CPDF_Font* pFont, | 642 CPDF_Font* pFont, |
| 643 FX_FLOAT font_size, | 643 FX_FLOAT font_size, |
| 644 const CFX_Matrix* pMatrix, | 644 const CFX_Matrix* pMatrix, |
| 645 const CFX_ByteString& str, | 645 const CFX_ByteString& str, |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, | 792 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, |
| 793 charpos.m_OriginY); | 793 charpos.m_OriginY); |
| 794 path.m_Path.New()->Append(pPath, &matrix); | 794 path.m_Path.New()->Append(pPath, &matrix); |
| 795 path.m_Matrix = *pTextMatrix; | 795 path.m_Matrix = *pTextMatrix; |
| 796 path.m_bStroke = bStroke; | 796 path.m_bStroke = bStroke; |
| 797 path.m_FillType = bFill ? FXFILL_WINDING : 0; | 797 path.m_FillType = bFill ? FXFILL_WINDING : 0; |
| 798 path.CalcBoundingBox(); | 798 path.CalcBoundingBox(); |
| 799 ProcessPath(&path, pObj2Device); | 799 ProcessPath(&path, pObj2Device); |
| 800 } | 800 } |
| 801 } | 801 } |
| OLD | NEW |