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

Side by Side Diff: xfa/fde/cfde_txtedttextset.cpp

Issue 2037563002: Replace IFGAS_Font with underlying concrete type (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix Windows Created 4 years, 6 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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "xfa/fde/cfde_txtedttextset.h" 7 #include "xfa/fde/cfde_txtedttextset.h"
8 8
9 #include "xfa/fde/cfde_txtedtengine.h" 9 #include "xfa/fde/cfde_txtedtengine.h"
10 #include "xfa/fde/cfde_txtedtpage.h" 10 #include "xfa/fde/cfde_txtedtpage.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const FDE_TEXTEDITPIECE* pPiece = 42 const FDE_TEXTEDITPIECE* pPiece =
43 reinterpret_cast<const FDE_TEXTEDITPIECE*>(hText); 43 reinterpret_cast<const FDE_TEXTEDITPIECE*>(hText);
44 FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount); 44 FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount);
45 for (int32_t i = 0; i < pPiece->nCount; i++) { 45 for (int32_t i = 0; i < pPiece->nCount; i++) {
46 pBuffer[i] = m_pPage->GetChar((void*)hText, i); 46 pBuffer[i] = m_pPage->GetChar((void*)hText, i);
47 } 47 }
48 wsText.ReleaseBuffer(pPiece->nCount); 48 wsText.ReleaseBuffer(pPiece->nCount);
49 return pPiece->nCount; 49 return pPiece->nCount;
50 } 50 }
51 51
52 IFX_Font* CFDE_TxtEdtTextSet::GetFont(FDE_HVISUALOBJ hText) { 52 CFX_GEFont* CFDE_TxtEdtTextSet::GetFont(FDE_HVISUALOBJ hText) {
53 return m_pPage->GetEngine()->GetEditParams()->pFont; 53 return m_pPage->GetEngine()->GetEditParams()->pFont;
54 } 54 }
55 55
56 FX_FLOAT CFDE_TxtEdtTextSet::GetFontSize(FDE_HVISUALOBJ hText) { 56 FX_FLOAT CFDE_TxtEdtTextSet::GetFontSize(FDE_HVISUALOBJ hText) {
57 return m_pPage->GetEngine()->GetEditParams()->fFontSize; 57 return m_pPage->GetEngine()->GetEditParams()->fFontSize;
58 } 58 }
59 59
60 FX_ARGB CFDE_TxtEdtTextSet::GetFontColor(FDE_HVISUALOBJ hText) { 60 FX_ARGB CFDE_TxtEdtTextSet::GetFontColor(FDE_HVISUALOBJ hText) {
61 return m_pPage->GetEngine()->GetEditParams()->dwFontColor; 61 return m_pPage->GetEngine()->GetEditParams()->dwFontColor;
62 } 62 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 tr.iLength = nLength; 120 tr.iLength = nLength;
121 tr.pFont = pTextParams->pFont; 121 tr.pFont = pTextParams->pFont;
122 tr.fFontSize = pTextParams->fFontSize; 122 tr.fFontSize = pTextParams->fFontSize;
123 tr.dwStyles = dwLayoutStyle; 123 tr.dwStyles = dwLayoutStyle;
124 tr.iCharRotation = pTextParams->nCharRotation; 124 tr.iCharRotation = pTextParams->nCharRotation;
125 tr.dwCharStyles = pPiece->dwCharStyles; 125 tr.dwCharStyles = pPiece->dwCharStyles;
126 tr.pRect = &(pPiece->rtPiece); 126 tr.pRect = &(pPiece->rtPiece);
127 tr.wLineBreakChar = pTextParams->wLineBreakChar; 127 tr.wLineBreakChar = pTextParams->wLineBreakChar;
128 return pEngine->GetTextBreak()->GetCharRects(&tr, rtArray, bBBox); 128 return pEngine->GetTextBreak()->GetCharRects(&tr, rtArray, bBBox);
129 } 129 }
OLDNEW
« no previous file with comments | « xfa/fde/cfde_txtedttextset.h ('k') | xfa/fde/fde_gedevice.h » ('j') | xfa/fgas/font/fgas_font.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698