[1/8] gdiplus: added GdipClonePen
Evan Stade
estade at gmail.com
Tue Jul 17 21:30:50 CDT 2007
Hi,
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/pen.c | 22 ++++++++++++++++++++++
include/gdiplusflat.h | 1 +
3 files changed, 24 insertions(+), 1 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index cc64b98..ee1a576 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -51,7 +51,7 @@
@ stub GdipCloneImageAttributes
@ stub GdipCloneMatrix
@ stub GdipClonePath
-@ stub GdipClonePen
+@ stdcall GdipClonePen(ptr ptr)
@ stub GdipCloneRegion
@ stub GdipCloneStringFormat
@ stdcall GdipClosePathFigure(ptr)
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index 53559bd..a2cbff5 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -65,6 +65,28 @@ static DWORD gdip_to_gdi_join(GpLineJoin
}
}
+GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
+{
+ LOGBRUSH lb;
+
+ if(!pen || !clonepen)
+ return InvalidParameter;
+
+ *clonepen = GdipAlloc(sizeof(GpPen));
+ if(!*clonepen) return OutOfMemory;
+
+ memcpy(*clonepen, pen, sizeof(GpPen));
+
+ lb.lbStyle = BS_SOLID;
+ lb.lbColor = (*clonepen)->color;
+ lb.lbHatch = 0;
+
+ (*clonepen)->gdipen = ExtCreatePen((*clonepen)->style,
+ roundr((*clonepen)->width), &lb, 0, NULL);
+
+ return Ok;
+}
+
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
GpPen **pen)
{
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index fb760f0..8388f95 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -27,6 +27,7 @@ #ifdef __cplusplus
extern "C" {
#endif
+GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**);
GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle);
--
1.4.1
More information about the wine-patches
mailing list