summaryrefslogtreecommitdiff
path: root/core/fxge
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/fxge
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/fxge')
-rw-r--r--core/fxge/win32/fx_win32_gdipext.cpp15
1 files changed, 8 insertions, 7 deletions
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;