Commit b228426d authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Default path gradient center color depends on the constructor.

parent 28bf9356
...@@ -509,7 +509,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect* rect ...@@ -509,7 +509,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect* rect
wrap, line); wrap, line);
} }
static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad) static GpStatus create_path_gradient(GpPath *path, ARGB centercolor, GpPathGradient **grad)
{ {
GpRectF bounds; GpRectF bounds;
GpStatus stat; GpStatus stat;
...@@ -554,7 +554,7 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad) ...@@ -554,7 +554,7 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
(*grad)->path = path; (*grad)->path = path;
(*grad)->brush.bt = BrushTypePathGradient; (*grad)->brush.bt = BrushTypePathGradient;
(*grad)->centercolor = 0xffffffff; (*grad)->centercolor = centercolor;
(*grad)->wrap = WrapModeClamp; (*grad)->wrap = WrapModeClamp;
(*grad)->gamma = FALSE; (*grad)->gamma = FALSE;
/* FIXME: this should be set to the "centroid" of the path by default */ /* FIXME: this should be set to the "centroid" of the path by default */
...@@ -591,7 +591,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points, ...@@ -591,7 +591,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
stat = GdipAddPathLine2(path, points, count); stat = GdipAddPathLine2(path, points, count);
if (stat == Ok) if (stat == Ok)
stat = create_path_gradient(path, grad); stat = create_path_gradient(path, 0xff000000, grad);
if (stat != Ok) if (stat != Ok)
GdipDeletePath(path); GdipDeletePath(path);
...@@ -621,7 +621,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points, ...@@ -621,7 +621,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points,
stat = GdipAddPathLine2I(path, points, count); stat = GdipAddPathLine2I(path, points, count);
if (stat == Ok) if (stat == Ok)
stat = create_path_gradient(path, grad); stat = create_path_gradient(path, 0xff000000, grad);
if (stat != Ok) if (stat != Ok)
GdipDeletePath(path); GdipDeletePath(path);
...@@ -648,7 +648,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path, ...@@ -648,7 +648,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
if (stat == Ok) if (stat == Ok)
{ {
stat = create_path_gradient(new_path, grad); stat = create_path_gradient(new_path, 0xffffffff, grad);
if (stat != Ok) if (stat != Ok)
GdipDeletePath(new_path); GdipDeletePath(new_path);
......
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