Vincent Povirk : gdiplus: Copy custom dashes in GdipClonePen.
Alexandre Julliard
julliard at winehq.org
Thu Aug 15 13:12:47 CDT 2013
Module: wine
Branch: master
Commit: 2c3142f0ee4a5fa3aff658b9b46a9f91aea030d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c3142f0ee4a5fa3aff658b9b46a9f91aea030d4
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Aug 14 16:35:11 2013 -0500
gdiplus: Copy custom dashes in GdipClonePen.
---
dlls/gdiplus/pen.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index 80ede40..9b63db9 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -102,6 +102,7 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
(*clonepen)->customstart = NULL;
(*clonepen)->customend = NULL;
(*clonepen)->brush = NULL;
+ (*clonepen)->dashes = NULL;
stat = GdipCloneBrush(pen->brush, &(*clonepen)->brush);
@@ -111,6 +112,15 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
if (stat == Ok && pen->customend)
stat = GdipCloneCustomLineCap(pen->customend, &(*clonepen)->customend);
+ if (stat == Ok && pen->dashes)
+ {
+ (*clonepen)->dashes = GdipAlloc(pen->numdashes * sizeof(REAL));
+ if ((*clonepen)->dashes)
+ memcpy((*clonepen)->dashes, pen->dashes, pen->numdashes * sizeof(REAL));
+ else
+ stat = OutOfMemory;
+ }
+
if (stat != Ok)
{
GdipDeletePen(*clonepen);
More information about the wine-cvs
mailing list