summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-15 15:02:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-15 15:02:22 +0000
commit9875889910585b08d2abd372ddc95469baf1a7e9 (patch)
treedac7825a580bed8bc2767e4e877c814705e6b783 /fpdfsdk/cpdfsdk_widget.cpp
parent0a68fd65bb2ced78bc57769cde8ecd16a175c84f (diff)
downloadpdfium-9875889910585b08d2abd372ddc95469baf1a7e9.tar.xz
Use Width()/Height() methods from rectangles.
Change-Id: I07f4363046be920816e8d0dae766c7af833284db Reviewed-on: https://pdfium-review.googlesource.com/28582 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 1496beeb8e..20189ef4d6 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -744,8 +744,8 @@ CFX_FloatRect CPDFSDK_Widget::GetClientRect() const {
CFX_FloatRect CPDFSDK_Widget::GetRotatedRect() const {
CFX_FloatRect rectAnnot = GetRect();
- float fWidth = rectAnnot.right - rectAnnot.left;
- float fHeight = rectAnnot.top - rectAnnot.bottom;
+ float fWidth = rectAnnot.Width();
+ float fHeight = rectAnnot.Height();
CPDF_FormControl* pControl = GetFormControl();
CFX_FloatRect rcPDFWindow;
@@ -768,8 +768,8 @@ CFX_Matrix CPDFSDK_Widget::GetMatrix() const {
CFX_Matrix mt;
CPDF_FormControl* pControl = GetFormControl();
CFX_FloatRect rcAnnot = GetRect();
- float fWidth = rcAnnot.right - rcAnnot.left;
- float fHeight = rcAnnot.top - rcAnnot.bottom;
+ float fWidth = rcAnnot.Width();
+ float fHeight = rcAnnot.Height();
switch (abs(pControl->GetRotation() % 360)) {
default: