[8/9] gdiplus: added GdipSetPathGradientCenterColor

Evan Stade estade at gmail.com
Wed Aug 1 19:56:05 CDT 2007


Hi,


 dlls/gdiplus/brush.c      |   15 +++++++++++++++
 dlls/gdiplus/gdiplus.spec |    2 +-
 include/gdiplusflat.h     |    1 +
 3 files changed, 17 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index da432fd..912bb83 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -120,6 +120,21 @@ GpStatus WINGDIPAPI GdipGetSolidFillColo
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient *grad,
+    ARGB argb)
+{
+    if(!grad)
+        return InvalidParameter;
+
+    grad->centercolor = argb;
+    grad->brush.lb.lbColor = ARGB2COLORREF(argb);
+
+    DeleteObject(grad->brush.gdibrush);
+    grad->brush.gdibrush = CreateSolidBrush(grad->brush.lb.lbColor);
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill *sf, ARGB argb)
 {
     if(!sf)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 8dcc155..abd7e24 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -549,7 +549,7 @@
 @ stdcall GdipSetPageUnit(ptr long)
 @ stdcall GdipSetPathFillMode(ptr long)
 @ stub GdipSetPathGradientBlend
-@ stub GdipSetPathGradientCenterColor
+@ stdcall GdipSetPathGradientCenterColor(ptr long)
 @ stub GdipSetPathGradientCenterPoint
 @ stub GdipSetPathGradientCenterPointI
 @ stub GdipSetPathGradientFocusScales
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index c04fef6..5e2b27a 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -94,6 +94,7 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(
 GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
 GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
 GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill*,ARGB*);
+GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient*,ARGB);
 GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB);
 
 GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL);
-- 
1.4.1


More information about the wine-patches mailing list