summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_icon.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/pwl/cpwl_icon.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/pwl/cpwl_icon.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_icon.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/pwl/cpwl_icon.cpp b/fpdfsdk/pwl/cpwl_icon.cpp
index e7669b3d20..52a4464639 100644
--- a/fpdfsdk/pwl/cpwl_icon.cpp
+++ b/fpdfsdk/pwl/cpwl_icon.cpp
@@ -67,8 +67,8 @@ std::pair<float, float> CPWL_Icon::GetScale() {
return {fHScale, fVScale};
CFX_FloatRect rcPlate = GetClientRect();
- float fPlateWidth = rcPlate.right - rcPlate.left;
- float fPlateHeight = rcPlate.top - rcPlate.bottom;
+ float fPlateWidth = rcPlate.Width();
+ float fPlateHeight = rcPlate.Height();
float fImageWidth;
float fImageHeight;
@@ -123,8 +123,8 @@ std::pair<float, float> CPWL_Icon::GetImageOffset() {
float fImageFactHeight = fImageHeight * fVScale;
CFX_FloatRect rcPlate = GetClientRect();
- float fPlateWidth = rcPlate.right - rcPlate.left;
- float fPlateHeight = rcPlate.top - rcPlate.bottom;
+ float fPlateWidth = rcPlate.Width();
+ float fPlateHeight = rcPlate.Height();
return {(fPlateWidth - fImageFactWidth) * fLeft,
(fPlateHeight - fImageFactHeight) * fBottom};