From a0061afa12e0fec210727c9478adb8ac78c5d63c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 23 Feb 2017 09:25:17 -0500 Subject: 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 Reviewed-by: Tom Sepez --- core/fxge/win32/fx_win32_gdipext.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'core/fxge') diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index 54711ceef5..1be2a54b18 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -1080,15 +1080,16 @@ static bool IsSmallTriangle(PointF* points, for (int i = 0; i < 3; i++) { int pair1 = pairs[i * 2]; int pair2 = pairs[i * 2 + 1]; - FX_FLOAT x1 = points[pair1].X, x2 = points[pair2].X; - FX_FLOAT y1 = points[pair1].Y, y2 = points[pair2].Y; + + CFX_PointF p1(points[pair1].X, points[pair1].Y); + CFX_PointF p2(points[pair2].X, points[pair2].Y); if (pMatrix) { - pMatrix->TransformPoint(x1, y1); - pMatrix->TransformPoint(x2, y2); + p1 = pMatrix->Transform(p1); + p2 = pMatrix->Transform(p2); } - FX_FLOAT dx = x1 - x2; - FX_FLOAT dy = y1 - y2; - FX_FLOAT distance_square = (dx * dx) + (dy * dy); + + CFX_PointF diff = p1 - p2; + FX_FLOAT distance_square = (diff.x * diff.x) + (diff.y * diff.y); if (distance_square < (1.0f * 2 + 1.0f / 4)) { v1 = i; v2 = pair1; -- cgit v1.2.3