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

Side by Side Diff: fpdfsdk/cpdfsdk_widget.cpp

Issue 2278153005: CPDF_Annot::GetRect() should return CFX_FloatRect. (Closed)
Patch Set: Created 4 years, 3 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/cpdfsdk_baannot.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.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 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 "fpdfsdk/include/cpdfsdk_widget.h" 7 #include "fpdfsdk/include/cpdfsdk_widget.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 int32_t CPDFSDK_Widget::GetAppearanceAge() const { 1968 int32_t CPDFSDK_Widget::GetAppearanceAge() const {
1969 return m_nAppAge; 1969 return m_nAppAge;
1970 } 1970 }
1971 1971
1972 int32_t CPDFSDK_Widget::GetValueAge() const { 1972 int32_t CPDFSDK_Widget::GetValueAge() const {
1973 return m_nValueAge; 1973 return m_nValueAge;
1974 } 1974 }
1975 1975
1976 FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY) { 1976 FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY) {
1977 CPDF_Annot* pAnnot = GetPDFAnnot(); 1977 CPDF_Annot* pAnnot = GetPDFAnnot();
1978 CFX_FloatRect annotRect; 1978 CFX_FloatRect annotRect = pAnnot->GetRect();
1979 pAnnot->GetRect(annotRect);
1980 if (!annotRect.Contains(pageX, pageY)) 1979 if (!annotRect.Contains(pageX, pageY))
1981 return FALSE; 1980 return FALSE;
1982 1981
1983 if (!IsVisible()) 1982 if (!IsVisible())
1984 return FALSE; 1983 return FALSE;
1985 1984
1986 if ((GetFieldFlags() & FIELDFLAG_READONLY) == FIELDFLAG_READONLY) 1985 if ((GetFieldFlags() & FIELDFLAG_READONLY) == FIELDFLAG_READONLY)
1987 return FALSE; 1986 return FALSE;
1988 1987
1989 return TRUE; 1988 return TRUE;
1990 } 1989 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_baannot.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698