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 "../../include/fxedit/fxet_stub.h" | 7 #include "../../include/fxedit/fxet_stub.h" |
8 #include "../../include/fxedit/fx_edit.h" | 8 #include "../../include/fxedit/fx_edit.h" |
9 #include "../../include/fxedit/fxet_edit.h" | 9 #include "../../include/fxedit/fxet_edit.h" |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex
); | 59 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex
); |
60 | 60 |
61 if (sFontAlias.GetLength() > 0 && fFontSize > 0 ) | 61 if (sFontAlias.GetLength() > 0 && fFontSize > 0 ) |
62 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"
; | 62 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"
; |
63 } | 63 } |
64 | 64 |
65 return sRet.GetByteString(); | 65 return sRet.GetByteString(); |
66 } | 66 } |
67 | 67 |
68 CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
nt & ptOffset, | 68 CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Poi
nt & ptOffset, |
69 » » » » » » » » » »
» » const CPVT_WordRange * pRange /* = NULL*/, FX_BOOL bContinuous/
* = TRUE*/, FX_WORD SubWord/* = 0*/) | 69 » » » » » » » » » »
» » const CPVT_WordRange * pRange /* = NULL*/, bool bContinuous/* =
true*/, FX_WORD SubWord/* = 0*/) |
70 { | 70 { |
71 CFX_ByteTextBuf sEditStream, sWords; | 71 CFX_ByteTextBuf sEditStream, sWords; |
72 | 72 |
73 CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f); | 73 CPDF_Point ptOld(0.0f,0.0f),ptNew(0.0f,0.0f); |
74 int32_t nCurFontIndex = -1; | 74 int32_t nCurFontIndex = -1; |
75 | 75 |
76 if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) | 76 if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) |
77 { | 77 { |
78 if (pRange) | 78 if (pRange) |
79 pIterator->SetAt(pRange->BeginPos); | 79 pIterator->SetAt(pRange->BeginPos); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 sRet << word.ptWord.x + ptOffset.x << "
" << line.ptLine.y + line.fLineDescent | 216 sRet << word.ptWord.x + ptOffset.x << "
" << line.ptLine.y + line.fLineDescent |
217 << " " << word.fWidth << " " <<
line.fLineAscent - line.fLineDescent << " re\nf\n"; | 217 << " " << word.fWidth << " " <<
line.fLineAscent - line.fLineDescent << " re\nf\n"; |
218 } | 218 } |
219 } | 219 } |
220 } | 220 } |
221 } | 221 } |
222 | 222 |
223 return sRet.GetByteString(); | 223 return sRet.GetByteString(); |
224 } | 224 } |
225 | 225 |
OLD | NEW |