Vincent Povirk : gdiplus: Add stub for GdipSetPenCompoundArray.
Alexandre Julliard
julliard at winehq.org
Fri Dec 5 07:42:48 CST 2008
Module: wine
Branch: master
Commit: 3e54840225a6aedff00772d52af469dd8820fe29
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e54840225a6aedff00772d52af469dd8820fe29
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Dec 4 14:30:47 2008 -0600
gdiplus: Add stub for GdipSetPenCompoundArray.
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/pen.c | 11 +++++++++++
dlls/gdiplus/tests/pen.c | 28 ++++++++++++++++++++++++++++
include/gdiplusflat.h | 1 +
4 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b5a5aab..1b3f307 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -564,7 +564,7 @@
@ stdcall GdipSetPathMarker(ptr)
@ stdcall GdipSetPenBrushFill(ptr ptr)
@ stdcall GdipSetPenColor(ptr long)
-@ stub GdipSetPenCompoundArray
+@ stdcall GdipSetPenCompoundArray(ptr ptr long)
@ stdcall GdipSetPenCustomEndCap(ptr ptr)
@ stdcall GdipSetPenCustomStartCap(ptr ptr)
@ stdcall GdipSetPenDashArray(ptr ptr long)
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index 2804b14..f41185a 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -409,6 +409,17 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb)
return GdipSetSolidFillColor(((GpSolidFill*)pen->brush), argb);
}
+GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash,
+ INT count)
+{
+ FIXME("(%p, %p, %i): stub", pen, dash, count);
+
+ if (!pen || !dash || count < 2 || count%2 == 1)
+ return InvalidParameter;
+
+ return NotImplemented;
+}
+
GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap)
{
GpCustomLineCap * cap;
diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c
index 263d0a7..d2f33f0 100644
--- a/dlls/gdiplus/tests/pen.c
+++ b/dlls/gdiplus/tests/pen.c
@@ -325,6 +325,33 @@ static void test_penfilltype(void)
GdipDeleteBrush((GpBrush*)line);
}
+static void test_compoundarray(void)
+{
+ GpStatus status;
+ GpPen *pen;
+ static const REAL testvalues[] = {0.2, 0.4, 0.6, 0.8};
+
+ status = GdipSetPenCompoundArray(NULL, testvalues, 4);
+ expect(InvalidParameter, status);
+
+ status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen);
+ expect(Ok, status);
+
+ status = GdipSetPenCompoundArray(pen, NULL, 4);
+ expect(InvalidParameter, status);
+ status = GdipSetPenCompoundArray(pen, testvalues, 3);
+ expect(InvalidParameter, status);
+ status = GdipSetPenCompoundArray(pen, testvalues, 0);
+ expect(InvalidParameter, status);
+ status = GdipSetPenCompoundArray(pen, testvalues, -2);
+ expect(InvalidParameter, status);
+
+ status = GdipSetPenCompoundArray(pen, testvalues, 4);
+ todo_wine expect(Ok, status);
+
+ GdipDeletePen(pen);
+}
+
START_TEST(pen)
{
struct GdiplusStartupInput gdiplusStartupInput;
@@ -345,6 +372,7 @@ START_TEST(pen)
test_dasharray();
test_customcap();
test_penfilltype();
+ test_compoundarray();
GdiplusShutdown(gdiplusToken);
}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 3219cb0..1f93258 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -480,6 +480,7 @@ GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*);
GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*);
GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*);
GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB);
+GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen*,GDIPCONST REAL*,INT);
GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*);
GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen*,GpCustomLineCap*);
GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen*,GDIPCONST REAL*,INT);
More information about the wine-cvs
mailing list