diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/fx_basic_coords.cpp | 12 | ||||
-rw-r--r-- | core/fxcrt/fx_coordinates.h | 1 |
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; |