Vincent Povirk : gdiplus: Implement GdipSetPathGradientLinearBlend.
Alexandre Julliard
julliard at winehq.org
Wed Apr 25 13:40:25 CDT 2012
Module: wine
Branch: master
Commit: d0a85604d532bb8f4cc3cd1a07ce525facb0dc65
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d0a85604d532bb8f4cc3cd1a07ce525facb0dc65
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Tue Apr 24 09:50:33 2012 -0500
gdiplus: Implement GdipSetPathGradientLinearBlend.
---
dlls/gdiplus/brush.c | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 5c82064..490a0b9 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -1466,14 +1466,33 @@ GpStatus WINGDIPAPI GdipSetPathGradientBlend(GpPathGradient *brush, GDIPCONST RE
GpStatus WINGDIPAPI GdipSetPathGradientLinearBlend(GpPathGradient *brush,
REAL focus, REAL scale)
{
- static int calls;
+ REAL factors[3];
+ REAL positions[3];
+ int num_points = 0;
TRACE("(%p,%0.2f,%0.2f)\n", brush, focus, scale);
- if(!(calls++))
- FIXME("not implemented\n");
+ if (!brush) return InvalidParameter;
- return NotImplemented;
+ if (focus != 0.0)
+ {
+ factors[num_points] = 0.0;
+ positions[num_points] = 0.0;
+ num_points++;
+ }
+
+ factors[num_points] = scale;
+ positions[num_points] = focus;
+ num_points++;
+
+ if (focus != 1.0)
+ {
+ factors[num_points] = 0.0;
+ positions[num_points] = 1.0;
+ num_points++;
+ }
+
+ return GdipSetPathGradientBlend(brush, factors, positions, num_points);
}
GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient *brush,
More information about the wine-cvs
mailing list