Evan Stade : gdiplus: Added GdipCloneCustomLineCap.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 20 06:02:32 CDT 2007
Module: wine
Branch: master
Commit: 628237f3344b315b5561681a76a2aedc8d4fa700
URL: http://source.winehq.org/git/wine.git/?a=commit;h=628237f3344b315b5561681a76a2aedc8d4fa700
Author: Evan Stade <estade at gmail.com>
Date: Thu Jul 19 18:22:38 2007 -0700
gdiplus: Added GdipCloneCustomLineCap.
---
dlls/gdiplus/customlinecap.c | 28 ++++++++++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c
index 2a0cfb2..76e2c1d 100644
--- a/dlls/gdiplus/customlinecap.c
+++ b/dlls/gdiplus/customlinecap.c
@@ -24,6 +24,34 @@
#include "gdiplus.h"
#include "gdiplus_private.h"
+GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from,
+ GpCustomLineCap** to)
+{
+ if(!from || !to)
+ return InvalidParameter;
+
+ *to = GdipAlloc(sizeof(GpCustomLineCap));
+ if(!*to) return OutOfMemory;
+
+ memcpy(*to, from, sizeof(GpCustomLineCap));
+
+ (*to)->pathdata.Points = GdipAlloc(from->pathdata.Count * sizeof(PointF));
+ (*to)->pathdata.Types = GdipAlloc(from->pathdata.Count);
+
+ if((!(*to)->pathdata.Types || !(*to)->pathdata.Points) && (*to)->pathdata.Count){
+ GdipFree((*to)->pathdata.Points);
+ GdipFree((*to)->pathdata.Types);
+ GdipFree(*to);
+ return OutOfMemory;
+ }
+
+ memcpy((*to)->pathdata.Points, from->pathdata.Points, from->pathdata.Count
+ * sizeof(PointF));
+ memcpy((*to)->pathdata.Types, from->pathdata.Types, from->pathdata.Count);
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath,
GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap)
{
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index d80784e..1d8e424 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -44,7 +44,7 @@
@ stub GdipCloneBitmapArea
@ stub GdipCloneBitmapAreaI
@ stub GdipCloneBrush
-@ stub GdipCloneCustomLineCap
+@ stdcall GdipCloneCustomLineCap(ptr ptr)
@ stub GdipCloneFont
@ stub GdipCloneFontFamily
@ stub GdipCloneImage
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 136f469..901e03b 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -101,6 +101,7 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL*);
GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*);
+GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**);
GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL,
GpCustomLineCap**);
GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);
More information about the wine-cvs
mailing list