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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 1730553002: Fixing whitespace lint errors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Review changes Created 4 years, 10 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 "core/src/fpdfapi/fpdf_render/render_int.h" 7 #include "core/src/fpdfapi/fpdf_render/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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 } 657 }
658 cur_pos += pFont->GetCharWidthF(pCharCodes[i]) * font_size / 1000; 658 cur_pos += pFont->GetCharWidthF(pCharCodes[i]) * font_size / 1000;
659 } 659 }
660 } 660 }
661 CFX_Matrix matrix; 661 CFX_Matrix matrix;
662 if (pMatrix) { 662 if (pMatrix) {
663 matrix = *pMatrix; 663 matrix = *pMatrix;
664 } 664 }
665 matrix.e = origin_x; 665 matrix.e = origin_x;
666 matrix.f = origin_y; 666 matrix.f = origin_y;
667 if (pFont->GetFontType() == PDFFONT_TYPE3) 667 if (pFont->GetFontType() == PDFFONT_TYPE3) {
Lei Zhang 2016/02/24 01:37:01 if (pFont->GetFontType() != PDFFONT_TYPE3) { if
dsinclair 2016/02/24 14:51:08 Done.
668 ; 668 } else if (stroke_argb == 0) {
669 else if (stroke_argb == 0) {
670 DrawNormalText(pDevice, nChars, pCharCodes, pCharPos, pFont, font_size, 669 DrawNormalText(pDevice, nChars, pCharCodes, pCharPos, pFont, font_size,
671 &matrix, fill_argb, pOptions); 670 &matrix, fill_argb, pOptions);
672 } else 671 } else {
673 DrawTextPath(pDevice, nChars, pCharCodes, pCharPos, pFont, font_size, 672 DrawTextPath(pDevice, nChars, pCharCodes, pCharPos, pFont, font_size,
674 &matrix, NULL, pGraphState, fill_argb, stroke_argb, NULL); 673 &matrix, NULL, pGraphState, fill_argb, stroke_argb, NULL);
674 }
675
675 if (nChars > 1) { 676 if (nChars > 1) {
676 FX_Free(pCharCodes); 677 FX_Free(pCharCodes);
677 FX_Free(pCharPos); 678 FX_Free(pCharPos);
678 } 679 }
679 } 680 }
680 FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice, 681 FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice,
681 int nChars, 682 int nChars,
682 FX_DWORD* pCharCodes, 683 FX_DWORD* pCharCodes,
683 FX_FLOAT* pCharPos, 684 FX_FLOAT* pCharPos,
684 CPDF_Font* pFont, 685 CPDF_Font* pFont,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 ProcessPath(&path, pObj2Device); 781 ProcessPath(&path, pObj2Device);
781 } 782 }
782 } 783 }
783 784
784 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) { 785 CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) {
785 int glyph_index = GlyphFromCharCode(charcode); 786 int glyph_index = GlyphFromCharCode(charcode);
786 if (!m_Font.GetFace()) 787 if (!m_Font.GetFace())
787 return nullptr; 788 return nullptr;
788 return m_Font.LoadGlyphPath(glyph_index, dest_width); 789 return m_Font.LoadGlyphPath(glyph_index, dest_width);
789 } 790 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698