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

Alexandre Julliard julliard at winehq.org
Wed Apr 4 13:07:06 CDT 2012


Module: wine
Branch: master
Commit: b228426d8e147ea22ee9f7232066ef4a9c861993
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b228426d8e147ea22ee9f7232066ef4a9c861993

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Sat Mar 31 13:14:07 2012 -0500

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

---

 dlls/gdiplus/brush.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 4bf4928..41b38a0 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -509,7 +509,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect* rect
                                         wrap, line);
 }
 
-static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
+static GpStatus create_path_gradient(GpPath *path, ARGB centercolor, GpPathGradient **grad)
 {
     GpRectF bounds;
     GpStatus stat;
@@ -554,7 +554,7 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
     (*grad)->path = path;
 
     (*grad)->brush.bt = BrushTypePathGradient;
-    (*grad)->centercolor = 0xffffffff;
+    (*grad)->centercolor = centercolor;
     (*grad)->wrap = WrapModeClamp;
     (*grad)->gamma = FALSE;
     /* FIXME: this should be set to the "centroid" of the path by default */
@@ -591,7 +591,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
         stat = GdipAddPathLine2(path, points, count);
 
         if (stat == Ok)
-            stat = create_path_gradient(path, grad);
+            stat = create_path_gradient(path, 0xff000000, grad);
 
         if (stat != Ok)
             GdipDeletePath(path);
@@ -621,7 +621,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points,
         stat = GdipAddPathLine2I(path, points, count);
 
         if (stat == Ok)
-            stat = create_path_gradient(path, grad);
+            stat = create_path_gradient(path, 0xff000000, grad);
 
         if (stat != Ok)
             GdipDeletePath(path);
@@ -648,7 +648,7 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
 
     if (stat == Ok)
     {
-        stat = create_path_gradient(new_path, grad);
+        stat = create_path_gradient(new_path, 0xffffffff, grad);
 
         if (stat != Ok)
             GdipDeletePath(new_path);




More information about the wine-cvs mailing list