[3/5] gdiplus: Implement GdipSetPathGradientLinearBlend.
Vincent Povirk
madewokherd at gmail.com
Tue Apr 24 17:12:31 CDT 2012
-------------- next part --------------
From 82bb183b78eb433fb64470e3b1f48ea2e3fa3ebb Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 24 Apr 2012 09:50:33 -0500
Subject: [PATCH 03/13] gdiplus: Implement GdipSetPathGradientLinearBlend.
---
dlls/gdiplus/brush.c | 27 +++++++++++++++++++++++----
1 file 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,
--
1.7.9.5
More information about the wine-patches
mailing list