Evan Stade : gdiplus: Added GdipCloneBrush.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 20 06:02:35 CDT 2007
Module: wine
Branch: master
Commit: b2b4b87c3b2c6420056f8fd70ea2f01210e1b909
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b2b4b87c3b2c6420056f8fd70ea2f01210e1b909
Author: Evan Stade <estade at gmail.com>
Date: Thu Jul 19 18:23:04 2007 -0700
gdiplus: Added GdipCloneBrush.
---
dlls/gdiplus/brush.c | 15 +++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index b39df22..21c92b5 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -21,6 +21,21 @@
#include "gdiplus.h"
#include "gdiplus_private.h"
+GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
+{
+ if(!brush || !clone)
+ return InvalidParameter;
+
+ *clone = GdipAlloc(sizeof(GpBrush));
+ if (!*clone) return OutOfMemory;
+
+ memcpy(*clone, brush, sizeof(GpBrush));
+
+ (*clone)->gdibrush = CreateBrushIndirect(&(*clone)->lb);
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
{
COLORREF col = ARGB2COLORREF(color);
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 755a70d..a0f57af 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -43,7 +43,7 @@
@ stub GdipClearPathMarkers
@ stub GdipCloneBitmapArea
@ stub GdipCloneBitmapAreaI
-@ stub GdipCloneBrush
+@ stdcall GdipCloneBrush(ptr ptr)
@ stdcall GdipCloneCustomLineCap(ptr ptr)
@ stub GdipCloneFont
@ stub GdipCloneFontFamily
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 365e81a..d181825 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -64,6 +64,7 @@ GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics*,InterpolationMode);
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode);
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
+GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
More information about the wine-cvs
mailing list