summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-21 12:56:24 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-21 19:05:18 +0000
commit1f403cee9478021862c7cc4e516907bd51e8f0f6 (patch)
tree57829fa3b036ee9ddd57a8ad5b3541fe4e96fdb8 /core/fxcrt
parent04557b8a7c2d3dab06fe9eadacc3c7744b3e14e2 (diff)
downloadpdfium-1f403cee9478021862c7cc4e516907bd51e8f0f6.tar.xz
Convert more TransformPoint calls to Transform
This Cl converts several uses of TransformPoint to use Transform(CFX_PointF). Change-Id: I9bc3c484e0a4304b904584218bd9e59dec7db727 Reviewed-on: https://pdfium-review.googlesource.com/2791 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_basic_coords.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fxcrt/fx_basic_coords.cpp b/core/fxcrt/fx_basic_coords.cpp
index ea11acab6b..c9f3195f36 100644
--- a/core/fxcrt/fx_basic_coords.cpp
+++ b/core/fxcrt/fx_basic_coords.cpp
@@ -390,20 +390,20 @@ void CFX_Matrix::TransformRect(FX_FLOAT& left,
FX_FLOAT& right,
FX_FLOAT& top,
FX_FLOAT& bottom) const {
- FX_FLOAT x[4] = {left, left, right, right};
- FX_FLOAT y[4] = {top, bottom, top, bottom};
+ CFX_PointF points[] = {
+ {left, top}, {left, bottom}, {right, top}, {right, bottom}};
for (int i = 0; i < 4; i++)
- TransformPoint(x[i], y[i]);
+ points[i] = Transform(points[i]);
- right = x[0];
- left = x[0];
- top = y[0];
- bottom = y[0];
+ right = points[0].x;
+ left = points[0].x;
+ top = points[0].y;
+ bottom = points[0].y;
for (int i = 1; i < 4; i++) {
- right = std::max(right, x[i]);
- left = std::min(left, x[i]);
- top = std::max(top, y[i]);
- bottom = std::min(bottom, y[i]);
+ right = std::max(right, points[i].x);
+ left = std::min(left, points[i].x);
+ top = std::max(top, points[i].y);
+ bottom = std::min(bottom, points[i].y);
}
}