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

Side by Side Diff: fpdfsdk/fxedit/fxet_pageobjs.cpp

Issue 1938163002: More define cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 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
« no previous file with comments | « fpdfsdk/fxedit/fxet_edit.cpp ('k') | xfa/fwl/basewidget/fwl_checkboximp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/cfx_systemhandler.h" 16 #include "fpdfsdk/cfx_systemhandler.h"
17 #include "fpdfsdk/fxedit/include/fx_edit.h" 17 #include "fpdfsdk/fxedit/include/fx_edit.h"
18 #include "fpdfsdk/fxedit/include/fxet_edit.h" 18 #include "fpdfsdk/fxedit/include/fxet_edit.h"
19 19
20 #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f
21 #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f
22
23 CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) { 20 CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) {
24 return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, 21 return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f,
25 word.ptWord.x + word.fWidth, 22 word.ptWord.x + word.fWidth,
26 word.ptWord.y + word.fDescent * 0.25f); 23 word.ptWord.y + word.fDescent * 0.25f);
27 } 24 }
28 25
29 CFX_FloatRect GetCrossoutRect(const CPVT_Word& word) { 26 CFX_FloatRect GetCrossoutRect(const CPVT_Word& word) {
30 return CFX_FloatRect(word.ptWord.x, 27 return CFX_FloatRect(word.ptWord.x,
31 word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + 28 word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f +
32 word.fDescent * 0.25f, 29 word.fDescent * 0.25f,
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 rcUnderline.left += ptOffset.x; 639 rcUnderline.left += ptOffset.x;
643 rcUnderline.right += ptOffset.x; 640 rcUnderline.right += ptOffset.x;
644 rcUnderline.top += ptOffset.y; 641 rcUnderline.top += ptOffset.y;
645 rcUnderline.bottom += ptOffset.y; 642 rcUnderline.bottom += ptOffset.y;
646 AddRectToPageObjects(pObjectHolder, color, rcUnderline); 643 AddRectToPageObjects(pObjectHolder, color, rcUnderline);
647 } 644 }
648 } 645 }
649 } 646 }
650 } 647 }
651 } 648 }
OLDNEW
« no previous file with comments | « fpdfsdk/fxedit/fxet_edit.cpp ('k') | xfa/fwl/basewidget/fwl_checkboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698