[2/2] gdiplus: Copy custom dashes in GdipClonePen.
Vincent Povirk
madewokherd at gmail.com
Wed Aug 14 16:41:27 CDT 2013
-------------- next part --------------
From 487f0ea5d53162b5aa351af1e6c896395cd846cf Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Wed, 14 Aug 2013 16:35:11 -0500
Subject: [PATCH 2/2] gdiplus: Copy custom dashes in GdipClonePen.
---
dlls/gdiplus/pen.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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);
--
1.8.1.2
More information about the wine-patches
mailing list