gdiplus: Fix GdipWidenPath transform for non-pixel pens.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Vincent Povirk 2016-02-16 16:10:22 -06:00 committed by Alexandre Julliard
parent 91352c5aa4
commit 6a6aa3134d
2 changed files with 8 additions and 5 deletions

View file

@ -2074,7 +2074,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
status = GdipClonePath(path, &flat_path);
if (status == Ok)
status = GdipFlattenPath(flat_path, matrix, flatness);
status = GdipFlattenPath(flat_path, pen->unit == UnitPixel ? matrix : NULL, flatness);
if (status == Ok && !init_path_list(&points, 314.0, 22.0))
status = OutOfMemory;
@ -2147,6 +2147,9 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
GdipDeletePath(flat_path);
if (status == Ok && pen->unit != UnitPixel)
status = GdipTransformPath(path, matrix);
return status;
}

View file

@ -1056,10 +1056,10 @@ static path_test_t widenline_path[] = {
};
static path_test_t widenline_wide_path[] = {
{5.0, 0.0, PathPointTypeStart, 0, 1}, /*0*/
{50.0, 0.0, PathPointTypeLine, 0, 1}, /*1*/
{50.0, 20.0, PathPointTypeLine, 0, 1}, /*2*/
{5.0, 20.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 1} /*3*/
{5.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/
{50.0, 0.0, PathPointTypeLine, 0, 0}, /*1*/
{50.0, 20.0, PathPointTypeLine, 0, 0}, /*2*/
{5.0, 20.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0} /*3*/
};
static void test_widen(void)