[2/3] gdiplus: GdipGetLineColors

Nikolay Sivov bunglehead at gmail.com
Thu Apr 24 13:43:36 CDT 2008


Changelog:
    - implemented GdipGetLineColors

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

diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index c577d35..a01b938 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -683,6 +683,17 @@ GpStatus WINGDIPAPI GdipSetLineColors(GpLineGradient *brush, ARGB color1,
     return NotImplemented;
 }
 
+GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient *brush, ARGB *colors)
+{
+    if(!brush || !colors)
+        return InvalidParameter;
+
+    colors[0] = brush->startcolor;
+    colors[1] = brush->endcolor;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipSetLineLinearBlend(GpLineGradient *brush, REAL focus,
     REAL scale)
 {
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index c7fc39b..6b1c4d8 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -302,7 +302,7 @@
 @ stdcall GdipGetInterpolationMode(ptr ptr)
 @ stub GdipGetLineBlend
 @ stub GdipGetLineBlendCount
-@ stub GdipGetLineColors
+@ stdcall GdipGetLineColors(ptr ptr)
 @ stdcall GdipGetLineGammaCorrection(ptr ptr)
 @ stub GdipGetLinePresetBlend
 @ stub GdipGetLinePresetBlendCount
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 12d9511..db44ab2 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -157,6 +157,7 @@ GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
 GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*);
 GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*);
 GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*);
+GpStatus WINGDIPAPI GdipGetLineColors(GpLineGradient*,ARGB*);
 GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*);
 GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*);
 GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*);
-- 
1.4.4.4






More information about the wine-patches mailing list