Commit 2c3142f0 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Copy custom dashes in GdipClonePen.

parent dc047ecd
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment