Nikolay Sivov : gdiplus: Implemented GdipCreatePathGradientI.
Alexandre Julliard
julliard at winehq.org
Mon Apr 28 08:00:54 CDT 2008
Module: wine
Branch: master
Commit: 836b4183b9c2a6a8b7b2765bfee1122e774ee00c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=836b4183b9c2a6a8b7b2765bfee1122e774ee00c
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Fri Apr 25 23:17:41 2008 +0400
gdiplus: Implemented GdipCreatePathGradientI.
---
dlls/gdiplus/brush.c | 28 ++++++++++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
2 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 727d12d..8129c10 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -211,6 +211,34 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
return Ok;
}
+GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points,
+ INT count, GpWrapMode wrap, GpPathGradient **grad)
+{
+ GpPointF *pointsF;
+ GpStatus ret;
+ INT i;
+
+ if(!points || !grad)
+ return InvalidParameter;
+
+ if(count <= 0)
+ return OutOfMemory;
+
+ pointsF = GdipAlloc(sizeof(GpPointF) * count);
+ if(!pointsF)
+ return OutOfMemory;
+
+ for(i = 0; i < count; i++){
+ pointsF[i].X = (REAL)points[i].X;
+ pointsF[i].Y = (REAL)points[i].Y;
+ }
+
+ ret = GdipCreatePathGradient(pointsF, count, wrap, grad);
+ GdipFree(pointsF);
+
+ return ret;
+}
+
/* FIXME: path gradient brushes not truly supported (drawn as solid brushes) */
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
GpPathGradient **grad)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 9774600..512947e 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -118,7 +118,7 @@
@ stdcall GdipCreatePath(long ptr)
@ stdcall GdipCreatePathGradient(ptr long long ptr)
@ stdcall GdipCreatePathGradientFromPath(ptr ptr)
-@ stub GdipCreatePathGradientI
+@ stdcall GdipCreatePathGradientI(ptr long long ptr)
@ stdcall GdipCreatePathIter(ptr ptr)
@ stdcall GdipCreatePen1(long long long ptr)
@ stdcall GdipCreatePen2(ptr long long ptr)
More information about the wine-cvs
mailing list