summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-23 09:25:17 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 14:49:18 +0000
commita0061afa12e0fec210727c9478adb8ac78c5d63c (patch)
tree340b7f1eb44ef89122fa5dc8e952e2a19c39c02f /core/fxcrt
parentb147e07ee36be10ca0796a6566be107077c21a03 (diff)
downloadpdfium-a0061afa12e0fec210727c9478adb8ac78c5d63c.tar.xz
Convert TransformPoint calls to Transform calls
This Cl converts remaining calls to TransformPoint to use Transform instead. Change-Id: I7a2c000492da5dda3975b4449812f281816fdab6 Reviewed-on: https://pdfium-review.googlesource.com/2822 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_basic_coords.cpp12
-rw-r--r--core/fxcrt/fx_coordinates.h1
2 files changed, 2 insertions, 11 deletions
diff --git a/core/fxcrt/fx_basic_coords.cpp b/core/fxcrt/fx_basic_coords.cpp
index 3e306339f2..cb5a010427 100644
--- a/core/fxcrt/fx_basic_coords.cpp
+++ b/core/fxcrt/fx_basic_coords.cpp
@@ -363,17 +363,9 @@ FX_FLOAT CFX_Matrix::TransformDistance(FX_FLOAT distance) const {
return distance * (GetXUnit() + GetYUnit()) / 2;
}
-void CFX_Matrix::TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const {
- FX_FLOAT fx = a * x + c * y + e;
- FX_FLOAT fy = b * x + d * y + f;
- x = fx;
- y = fy;
-}
-
CFX_PointF CFX_Matrix::Transform(const CFX_PointF& point) const {
- CFX_PointF ret = point;
- TransformPoint(ret.x, ret.y);
- return ret;
+ return CFX_PointF(a * point.x + c * point.y + e,
+ b * point.x + d * point.y + f);
}
void CFX_Matrix::TransformRect(CFX_RectF& rect) const {
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index a900506fe7..2c84d0776c 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -646,7 +646,6 @@ class CFX_Matrix {
FX_FLOAT TransformDistance(FX_FLOAT dx, FX_FLOAT dy) const;
FX_FLOAT TransformDistance(FX_FLOAT distance) const;
- void TransformPoint(FX_FLOAT& x, FX_FLOAT& y) const;
CFX_PointF Transform(const CFX_PointF& point) const;
void TransformRect(CFX_RectF& rect) const;