Commit 8d6cd1b5 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

gdiplus: Fix transformation in GdipIsOutlineVisiblePathPoint.

parent f6007881
......@@ -1728,9 +1728,10 @@ GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y,
{
GpStatus stat;
GpPath *wide_path;
GpPointF pt = {x, y};
GpMatrix *transform = NULL;
TRACE("(%p,%0.2f,%0.2f,%p,%p,%p)\n", path, x, y, pen, graphics, result);
TRACE("(%p, %0.2f, %0.2f, %p, %p, %p)\n", path, x, y, pen, graphics, result);
if(!path || !pen)
return InvalidParameter;
......@@ -1747,22 +1748,15 @@ GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath* path, REAL x, REAL y,
if (stat == Ok)
stat = get_graphics_transform(graphics, CoordinateSpaceDevice,
CoordinateSpaceWorld, transform);
if (stat == Ok)
GdipTransformMatrixPoints(transform, &pt, 1);
}
if (stat == Ok)
stat = GdipWidenPath(wide_path, pen, transform, 1.0);
if (pen->unit == UnitPixel && graphics != NULL)
{
if (stat == Ok)
stat = GdipInvertMatrix(transform);
if (stat == Ok)
stat = GdipTransformPath(wide_path, transform);
}
stat = GdipWidenPath(wide_path, pen, transform, 0.25f);
if (stat == Ok)
stat = GdipIsVisiblePathPoint(wide_path, x, y, graphics, result);
stat = GdipIsVisiblePathPoint(wide_path, pt.X, pt.Y, graphics, result);
GdipDeleteMatrix(transform);
......
......@@ -1964,7 +1964,7 @@ static void test_is_outline_visible_path_point(void)
result = TRUE;
status = GdipIsOutlineVisiblePathPoint(path, 1.0, 1.0, pen, graphics, &result);
expect(Ok, status);
todo_wine expect(FALSE, result);
expect(FALSE, result);
result = FALSE;
status = GdipIsOutlineVisiblePathPoint(path, 2.0, 1.0, pen, graphics, &result);
expect(Ok, status);
......@@ -1976,7 +1976,7 @@ static void test_is_outline_visible_path_point(void)
result = TRUE;
status = GdipIsOutlineVisiblePathPoint(path, 14.0, 1.0, pen, graphics, &result);
expect(Ok, status);
todo_wine expect(FALSE, result);
expect(FALSE, result);
result = FALSE;
status = GdipIsOutlineVisiblePathPoint(path, 15.0, 1.0, pen, graphics, &result);
expect(Ok, status);
......@@ -2001,7 +2001,7 @@ static void test_is_outline_visible_path_point(void)
result = FALSE;
status = GdipIsOutlineVisiblePathPoint(path, 2.0, 1.0, pen, graphics, &result);
expect(Ok, status);
todo_wine expect(TRUE, result);
expect(TRUE, result);
result = TRUE;
status = GdipIsOutlineVisiblePathPoint(path, 3.0, 1.0, pen, graphics, &result);
expect(Ok, status);
......@@ -2013,7 +2013,7 @@ static void test_is_outline_visible_path_point(void)
result = FALSE;
status = GdipIsOutlineVisiblePathPoint(path, 15.0, 1.0, pen, graphics, &result);
expect(Ok, status);
todo_wine expect(TRUE, result);
expect(TRUE, result);
result = TRUE;
status = GdipIsOutlineVisiblePathPoint(path, 16.0, 1.0, pen, graphics, &result);
expect(Ok, status);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment