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 |
11 #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f | 11 #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f |
12 #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f | 12 #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f |
13 | 13 |
14 extern CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap, | |
15 int32_t nFontIndex, | |
16 FX_WORD Word, | |
17 FX_WORD SubWord); | |
18 | |
19 CPDF_Rect GetUnderLineRect(const CPVT_Word& word) { | 14 CPDF_Rect GetUnderLineRect(const CPVT_Word& word) { |
20 return CPDF_Rect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, | 15 return CPDF_Rect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, |
21 word.ptWord.x + word.fWidth, | 16 word.ptWord.x + word.fWidth, |
22 word.ptWord.y + word.fDescent * 0.25f); | 17 word.ptWord.y + word.fDescent * 0.25f); |
23 } | 18 } |
24 | 19 |
25 CPDF_Rect GetCrossoutRect(const CPVT_Word& word) { | 20 CPDF_Rect GetCrossoutRect(const CPVT_Word& word) { |
26 return CPDF_Rect(word.ptWord.x, | 21 return CPDF_Rect(word.ptWord.x, |
27 word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + | 22 word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + |
28 word.fDescent * 0.25f, | 23 word.fDescent * 0.25f, |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 rcUnderline.left += ptOffset.x; | 658 rcUnderline.left += ptOffset.x; |
664 rcUnderline.right += ptOffset.x; | 659 rcUnderline.right += ptOffset.x; |
665 rcUnderline.top += ptOffset.y; | 660 rcUnderline.top += ptOffset.y; |
666 rcUnderline.bottom += ptOffset.y; | 661 rcUnderline.bottom += ptOffset.y; |
667 AddRectToPageObjects(pPageObjects, color, rcUnderline); | 662 AddRectToPageObjects(pPageObjects, color, rcUnderline); |
668 } | 663 } |
669 } | 664 } |
670 } | 665 } |
671 } | 666 } |
672 } | 667 } |
OLD | NEW |