summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates.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 /core/fxcrt/fx_coordinates.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 'core/fxcrt/fx_coordinates.cpp')
-rw-r--r--core/fxcrt/fx_coordinates.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index d25a754d7a..bd06ce1473 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -136,8 +136,8 @@ FX_RECT CFX_FloatRect::GetClosestRect() const {
}
CFX_FloatRect CFX_FloatRect::GetCenterSquare() const {
- float fWidth = right - left;
- float fHeight = top - bottom;
+ float fWidth = Width();
+ float fHeight = Height();
float fHalfWidth = (fWidth > fHeight) ? fHeight / 2 : fWidth / 2;
float fCenterX = (left + right) / 2.0f;