From: Jeff Smith whydoubt@gmail.com
--- dlls/gdiplus/graphicspath.c | 8 ++++++-- dlls/gdiplus/tests/graphicspath.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 8e436f96f4e..62c3814f4c1 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1786,6 +1786,7 @@ GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y, GpGraph GpRegion *region; HRGN hrgn; GpStatus status; + GpPointF pt = {x, y};
if(!path || !result) return InvalidParameter;
@@ -1793,13 +1794,16 @@ GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath* path, REAL x, REAL y, GpGraph if(status != Ok) return status;
- status = GdipGetRegionHRgn(region, NULL, &hrgn); + status = GdipGetRegionHRgn(region, graphics, &hrgn); if(status != Ok){ GdipDeleteRegion(region); return status; }
- *result = PtInRegion(hrgn, gdip_round(x), gdip_round(y)); + if (graphics) + gdip_transform_points(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, &pt, 1); + + *result = PtInRegion(hrgn, gdip_round(pt.X), gdip_round(pt.Y));
DeleteObject(hrgn); GdipDeleteRegion(region); diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 2d8209005b7..221cac9019e 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1960,7 +1960,7 @@ static void test_isvisible_line(void) winetest_push_context("%f", scales[j]); GdipSetPageScale(graphics, scales[j]); result = bisect(6.0, 14.0, 5.0, graphics, path); - todo_wine_if(expected[i][j] != 9.5) + todo_wine_if(expected[i][j] > 10.0) ok(fabs(expected[i][j] - result) < 0.000002, "Expected %.8e, got %.8e\n", expected[i][j], result); winetest_pop_context(); }