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_page/include/cpdf_pageobject.h" | 7 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" |
8 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" | 8 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h" |
10 #include "core/fpdfapi/fpdf_page/include/cpdf_textobject.h" | 10 #include "core/fpdfapi/fpdf_page/include/cpdf_textobject.h" |
11 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" | 11 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" |
12 #include "core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h" | 12 #include "core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h" |
13 #include "core/fpdfdoc/include/cpvt_word.h" | 13 #include "core/fpdfdoc/include/cpvt_word.h" |
14 #include "core/fpdfdoc/include/ipvt_fontmap.h" | 14 #include "core/fpdfdoc/include/ipvt_fontmap.h" |
15 #include "core/fxge/include/fx_ge.h" | 15 #include "core/fxge/include/fx_ge.h" |
| 16 #include "fpdfsdk/fxedit/include/fx_edit.h" |
| 17 #include "fpdfsdk/fxedit/include/fxet_edit.h" |
16 #include "fpdfsdk/include/fx_systemhandler.h" | 18 #include "fpdfsdk/include/fx_systemhandler.h" |
17 #include "fpdfsdk/include/fxedit/fx_edit.h" | |
18 #include "fpdfsdk/include/fxedit/fxet_edit.h" | |
19 | 19 |
20 #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f | 20 #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f |
21 #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f | 21 #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f |
22 | 22 |
23 CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) { | 23 CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) { |
24 return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, | 24 return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, |
25 word.ptWord.x + word.fWidth, | 25 word.ptWord.x + word.fWidth, |
26 word.ptWord.y + word.fDescent * 0.25f); | 26 word.ptWord.y + word.fDescent * 0.25f); |
27 } | 27 } |
28 | 28 |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 rcUnderline.left += ptOffset.x; | 642 rcUnderline.left += ptOffset.x; |
643 rcUnderline.right += ptOffset.x; | 643 rcUnderline.right += ptOffset.x; |
644 rcUnderline.top += ptOffset.y; | 644 rcUnderline.top += ptOffset.y; |
645 rcUnderline.bottom += ptOffset.y; | 645 rcUnderline.bottom += ptOffset.y; |
646 AddRectToPageObjects(pObjectHolder, color, rcUnderline); | 646 AddRectToPageObjects(pObjectHolder, color, rcUnderline); |
647 } | 647 } |
648 } | 648 } |
649 } | 649 } |
650 } | 650 } |
651 } | 651 } |
OLD | NEW |